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 Eric Hartmann <eh...@rhinfo.com> on 2002/04/22 11:04:57 UTC

RE: How to store Schema separately and xml separately and still validate the xml against the schema

Hi Kumuda,

Please don't use html when posting to mailing lists.

As far as I know, you have two solutions :
* The simplest way is to use the EntityResolver (you will have to
implement one) and use setEntityResolver method of your builder. When
the builder have to resolve an entity, your EntityResolver will be asked
to provide an InputStream.

* Or more complicated, choose a protocol name (myprotocol for instance)
then implement a StreamHandlerFactory and a StreamHandler. At the
beginning on your application use
URL.setURLStreamHandlerFactory(myStreamHandlerFactory), and use the
protocol name on your xml files (something like
xsi:noNamespaceSchemaLocation="myprotocol:myschema.xsd"). Then the
parser will be able to find your schemas. You can only affect once an
StreamHandlerFactory.

Eric 

-----Original Message-----
From: Kumuda Rajarshi [mailto:kumuda@learningmate.com] 
Sent: Tuesday, May 22, 2001 9:14 AM
To: xerces-j-user@xml.apache.org
Subject: How to store Schema separately and xml separately and still
validate the xml against the schema


Hello,
I have a directory where I am storing all my Schema's and I have another
directory where I am storing my XML file. I have to store like this
only.
If I do so, and If I validate, the XML, I am getting error which means
that the Schema is not found. 
How to validate those XML's whose schema is in separate Directory
Please do answer soon as possible.
Thanking you
KumudaRajarshi






____________________________________________________
  IncrediMail - Email has finally evolved - Click Here


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


RE: How to store Schema separately and xml separately and still validate the xml against the schema

Posted by Kumuda Rajarshi <ku...@learningmate.com>.
Hi Eric,
Thank you for your suggestion.
I don't know much about entity Resolver I will go through it and I will  try
the best method.
KumudaRajarshi

-------Original Message-------

From: xerces-j-user@xml.apache.org
Date: Monday, April 22, 2002 02:47:04 PM
To: xerces-j-user@xml.apache.org
Subject: RE: How to store Schema separately and xml separately and still
validate the xml against the schema

Hi Kumuda,

Please don't use html when posting to mailing lists.

As far as I know, you have two solutions :
* The simplest way is to use the EntityResolver (you will have to
implement one) and use setEntityResolver method of your builder. When
the builder have to resolve an entity, your EntityResolver will be asked
to provide an InputStream.

* Or more complicated, choose a protocol name (myprotocol for instance)
then implement a StreamHandlerFactory and a StreamHandler. At the
beginning on your application use
URL.setURLStreamHandlerFactory(myStreamHandlerFactory), and use the
protocol name on your xml files (something like
xsi:noNamespaceSchemaLocation="myprotocol:myschema.xsd"). Then the
parser will be able to find your schemas. You can only affect once an
StreamHandlerFactory.

Eric 

-----Original Message-----
From: Kumuda Rajarshi [mailto:kumuda@learningmate.com] 
Sent: Tuesday, May 22, 2001 9:14 AM
To: xerces-j-user@xml.apache.org
Subject: How to store Schema separately and xml separately and still
validate the xml against the schema


Hello,
I have a directory where I am storing all my Schema's and I have another
directory where I am storing my XML file. I have to store like this
only.
If I do so, and If I validate, the XML, I am getting error which means
that the Schema is not found. 
How to validate those XML's whose schema is in separate Directory
Please do answer soon as possible.
Thanking you
KumudaRajarshi






____________________________________________________
IncrediMail - Email has finally evolved - Click Here


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