Quantcast

Using Schema 1.1 with SourceValidator example.

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Using Schema 1.1 with SourceValidator example.

Jim Barnett-5

On the faq page for XML Schema http://xerces.apache.org/xerces2-j/faq-xs.html is the following:

 

“You can also refer to the JAXP sample, SourceValidator, where you can validate XML documents against 1.1 schemas by specifying the "-xsd11" flag when running the sample.”

 

However when I try the following, I get told that –xsd11 is an unknown option :

 

java -cp D:\xerces\xerces-2_11_0\xercesSamples.jar  jaxp.SourceValidator -xsd11 -a <someschema.xsd >-i <someinputfile> -f

 

Am I doing something wrong? 

 

Thanks,

Jim

 

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Using Schema 1.1 with SourceValidator example.

Michael Glavassevich-3

Sanity check... Did you download [1] the stable version of Xerces-J 2.11.0 or the XML Schema 1.1 beta version of 2.11.0?

You need the XML Schema 1.1 beta binary package.

Thanks.

[1] http://xerces.apache.org/mirrors.cgi#binary

Michael Glavassevich
XML Technologies and WAS Development
IBM Toronto Lab
E-mail: [hidden email]

E-mail: [hidden email]

"Jim Barnett" <[hidden email]> wrote on 03/07/2012 04:53:24 PM:

> On the faq page for XML Schema http://xerces.apache.org/xerces2-j/faq-xs.html
> is the following:

>  
> “You can also refer to the JAXP sample, SourceValidator, where you
> can validate XML documents against 1.1 schemas by specifying the "-
> xsd11" flag when running the sample.”

>  
> However when I try the following, I get told that –xsd11 is an
> unknown option :

>  
> java -cp D:\xerces\xerces-2_11_0\xercesSamples.jar  
> jaxp.SourceValidator -xsd11 -a <someschema.xsd >-i <someinputfile> -f

>  
> Am I doing something wrong?  
>  
> Thanks,
> Jim

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Using Schema 1.1 with SourceValidator example.

Jim Barnett-5
In reply to this post by Jim Barnett-5
Thanks.  That was certainly part of the problem.  I’ve downloaded the 1.1 beta package, and it now recognizes the –xsd11 option, but I get a different error:
 
: Parse error occurred - No SchemaFactory that implements the schema language specified by: http://www.w3.org/XML/XMLSchema/v1.1 c
be loaded
lang.IllegalArgumentException: No SchemaFactory that implements the schema language specified by: http://www.w3.org/XML/XMLSchema/
could be loaded
   at javax.xml.validation.SchemaFactory.newInstance(Unknown Source)
   at jaxp.SourceValidator.main(Unknown Source)
 
The package works if I leave out the –xsd11 flag and process using schema 1.0.  
 
= Jim

 

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Using Schema 1.1 with SourceValidator example.

Michael Glavassevich-3

Did you place xml-apis.jar in your endorsed directory [1]?

[1] http://xerces.apache.org/xerces2-j/faq-general.html#faq-4

Michael Glavassevich
XML Technologies and WAS Development
IBM Toronto Lab
E-mail: [hidden email]

E-mail: [hidden email]

"Jim Barnett" <[hidden email]> wrote on 03/08/2012 10:16:57 AM:

> Thanks.  That was certainly part of the problem.  I’ve downloaded
> the 1.1 beta package, and it now recognizes the –xsd11 option, but I
> get a different error:

>  
> : Parse error occurred - No SchemaFactory that implements the schema
> language specified by: http://www.w3.org/XML/XMLSchema/v1.1 c

> be loaded
> lang.IllegalArgumentException: No SchemaFactory that implements the
> schema language specified by: http://www.w3.org/XML/XMLSchema/

> could be loaded
>    at javax.xml.validation.SchemaFactory.newInstance(Unknown Source)
>    at jaxp.SourceValidator.main(Unknown Source)
>  
> The package works if I leave out the –xsd11 flag and process using
> schema 1.0.  

>  
> = Jim

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Using Schema 1.1 with SourceValidator example.

Jim Barnett-5
In reply to this post by Jim Barnett-5

Thanks, that fixed it.

 

-          Jim

>> Did you place xml-apis.jar in your endorsed directory [1]?

 

>> [1] http://xerces.apache.org/xerces2-j/faq-general.html#faq-4

 

>> Michael Glavassevich

>> XML Technologies and WAS Development

>> IBM Toronto Lab

>> E-mail: [hidden email]

>> E-mail: [hidden email]

 

Loading...