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 "Langer, Raik 1675 T-CIP" <Ra...@de.heidelberg.com> on 2001/05/30 14:15:22 UTC
Schema Location
Hi,
I want to validate an XML file that uses an XML Schema located on my disk.
The XML file has the following namespace and location entries:
xmlns="http://www.CIP4.org/JDFSchema_1"
xmlns:xsi="http://www.w3.org/2000/10/XMLSchema-instance"
xsi:schemaLocation="http://www.CIP4.org/JDFSchema_1 file:///f:/JDFa_2.xsd"
When I try to validate this XML file with Xerces 1.4.0 I get the following
error message:
"org.xml.sax.SAXParseException: General Schema Error: Grammar with uri 2:
http://www.CIP4.org/JDFSchema_1 , can not be found."
Why ??? It works with Xerces 1.3.1.
Note:
The XMLSchema JDFa_2.xsd is available under
http://www.CIP4.org/JDFSchema_1/JDFa_2.xsd but only via user login (so a
parser won't be able to load it from there).
Regards,
Raik Langer
Heidelberger Druckmaschinen AG
mailto:raik.langer@de.heidelberg.com
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org
Re: Schema Location
Posted by Eduardo Martinez Gracia <ed...@um.es>.
Hi,
> xmlns="http://www.CIP4.org/JDFSchema_1"
> xmlns:xsi="http://www.w3.org/2000/10/XMLSchema-instance"
> xsi:schemaLocation="http://www.CIP4.org/JDFSchema_1 file:///f:/JDFa_2.xsd"
I have the same problem. The file:// doesn't work (at least if I use it as I thought it should be used). Anyway, you can put the JDFa_2.xsd file in the same directory as the xml file, so that you can get rid of file://
> Note:
> The XMLSchema JDFa_2.xsd is available under
> http://www.CIP4.org/JDFSchema_1/JDFa_2.xsd but only via user login (so a
> parser won't be able to load it from there).
You can use a url like this:
http://user:password@www.CIP4.org/JDFSchema_1/JDFa_2.xsd
The problem now is that your user and password is public if the xml document is public.
Bye.
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org
Re: Schema Location
Posted by Mary Ryan <mr...@stsci.edu>.
With Xerces version 1.4.0, you must use
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" instead of
xmlns:xsi="http://www.w3.org/2000/10/XMLSchema-instance"
(Note the "2001" instead of "2000/10").
Since you said this works with version 1.3.1, that is a likely culprit.
Mary Ryan
Space Telescope Science Institute
mryan@stsci.edu
"Langer, Raik 1675 T-CIP" wrote:
>
> Hi,
>
> I want to validate an XML file that uses an XML Schema located on my disk.
> The XML file has the following namespace and location entries:
>
> xmlns="http://www.CIP4.org/JDFSchema_1"
> xmlns:xsi="http://www.w3.org/2000/10/XMLSchema-instance"
> xsi:schemaLocation="http://www.CIP4.org/JDFSchema_1 file:///f:/JDFa_2.xsd"
>
> When I try to validate this XML file with Xerces 1.4.0 I get the following
> error message:
> "org.xml.sax.SAXParseException: General Schema Error: Grammar with uri 2:
> http://www.CIP4.org/JDFSchema_1 , can not be found."
>
> Why ??? It works with Xerces 1.3.1.
> Note:
> The XMLSchema JDFa_2.xsd is available under
> http://www.CIP4.org/JDFSchema_1/JDFa_2.xsd but only via user login (so a
> parser won't be able to load it from there).
>
> Regards,
> Raik Langer
> Heidelberger Druckmaschinen AG
> mailto:raik.langer@de.heidelberg.com
>
> ---------------------------------------------------------------------
> 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