Andy Clark wrote:
> 
> "K. Ari Krupnikov" wrote:
> > 1) add a constructor that takes a DOMImplementation argument and
> > overload init() and reset(). In this case,
> 
> I like this solution. Either a constructor or having a
> property for the DOMImplementation object works for me.
> Perhaps the second is better because people create their
> parsers from JAXP and have no way of passing arguments
> to the constructor. Unfortunately, though, JAXP doesn't
> have an extensive feature/property mechanism for DOM as
> it does for SAX -- so we're back to creating the parser
> object directly, anyway... <sigh/>
> 
> > I can patch DOMParser if there is interest in these solutions. It appers
> > that changes would be limited to org.apache.xerces.parsers.DOMParser
> 
> Patches for new features as well as bug fixes are always
> accepted. :)

Hi, I'm back again after a month of moving and getting connected.

I'm still trying to change DOMParser to work with my DBDOM database.

Here's a question about DTD and in particular, entity handling.

I need to intercept entity declarations in the DTD to build my own
DocumentType.Entities. Unlike SAXParser, DOMParser doesn't use
http://xml.org/sax/properties/declaration-handler. Xerces 1's DOMParser
has internalEntityDecl(int entityNameIndex, int entityValueIndex) which
cannot be used without stringpools (am I correct here? are stringpools
going away in Xerces 2?)
In Xerces 2, AbstractXMLDocumentParser has
internalEntityDecl(java.lang.String name, XMLString text) which looks
like org.xml.sax.ext.DeclHandler.internalEntityDecl(java.lang.String
name, java.lang.String value), except it's impossible to override with a
custom DeclHandler (or is it?)

So, short of using a SAX parser instead of a DOM one, is there a way to
override the default entity declaration handling in Xerces?

Ari.

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

Reply via email to