|
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
|
Title: Validate against XML Schema without URI
- Validate against XML Schema without URI Christoph Metzendorf
- Re: Validate against XML Schema without URI Jeff Greif
