node-libxml-xsd icon indicating copy to clipboard operation
node-libxml-xsd copied to clipboard

Validating against xsd with choice tag gives Invalid XSD schema

Open taratoga opened this issue 7 years ago • 1 comments

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>

taratoga avatar May 09 '17 11:05 taratoga

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

albanm avatar May 09 '17 12:05 albanm