Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error on Enumerations #25

Open
j-lixi opened this issue Jun 12, 2019 · 2 comments
Open

Error on Enumerations #25

j-lixi opened this issue Jun 12, 2019 · 2 comments

Comments

@j-lixi
Copy link

j-lixi commented Jun 12, 2019

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!

@MichielCM
Copy link
Owner

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.

@j-lixi
Copy link
Author

j-lixi commented Jun 13, 2019

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants