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:m yUri.com">
<xsd:simpleTy pe name="pd:width" >
<xsd:restrictio n base="xsd:posit iveInteger">
<xsd:maxLengt h value="4"/>
<xsd:minInclusi ve value="20"/>
<xsd:maxInclusi ve value="2000"/>
</xsd:restriction >
</xsd:simpleType>
<xsd:simpleTy pe name="pd:height ">
<xsd:restrictio n base="xsd:posit iveInteger">
<xsd:maxLengt h value="4"/>
<xsd:minInclusi ve value="20"/>
<xsd:maxInclusi ve 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.xpat h.domapi.XPathS tylesheetDOM3Ex ception: Prefix must
resolve to a namespace: xsd
When I'm defining parameter types to be xsd:PositiveInt eger, 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 ^^