I have a schema question, how can I write the schema that allows emptyTag for
optional fields, for example:
Schema:
<xsd:element name="Partner">
<xsd:sequence>
<xsd:element name="Name" type="xsd:string"/>
<xsd:element name="Age" type="xsd:positiveInteger"
minOccurs="0"/>
</xsd:sequence>
</xsd:element>
XML-1:
<Partner>
<Name>MyName</Name>
</Partner>
XML-2:
<Partner>
<Name>MyName2</Name>
<Age/>
</Partner>
For the second XML, the Xerces throws a error like "Value '' is not a integer",
my question is how can I change the schema so it can allow both XML, I know I
can change the type of "Age" to xsd:string and use the regular expression
"[0-9]{1,}", but I am wonder is there way to keep the xsd:positiveInteger type
and also allow the empty tag the same time?
Thanks
Benson.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]