Re: select="*/@UNITS/.."

Subject: Re: select="*/@UNITS/.."
From: Elliotte Rusty Harold <elharo@xxxxxxxxxxxxxxx>
Date: Sat, 20 Mar 1999 10:32:26 -0500
At 1:00 PM +0800 3/20/99, James Tauber wrote:
>>But if an element is not the parent of its attributes, what is?  In order
>>for the XML document to be a tree, something must be the parent of each
>>node. Attributes are nodes. Therefore each must have exactly one parent.
>In XML 1.0 REC terms, attributes are not nodes, they are properties of
>element nodes. XSL uses a pattern language where the method for accessing
>attributes is very similar to the method for accessing children. The object
>model of the average XSL processor might treat attributes as nodes, but
>there is nothing in the XML 1.0 REC that says that *has* to be the case.

Agreed, but irrelevant. The XSL WD is quite clear that attributes are
nodes, as are processing instructions, comments, text, and other things
(except, surprisingly, the document type declaration).  Since the issue is
what an XSL processor should do, not what a generic XML processor should
do, attributes are nodes for the purposes of this discussion.

| Elliotte Rusty Harold | elharo@xxxxxxxxxxxxxxx | Writer/Programmer |
|        XML: Extensible Markup Language (IDG Books 1998)            |
|   |
|  Read Cafe au Lait for Java News: |
|  Read Cafe con Leche for XML News:     |

 XSL-List info and archive:

Current Thread