Of course, that assumes the parser already has a noNamespaceSchemaLocation to start with, i.e., specified in the document. Then you can use an EntityResolver to actually load another resource.

Bob

Curtiss Howard wrote:
On Thu, 30 Dec 2004 13:43:27 +0000, Peter Neubauer <[EMAIL PROTECTED]> wrote:

On Thursday 30 December 2004 03:02, Bob Foster wrote:

What you have specified as an argument is pretty clearly not a URI. It
doesn't begin with a scheme. It's hard to tell from reading it what the
correct URL should be, but the form must be:

jar:file:/path-to-jar-file!/path-within-jar-file

Just guessing, yours would be:

jar:file:/home/peter/.dpml/main/dpml/test/jars/dpml-test-testschema.jar!/ne
t/dpml/test/testschema/ConfigurableB.xschema


Thank for the fast reply!

Thinking about it, would it be possible to set the schema like the main file
via an InputSource and InputStream instead of an URI? That would be perfect
for my needs, since I get the schema via the Classloader.getResource.

/peter


You should use the setEntityResolver() method on your SAXParser object
and point it to a class that implements org.xml.sax.EntityResolver. There's one method, resolveEntity() that you must define. One of the
arguments to that method (systemID I think) will contain the schema
location. Then, just return an InputSource object that points to the
class resource you're trying to load.



Curtiss Howard

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to