[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: XPath REC questions: comments and PIs

Subject: Re: XPath REC questions: comments and PIs
From: "John E. Simpson" <simpson@xxxxxxxxxxx>
Date: Tue, 25 Jan 2000 09:37:38 -0500
john simpson s parents
At 05:11 PM 01/24/2000 +0000, David Carlisle wrote:

> (An odd omission, since it's very careful to make
> the distinction in the case of attributes and elements.)

The distinction in this case is that attributes are not in the child
axis from the element, but the element is in the parent axis from the

Yes, I understood that distinction in the case of elements and attributes (and elements and namespaces, for that matter), and even the reason for it. My question was this: If the context node is a comment or PI, and you set the axis to parent::, do you get the containing element? or do you get the root node?

(The question assumes that the comment/PI is within the root *element*; if in the prolog or after the close of the root element, the parent is the root node.)

The spec says (in [5.2]) that PI and comment nodes are children of their containing elements but it does not say anything at all about whether those elements are considered parents of the PIs and/or comments that they contain. Common sense says that the relationship between parent and child(ren) "goes both ways" for comments/PIs, just as it does for *elements* which are children of other elements; however, the *spec* does not say that.

Thanks for the reply, David.
John E. Simpson            |  I spilled spot remover on my dog.
simpson@xxxxxxxxxxx        |  He's gone now.
http://www.flixml.org      |  (Stephen Wright)

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

Current Thread


Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
First Name
Last Name
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.