"K. Ari Krupnikov" wrote:
> > You don't need to subclass the parser itself; you only need to
> > set the appropriate property on the parser to set the new DOM
> > implementation by using the fully qualified class name. For
> > example:
> > [...]
> 
> I'm afraid that's not possible. My Document doesn't have a public
> no-argument constructor. It can only be instantiated using a factory

Why is it not possible? Is this your own document impl or 
something else? If it's you own, why can't you create a
document without creating it from the DOMImplementation
factory?

I think that this feature was added before DOM L2 Rec so
we don't have a way of setting the document factory and
using that for constructing a DOM tree. Also, say we *did*
have a way to set this, then what would we pass in as the
doctype parameter? Null? If so, how do we set the document 
type later when we see one in the document? If not, then 
what if the document doesn't contain a DOCTYPE line? Some 
users would argue that a DOM tree should not have a 
DocumentType node if there is no DOCTYPE line in the 
document instance. And I think that I agree.

-- 
Andy Clark * IBM, TRL - Japan * [EMAIL PROTECTED]

Reply via email to