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

union causes invalid mixed content #24

Open
VladimirAlexiev opened this issue Oct 11, 2018 · 0 comments
Open

union causes invalid mixed content #24

VladimirAlexiev opened this issue Oct 11, 2018 · 0 comments

Comments

@VladimirAlexiev
Copy link
Contributor

Take https://www.openaire.eu/schema/1.0/oaf-common-1.0.xsd. It has this:

	<xs:simpleType name="boolOrEmptyType">
		<xs:union memberTypes="emptyType xs:boolean"/>
	</xs:simpleType>

According to the RelaxNG book sec 16.2.2 Compatibility with W3C XML Schema, this should be translated to

element foo{emptyType|xs:boolean}

XSDtoRNC.xsl almost does it:

	<rng:define name="boolOrEmptyType">
		<rng:choice><rng:ref name="emptyType"/>
                  emptyType xs:boolean
               <rng:data type="boolean"/></rng:choice>
	</rng:define>

but fails because the emptyType xs:boolean part is invalid mixed content.

My XSL skills are rudimentary. I looked at https://github.com/epiasini/XSDtoRNG/blob/master/xsdtorngconverter/XSDtoRNG.xsl#L429 but can't find the bug...

@VladimirAlexiev VladimirAlexiev changed the title union causes invalid text content union causes invalid mixed content Oct 11, 2018
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

1 participant