You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xerces.apache.org by David Glaser <dg...@acmepacket.com> on 2012/04/23 20:31:40 UTC

How do I load an XSD 1.1 Schema using the XSloader?

I tried to load an XSD conforming to Version 1.1 using the QueryXS.java sample and it refuses to load an XSD containing a single "assert" element.

I used the getRecognizedVersions()  method of the XSImplementation object to determine what versions are supported and it reports "1.0".

T then tried to create a new string list that has "1.0" and "1.1" and then passed the string list to the createXSLoader method.  It threw an exception saying

"FEATURE_NOT_SUPPORTED: The parameter 1.1 is recognized but the requested value cannot be set".

So, how do I get an XSLoader that will load a 1.1 xsd?

-David

RE: How do I load an XSD 1.1 Schema using the XSloader?

Posted by David Glaser <dg...@acmepacket.com>.
Thanks for the timely response.

The news is disappointing.  We have a data driven system that uses the parser to validate portions of our data.  With 1.1, we could have done a lot more.

We need both the JAXP validation (which works) and the XS library (which does not work) for extracting annotation information from the XSD.

So, we will use plan B instead.

-David

From: Michael Glavassevich [mailto:mrglavas@ca.ibm.com]
Sent: Monday, April 23, 2012 3:51 PM
To: j-users@xerces.apache.org
Subject: Re: How do I load an XSD 1.1 Schema using the XSloader?

Andrew Welch <an...@gmail.com>> wrote on 23/04/2012 03:33:23 PM:

> From: Andrew Welch <an...@gmail.com>>
> To: j-users@xerces.apache.org<ma...@xerces.apache.org>,
> Date: 23/04/2012 03:33 PM
> Subject: Re: How do I load an XSD 1.1 Schema using the XSloader?
>
> On 23 April 2012 19:31, David Glaser <dg...@acmepacket.com>> wrote:
> > I tried to load an XSD conforming to Version 1.1 using the QueryXS.java
> > sample and it refuses to load an XSD containing a single “assert” element.
> >
> >
> >
> > I used the getRecognizedVersions()  method of the XSImplementationobject to
> > determine what versions are supported and it reports “1.0”.
> >
> >
> >
> > T then tried to create a new string list that has “1.0” and “1.1” and then
> > passed the string list to the createXSLoader method.  It threw an exception
> > saying
> >
> >
> >
> > “FEATURE_NOT_SUPPORTED: The parameter 1.1 is recognized but the requested
> > value cannot be set”.
> >
> >
> >
> > So, how do I get an XSLoader that will load a 1.1 xsd?
>
> Are you sure you've got the 2.11 version that supports xsd 1.1 ?
> There are 2 versions of 2.11.0, one that supports xsd 1.0, and one
> that supports xsd 1.1.

Support for the XML Schema 1.1 component model [1] isn't complete. The intent was to only support the JAXP Validation API [2] initially, so would be surprised if you can find a way to get the XSLoader to accept an XML Schema document with XML Schema 1.1 language features. Certainly something I'd like to see working in the future but it's not ready for prime time yet.

> --
> Andrew Welch
> http://andrewjwelch.com<http://andrewjwelch.com/>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: j-users-unsubscribe@xerces.apache.org<ma...@xerces.apache.org>
> For additional commands, e-mail: j-users-help@xerces.apache.org<ma...@xerces.apache.org>

Thanks.

[1] https://issues.apache.org/jira/browse/XERCESJ-1362
[2] http://wiki.apache.org/xerces/Xerces-J%3A_XML_Schema_1.1_Design_Thoughts

Michael Glavassevich
XML Technologies and WAS Development
IBM Toronto Lab
E-mail: mrglavas@ca.ibm.com<ma...@ca.ibm.com>
E-mail: mrglavas@apache.org<ma...@apache.org>

Re: How do I load an XSD 1.1 Schema using the XSloader?

Posted by Michael Glavassevich <mr...@ca.ibm.com>.
Andrew Welch <an...@gmail.com> wrote on 23/04/2012 03:33:23 PM:

> From: Andrew Welch <an...@gmail.com>
> To: j-users@xerces.apache.org, 
> Date: 23/04/2012 03:33 PM
> Subject: Re: How do I load an XSD 1.1 Schema using the XSloader?
> 
> On 23 April 2012 19:31, David Glaser <dg...@acmepacket.com> wrote:
> > I tried to load an XSD conforming to Version 1.1 using the 
QueryXS.java
> > sample and it refuses to load an XSD containing a single “assert” 
element.
> >
> >
> >
> > I used the getRecognizedVersions()  method of the 
XSImplementationobject to
> > determine what versions are supported and it reports “1.0”.
> >
> >
> >
> > T then tried to create a new string list that has “1.0” and “1.1” and 
then
> > passed the string list to the createXSLoader method.  It threw an 
exception
> > saying
> >
> >
> >
> > “FEATURE_NOT_SUPPORTED: The parameter 1.1 is recognized but the 
requested
> > value cannot be set”.
> >
> >
> >
> > So, how do I get an XSLoader that will load a 1.1 xsd?
> 
> Are you sure you've got the 2.11 version that supports xsd 1.1 ?
> There are 2 versions of 2.11.0, one that supports xsd 1.0, and one
> that supports xsd 1.1.

Support for the XML Schema 1.1 component model [1] isn't complete. The 
intent was to only support the JAXP Validation API [2] initially, so would 
be surprised if you can find a way to get the XSLoader to accept an XML 
Schema document with XML Schema 1.1 language features. Certainly something 
I'd like to see working in the future but it's not ready for prime time 
yet.

> -- 
> Andrew Welch
> http://andrewjwelch.com
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: j-users-unsubscribe@xerces.apache.org
> For additional commands, e-mail: j-users-help@xerces.apache.org

Thanks.

[1] https://issues.apache.org/jira/browse/XERCESJ-1362
[2] 
http://wiki.apache.org/xerces/Xerces-J%3A_XML_Schema_1.1_Design_Thoughts

Michael Glavassevich
XML Technologies and WAS Development
IBM Toronto Lab
E-mail: mrglavas@ca.ibm.com
E-mail: mrglavas@apache.org

Re: How do I load an XSD 1.1 Schema using the XSloader?

Posted by Andrew Welch <an...@gmail.com>.
On 23 April 2012 19:31, David Glaser <dg...@acmepacket.com> wrote:
> I tried to load an XSD conforming to Version 1.1 using the QueryXS.java
> sample and it refuses to load an XSD containing a single “assert” element.
>
>
>
> I used the getRecognizedVersions()  method of the XSImplementation object to
> determine what versions are supported and it reports “1.0”.
>
>
>
> T then tried to create a new string list that has “1.0” and “1.1” and then
> passed the string list to the createXSLoader method.  It threw an exception
> saying
>
>
>
> “FEATURE_NOT_SUPPORTED: The parameter 1.1 is recognized but the requested
> value cannot be set”.
>
>
>
> So, how do I get an XSLoader that will load a 1.1 xsd?

Are you sure you've got the 2.11 version that supports xsd 1.1 ?
There are 2 versions of 2.11.0, one that supports xsd 1.0, and one
that supports xsd 1.1.


-- 
Andrew Welch
http://andrewjwelch.com

---------------------------------------------------------------------
To unsubscribe, e-mail: j-users-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-users-help@xerces.apache.org