Subject: Another DOM and XSL incompatibility? From: Tyler Baker <tyler@xxxxxxxxxxx> Date: Mon, 28 Dec 1998 17:30:06 -0500 |
In the DOM Attributes are not considered children of elements, yet in XSL it seems that through the pattern matching capabilities the Attribute nodes are considered to be SubNodes which I interpret as "children" of element nodes. There is an easy workaround to make the change (simply delegate recursive processing from the element node's children to the attribute nodes children as if the attribute node was not even there) but I am not so sure from reading the spec if this is the intended behavior. In other old spec, you had attribute patterns which could only be the last component pattern in an ancestry pattern. That was the rule. Now you could have something like: foo/@bar/baz in a select pattern without this being a formal error. I suppose all the XSL Processor would do here is always ignore "baz" since you will never have an element node as a child of an attribute node. One thing I have not found in the spec is whether this should be regarded as an error or just something that should be ignored as only a fool would try and add elements to attributes as children. I am a little confused as to whether you should select the element which has a "bar" attribute or whether to select the "bar" attribute itself. Furthermore, if you do indeed select the attribute (this is what my interpretation of the draft says) then what if someone does something like: foo/@bar/@baz Should this be legal to or else just ignored... Anyone have any real insight here as to what is the correct way to do things? Thanx, Tyler XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
triple model of layout, Andy Dent | Thread | Re: Another DOM and XSL incompatibi, James Clark |
triple model of layout, Andy Dent | Date | Re: Another DOM and XSL incompatibi, James Clark |
Month |