FW: [jdom-interest] Doctype entity declaration

bob mcwhirter bob at werken.com
Tue Mar 13 20:41:39 PST 2001


Hmmm...

As far as I know, xpath doesn't provide any access to the doctype,
because, as you said, it's not really a node, but rather meta-information
about the document; and xpath is only about addressing portions of a
document.

Not having a parent shouldn't cause a problem.  Lemme double-check
the spec tomorrow, but I think it doesn't relate at all to xpath
functionality.  

	-bob


On Tue, 13 Mar 2001, Jason Hunter wrote:

> Harry Evans wrote:
> 
> > While I was designing for Doctype entity declarations, I noticed that
> > DocType, unlike Element, Entity, Comment, etc. does not have a reference to
> > the containing Document.  Is this by design, or oversight?  It seems to me
> > that it would be good to find the enclosing document for a doctype
> > declaration.  Any thoughts on this?
> 
> It's due to the fact that DocType doesn't really seem like a leaf on the
> document tree.  It's more like an attribute of the document.  That said,
> a DocType instance should probably either be immutable or should have a
> parent; thus ensuring you can't have the same DocType on two docs and
> have a change to one affect the other.  
> 
> We should determine if XPath would be helped by DocType knowing its
> parent.  If so, I'd propose adding the parent.  If not, then I'd propose
> making it immutable.  Bob, do you want to weigh in?
> 
> -jh-
> 




More information about the jdom-interest mailing list