Title: Validate against XML Schema without URI
I think you would:
 
  1.  Add an externalSchemaLocation property to the parser which specifies a URI of your choice for the schema for the given namespace.
  2.  Provide an org.xml.sax.EntityResolver specialization for the parser whose resolveEntity which would treat this particular URI specially when it was passed as systemId, to wit
     -- extract the string representing the entire schema from the database
     -- construct a java.io.StringReader on this string
     -- return an org.sax.InputSource based on that Reader
 
If you can get the schema out of the database as an InputStream, you can skip the step of making a string out of it, just construct the InputSource on that stream.
 
The documentation for EntityResolver gives more detail.
 
Jeff
----- Original Message -----
Sent: Friday, June 20, 2003 1:18 AM
Subject: Validate against XML Schema without URI

Hi,

how can I validate a XML document against a XML Schema, where the schema isn't available as a file or something else one could point at with a URI. Instead the schema's content comes as a string representation out of a database. Supports Xerces validation against a string of an XML Schema?

Reply via email to