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 Gopal Sharma <Go...@Sun.COM> on 2001/12/26 12:35:26 UTC
[PATCHED] Re: external schema validation fails with xerces-2.0 beta4 ?
John Mani wrote:-
> I am parsing a xml document whose schema is defined in another document.
>
> I create a DOMParser, and set the following features/properties:
>
> parser.setFeature("http://apache.org/xml/features/validation/schema",
> true);
> parser.setFeature("http://xml.org/sax/features/validation", true);
> parser.setProperty(
>
> "http://apache.org/xml/properties/schema/external-noNamespaceSchemaLocation",
> "myschema.xsd");
>
> However I get the following exception when running the program:
> org.xml.SAXNotRecogonizedException:
> http://apache.org/xml/properties/schema/external-noNamespaceSchemaLocation
> Bug ? I don't think I misspelt anything ...
Yep, you are correct. Please use the attached modified file (.java) and
build the jar(s) again. It should solve your problem.
Gopal
-----
Re: [PATCHED] Re: external schema validation fails with xerces-2.0 beta4 ?
Posted by John Mani <jo...@sixthdimension.com>.
Thanks.
Is there a release upcoming soon that'll have this fix ? I've just been
using the libraries straight off
the xerces-j site ... not downloading source and building it, and would
prefer to continue that way.
-john
----- Original Message -----
From: "Gopal Sharma" <Go...@Sun.COM>
To: <xe...@xml.apache.org>
Cc: <xe...@xml.apache.org>
Sent: Wednesday, December 26, 2001 3:35 AM
Subject: [PATCHED] Re: external schema validation fails with xerces-2.0
beta4 ?
>
> John Mani wrote:-
>
> > I am parsing a xml document whose schema is defined in another document.
> >
> > I create a DOMParser, and set the following features/properties:
> >
> > parser.setFeature("http://apache.org/xml/features/validation/schema",
> > true);
> > parser.setFeature("http://xml.org/sax/features/validation", true);
> > parser.setProperty(
> >
> >
"http://apache.org/xml/properties/schema/external-noNamespaceSchemaLocation"
,
> > "myschema.xsd");
> >
> > However I get the following exception when running the program:
> > org.xml.SAXNotRecogonizedException:
> >
http://apache.org/xml/properties/schema/external-noNamespaceSchemaLocation
> > Bug ? I don't think I misspelt anything ...
>
> Yep, you are correct. Please use the attached modified file (.java) and
> build the jar(s) again. It should solve your problem.
>
> Gopal
> -----
>
----------------------------------------------------------------------------
----
> Index: StandardParserConfiguration.java
> ===================================================================
> RCS file:
/home/cvspublic/xml-xerces/java/src/org/apache/xerces/parsers/StandardParser
Configuration.java,v
> retrieving revision 1.10
> diff -w -u -r1.10 StandardParserConfiguration.java
> --- StandardParserConfiguration.java 2001/12/14 20:50:21 1.10
> +++ StandardParserConfiguration.java 2001/12/25 15:58:32
> @@ -773,6 +773,12 @@
> if (propertyId.startsWith(Constants.XERCES_PROPERTY_PREFIX)) {
> String property =
propertyId.substring(Constants.XERCES_PROPERTY_PREFIX.length());
> if (property.equals(Constants.DTD_SCANNER_PROPERTY)) {
> + return;
> + }
> + if (property.equals(Constants.SCHEMA_LOCATION)) {
> + return;
> + }
> + if (property.equals(Constants.SCHEMA_NONS_LOCATION)) {
> return;
> }
> }
>
>
----------------------------------------------------------------------------
----
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-j-user-help@xml.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org