Good afternoon, I'm always working on the same visor project and I have
some troubles using the entity resolver mechanism. I've tried to
understand its usage searching some examples with Google, but most of
them concern a SAX parser, whereas I'm using a DOM parser. Looking in
the mailing-list archives I've seen some posts on this argument, but
they require the derivation of the XMLEntityResolver class and things
like that, so they're far too complicated for my needs.
What I have to do is the following: I have a schema file in the
executable's directory (e.g. /home/roby/3DVisor/sandbox/bin), let's call
it "visor.xsd". Then I have some temporary XML files placed in the /tmp
directory and created with the following header:
<visor xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="visor.xsd">
I have to "dynamically replace" the "visor.xsd" attribute in the XML
file to the correct path of the schema file.
Is there a _simple_ way to do that? I've seen an example on
http://www.onlamp.com/pub/a/onlamp/2005/11/10/xerces_sax.html?page=3
that looks promising (the one using a SimpleEntityResolver), but regards
a SAX parser. Is there a trick to force it to work also for a DOM parser?
Thanks in advance to anyone willing to help me.
Roberto Rigamonti