protected boolean inExternalSubset = false;
// We have a problem here. Xerces gets this right,
// but Crimson and possibly other parsers don't properly
// report these entities, or perhaps just not tag them
// with [dtd] like they're supposed to.
public void startEntity(String name) {
if (name.equals("[dtd]")) inExternalSubset = true;
}
public void endEntity(String name) {
if (name.equals("[dtd]")) inExternalSubset = false;
}
You can just reverse the logic if you prefer inInternalSubset.
--
Elliotte Rusty Harold [EMAIL PROTECTED]
XML in a Nutshell 3rd Edition Just Published!
http://www.cafeconleche.org/books/xian3/
http://www.amazon.com/exec/obidos/ISBN=0596007647/cafeaulaitA/ref=nosim
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
The trick is to look for the entity name "[dtd]". XOM accomplishes this
thusly using pure SAX:
- how do I detect internal subset when part of external... Jacob Kjome
- Re: how do I detect internal subset when part of... Jacob Kjome
- Re: how do I detect internal subset when part of... Elliotte Harold
- Re: how do I detect internal subset when par... Jacob Kjome
- Re: how do I detect internal subset when... Michael Glavassevich
- Re: how do I detect internal subset ... Jacob Kjome
- Re: how do I detect internal subset when... Elliotte Harold
- Re: how do I detect internal subset ... Jacob Kjome
