Parents disinherit their children

Subject: Parents disinherit their children
From: Elliotte Rusty Harold <elharo@xxxxxxxxxxxxxxx>
Date: Wed, 13 Oct 1999 10:48:49 -0400
James Clark has pointed out to me that in XPath attribute nodes are not children of element nodes. The relevant statement is the first paragraph of section 5.3 of the XPath Proposed Recommendation:

5.3 Attribute Nodes

  Each element node has an associated set of attribute nodes;
  the element is the   parent of each of these attribute nodes;
  however, an attribute node is not a child of its parent element.

The namespace nodes have the same strange property:

5.4 Namespace Nodes

  Each element has an associated set of namespace nodes, one for
  each distinct namespace prefix that is in scope for the element
  and one for the default namespace if one is in scope for the element.
  The element is the parent of each of these namespace nodes; however,
  a namespace node is not a child of its parent element.

I think I see the point of this. It means that following the child axis won't land you on attributes or namespaces (though it may land you on text nodes, comments or processing instructions as well as child elements). However, you can follow up from an attribute or namespace along an ancestor or parent axis to the element that contains the attribute. I assume this is a sensible thing to desire.

However, I'm concerned about the logical inconsistency in this statement as currently written. In common usage, both technical and genealogical, the statement that A is the parent of B clearly implies that B is the child of A. Why is this common understanding of language broken here? Is there anything that can be done to fix it?

+-----------------------+------------------------+-------------------+
| Elliotte Rusty Harold | elharo@xxxxxxxxxxxxxxx | Writer/Programmer |
+-----------------------+------------------------+-------------------+
|                  The XML Bible (IDG Books, 1999)                   |
|              http://metalab.unc.edu/xml/books/bible/               |
|   http://www.amazon.com/exec/obidos/ISBN=0764532367/cafeaulaitA/   |
+----------------------------------+---------------------------------+
|  Read Cafe au Lait for Java News:  http://metalab.unc.edu/javafaq/ |
|  Read Cafe con Leche for XML News: http://metalab.unc.edu/xml/     |
+----------------------------------+---------------------------------+


XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list



Current Thread