"Will Holcomb" <[EMAIL PROTECTED]> wrote on 02/22/2007 01:45:51 PM:
> In the FAQ: http://xerces.apache.org/xerces2-j/faq-dom.html#faq-2 > > The example imports org.w3c.dom.DOMImplementationRegistry. This > class doesn't seem to exist and, as best I can tell, should be org. > w3c.dom.bootstrap.DOMImplementationRegistry. > > Is that correct? Yes. Good catch. I just fixed it in SVN. Should be up on the website the next time we refresh it. > Will Holcomb > > P.S. I am trying to load XHTML document fragments that don't have a > doctype. The parser is bitching about the undefined entities. I'm > still trying to figure it out on my own, but it would be amazingly > useful if anyone knows off the top of their head how to either: > > 1. Pass entities through a parse unresolved. It seems like they > could just stay entities the entire time and be written as entities > in the output without ever having been resolved. > 2. Preload the HTML default character entities into a parser before > setting it up to parse. > 3. Some other solution that I haven't thought of. The goal is to not > have to edit the hundreds of source documents. If you were using a DocumentBuilder you could provide the entity declarations with an implementation of EntityResolver2 [1]. See getExternalSubset(). [1] http://xerces.apache.org/xerces2-j/javadocs/api/org/xml/sax/ext/EntityResolver2.html Michael Glavassevich XML Parser Development IBM Toronto Lab E-mail: [EMAIL PROTECTED] E-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]