Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Help requested: XML / XSD confusion - "prefix must resolve to a namespace" exception...

From: "Thea" <monika.morawiecka@-----.--->
To: NULL
Date: 9/4/2006 7:16:00 AM

Hi
I am trying to use datatypes defined in xml file to check correctness
of input parameter values
To define needed datatypes following schema.xml file was created:

<?xml version="1.0"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
            xmlns:pd="uri:myUri.com">
    <xsd:simpleType name="pd:width">
        <xsd:restriction base="xsd:positiveInteger">
            <xsd:maxLength value="4"/>
            <xsd:minInclusive value="20"/>
            <xsd:maxInclusive value="2000"/>
        </xsd:restriction>
    </xsd:simpleType>
    <xsd:simpleType name="pd:height">
        <xsd:restriction base="xsd:positiveInteger">
            <xsd:maxLength value="4"/>
            <xsd:minInclusive value="20"/>
            <xsd:maxInclusive value="2000"/>
        </xsd:restriction>
    </xsd:simpleType>
</xsd:schema>

When I'm trying to run program with types of parameters set to
pd:height and pd:width I get following exception:

org.apache.xpath.domapi.XPathStylesheetDOM3Exception: Prefix must
resolve to a namespace: xsd

When I'm defining parameter types to be xsd:PositiveInteger, everything
works fine
But if I only try to use prefix pd: I get that exception.

I went through stack trace but that led me nowhere...
I've used google, read quite a bit, but got to no satisfying
conclusions...
I'm new to xml, and got quite confused
Please help ^^



transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent