xsd2html2xml
xsd2html2xml copied to clipboard
Error on Enumerations
Hi, I'm getting an error occurring during the transformation:
<string>:0:0:ERROR:XSLT:ERR_OK: RAN get-suffix ON xs:simpleType NAMED yesNoList
file:/C:/Users/john/Desktop/Repository/MichielCM.xsd2html2xml/handlers/enumerations.xsl:60:0:ERROR:XSLT:ERR_OK: runtime error, element 'attribute'
<string>:0:0:ERROR:XSLT:ERR_OK: xsl:attribute: Cannot add attributes to an element if children have been already added to the element.
Here is the part of the schema that is triggering the error:
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" version="1.0">
<xs:element name="Package">
<xs:complexType>
<xs:attribute name="Address" type="yesNoList" use="optional"/>
</xs:complexType>
</xs:element>
<xs:simpleType name="yesNoList">
<xs:restriction base="xs:token">
<xs:enumeration value="No"/>
<xs:enumeration value="Yes"/>
</xs:restriction>
</xs:simpleType>
</xs:schema>
This error does not occur on versions 3.2 and earlier.
Thanks!
Hi, this probably works fine in Release 3.3, right? Just not in the current commit?
If so, I fixed the problem in the latest commit.
Thanks Michiel, the fix works great! The error does occur on 3.3 when I use our full schema. But, I'm happy to use the latest commit. Thankyou.