T
Thea
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"
xmlnsd="uri:myUri.com">
<xsd:simpleType name="pd:width">
<xsd:restriction base="xsdositiveInteger">
<xsd:maxLength value="4"/>
<xsd:minInclusive value="20"/>
<xsd:maxInclusive value="2000"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="pd:height">
<xsd:restriction base="xsdositiveInteger">
<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 xsdositiveInteger, 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 ^^
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"
xmlnsd="uri:myUri.com">
<xsd:simpleType name="pd:width">
<xsd:restriction base="xsdositiveInteger">
<xsd:maxLength value="4"/>
<xsd:minInclusive value="20"/>
<xsd:maxInclusive value="2000"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="pd:height">
<xsd:restriction base="xsdositiveInteger">
<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 xsdositiveInteger, 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 ^^