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

RE: choose to define conditional attributes?

Subject: RE: choose to define conditional attributes?
From: Kay Michael <Michael.Kay@xxxxxxx>
Date: Fri, 1 Oct 1999 10:22:02 +0100
define conditional
> http://www.w3.org/TR/xslt#creating-attributes says, "Instantiating an
> xsl:attribute element adds an attribute node to the containing result
> element node". It's not terribly clear, but the "containing" 
> node is the <xsl:attribute>'s parent, which is <xsl:when> in your 
> example. You want the parent to be a result element, i.e. a literal result
element 
> like <label> or an <xsl:element> instruction.
> 
Oh! Is that a definitive interpretation? (a) "Containing" surely allows an
ancestor as well as a parent, (b) I thought it was talking about the result
tree not the stylesheet tree.

In SAXON I allow xsl:attribute to add an attribute to an element created
using an ancestor literal result element in the source stylesheet, or even
an element created using a different template (i.e. you can do an
xsl:call-template to a template that contains the xsl:attribute). The only
constraint is that the element in the result tree must be open and must not
have had any character content added to it. The supplied stylesheet fragment
struck me as entirely valid. The whitespace shouldn't be an issue either, it
is stripped from the stylesheet and is not added to the result tree.

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.