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

XSD 1.1 #12

Closed
iRyusa opened this issue Sep 19, 2016 · 3 comments
Closed

XSD 1.1 #12

iRyusa opened this issue Sep 19, 2016 · 3 comments

Comments

@iRyusa
Copy link

iRyusa commented Sep 19, 2016

Hi there,

Thanks for this really cool lib, it allow us to handle the validation on github.com/mjmlio/mjml

Is there any way to use XSD 1.1, because we need xs:any with an unbounded maxOccurs ?

Because we're getting a : Entity: line 192: element element: Schemas parser error : Element '{http://www.w3.org/2001/XMLSchema}element': Invalid value for maxOccurs (must be 0 or 1).

Thanks for the help

@albanm
Copy link
Owner

albanm commented Sep 19, 2016

Hello,

This small module only acts as a wrapper to libxml and it seems that xsd 1.1 support is not provided and not event planned for in the libxml project.

So, bad news I'm afraid !

@iRyusa
Copy link
Author

iRyusa commented Sep 19, 2016

Thanks for the answer, I guess we'll switch for a JSON validator then !

@wking
Copy link

wking commented Jan 30, 2018

For what it's worth, there's a 2016-05-03 libxml bug about this (no progress on the bug though).

wking added a commit to wking/license-list-XML that referenced this issue Mar 24, 2018
The Node tests were choking with:

  Entity: line 65: element element: Schemas parser error : Element
  '{http://www.w3.org/2001/XMLSchema}element': Invalid value for
  maxOccurs (must be 0 or 1).

which is mentioned in [1].  Despite unbounded being in the 1.0 spec,
maxOccurs was restricted to 1 inside <all> in XSD 1.0. The
restriction was lifted in 1.1 [2].  The backing libxml issue is [3].

This commit works around the limitation by adding a wrapping
<obsoletedByes> to mirror our existing <crossRefs> wrapping
<crossRef>.  In both cases, the wrapper adds no useful semantics, but
we need it to get the tests passing until we can find an XSD 1.1
validator.

[1]: albanm/node-libxml-xsd#12
[2]: https://www.w3.org/TR/xmlschema11-1/#ch_models
[3]: https://bugzilla.gnome.org/show_bug.cgi?id=765936
wking added a commit to wking/license-list-XML that referenced this issue Mar 24, 2018
The Node tests were choking with:

  Entity: line 65: element element: Schemas parser error : Element
  '{http://www.w3.org/2001/XMLSchema}element': Invalid value for
  maxOccurs (must be 0 or 1).

which is mentioned in [1].  Despite unbounded being in the 1.0 spec,
maxOccurs was restricted to 1 inside <all> in XSD 1.0. The
restriction was lifted in 1.1 [2].  The backing libxml issue is [3].

This commit works around the limitation by adding a wrapping
<obsoletedBys> to mirror our existing <crossRefs> wrapping
<crossRef>.  In both cases, the wrapper adds no useful semantics, but
we need it to get the tests passing until we can find an XSD 1.1
validator.

[1]: albanm/node-libxml-xsd#12
[2]: https://www.w3.org/TR/xmlschema11-1/#ch_models
[3]: https://bugzilla.gnome.org/show_bug.cgi?id=765936
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

3 participants