Thanks, Dean. This is the kind of thing I was looking for, if more
convoluted than I was expecting (I'm using DOM). One reason I didn't
find it on my own is that XMLScanner's methods aren't documented.
I assume it's just an oversight. Can someone fix it? Even if the
XMLScanner documentation just listed members with no explanation
whatever it would help.
Joanne
Dean Roddey wrote:
>
> If you get the current top level XMLReader, it would have the fully
> qualified system id of the current entity. If you are using SAX, then if you
> use the locator interface, the locator will give you access to the system
> id. Otherwise, you can ask the parser for a reference to the scanner, which
> has a method to get the current top level XMLReader object. You can then
> call its getter for the system id.
>
> --------------------------
> Dean Roddey
> The Charmed Quark Controller
> Charmed Quark Software
> [EMAIL PROTECTED]
> http://www.charmedquark.com
>
> "If it don't have a control port, don't buy it!"
>
> ----- Original Message -----
> From: "Joanne Bogart" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Thursday, March 14, 2002 4:08 PM
> Subject: finding the "current" InputSource
>
> > Hi,
> > I'm working on an EntityResolver because I want to be able to use
> > environment variables when referring to external entities, but I
> > don't see any easy way, and maybe no way at all, to handle
> > a filespec which contains an environment variable *and* is
> > relative. In practice I wouldn't expect this to come up, but
> > it's not impossible and I hate to make arbitrary restrictions.
> >
> > The difficulty is in getting the right absolute path for the
> > current entity. I've been looking for something like a
> > getCurrentInputSource method but it doesn't seem to exist.
> > The only alternative I can think of is to declare a handler
> > which would be informed of end as well as start of each entity.
> > Is there a better way?
> >
> > thanks in advance,
> >
> > Joanne
> > --
> >
> > Joanne Bogart
> > [EMAIL PROTECTED]
> >
> >
> >
> > ---------------------------------------------------------------------
> > 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]