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

Re: Another DOM and XSL incompatibility?

Subject: Re: Another DOM and XSL incompatibility?
From: Tyler Baker <tyler@xxxxxxxxxxx>
Date: Tue, 29 Dec 1998 10:55:20 -0500
Re: Another DOM and XSL incompatibility?
James Clark wrote:

> Tyler Baker wrote:
>
> > 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.
>
> The spec needs a term to mean child node or attribute node.  It uses
> "subnode" for this; a subtree rooted at some element includes both the
> children and the attributes.  This doesn't mean that attributes are
> children.

This would be a good idea.  Someone who is just getting into stylesheets and
is not an expert on XML might get confused here.

> >  One thing I
> > have not found in the spec is whether this should be regarded as an
> > error
>
> The spec doesn't say it's an error, so it's not an error, though it
> would be reasonable to give a warning.
>
> Detecting all unmatchable patterns would be tricky.  Consider something
> like:
>
> foo[bar and not(bar)]

That is pretty obvious.  The thing I want to know is?  Should unmatchable
patterns (ones that can be resolved when building the stylesheet tree) flag
errors?  Should the XSL Processor be allowed to do this or else just pretend
everything is OK.

> > to whether you should select the element which has a "bar" attribute or
> > whether to select the "bar" attribute itself.
>
> The latter.
>
> >  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...
>
> There's nothing in the spec that makes it illegal, so it's legal. There
> will never be any nodes that are selected by the pattern since attribute
> nodes can't have attributes.

Gotcha.  I and probably others thank you as usual for the quick reply to these
sort of questions.

Tyler


 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.