node-libxml-xsd
node-libxml-xsd copied to clipboard
Validating against xsd with choice tag gives Invalid XSD schema
if using the "choice" tag in the xsd gives an "Invalid XSD schema" error.
using this as test:
<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="person">
xs:complexType
xs:choice
<xs:element name="employee" type="employee"/>
<xs:element name="member" type="member"/>
</xs:choice>
</xs:complexType>
</xs:element>
</xs:schema>
This node library is only a wrapper to the XSD validation functions from the libxml library. My guess is that your problem is not with the node wrapper.
You can try validating without the wrapper using xmllint, something like this :
xmllint --noout --schema XSD_FILE XML_FILE