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

RE: understanding trees

Subject: RE: understanding trees
From: Kay Michael <Michael.Kay@xxxxxxx>
Date: Tue, 15 Jun 1999 09:51:27 +0100
RE: understanding trees
> 0. what is the difference between 'child' and 'descendant'? 
> is it right to
> presume that a child-node is the first node that stems from 
> some parent
> node while 'descendants' denote all the nodes that stem from 
> some parent?
>
The descendants of an element are the elements, text nodes, processing
instructions,
and comments (but not attributes) that occur textually between the start and
end tags of the element in the source XML document. The children of an
element X are those descendants of X that are not descendants of any
descendant of X.
 
> 1. what is the content of an element node? the spec says that 
> 'The *value* of an element node is the string that results from
concatenating all
> characters that are descendants of the element node in the 
> order in which they occur in the document.' so, if 'The children of an 
> element node are the element nodes, comment nodes, processing instruction 
> nodes and text
> nodes for its content.' what is meant by 'content' then? is there a
> hierarchical or coordinating relationship between them or are 
> they merely associated nodes?

The containing relationship is defined by the syntax of the XML source
document: an element contains everything between its start and end tags.

> 
> 2. am i right in assuming that 'attribute nodes' and 
> 'namespace nodes' are
> just associated with element nodes but don't have any 
> *relationship* with
> them?

They have a relationship/association with the containing element but it is
not the "child" relationship.

Mike Kay


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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

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.
Email
First Name
Last Name
Company
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.