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

Re: declaring global variable in XSL!

Subject: Re: declaring global variable in XSL!
From: "Michael Beddow" <mbnospam@xxxxxxxxxxx>
Date: Tue, 21 Aug 2001 07:51:48 +0100
ques es una variable global
On Tuesday, August 21, 2001 5:58 AM
Tim Watts wrote:

> Also, I think I remember somone saying recently that you cannot
declare a
> *global* variable based on a condition.

Sorry, that was me in mode="wrong-end-of stick", drawing an incorrect
conclusion from the correct premiss that the XSLT content model doesn't
allow <xsl:if> or <xsl:choose> at the top level of the sheet, where
global assignments need to be made.

In a follow-up, Oleg drew my attention to the extremely rich content
model of <xsl:variable> and pointed out that the way to achieve
conditional initialisation of a global was to generate an RTF by using
<xsl:choose> within the content of a <xsl:variable> at top level. As a
result I think I now understand why and how the two possible methods of
initialising a variable are significantly different.

Other responses off-list confirmed that the technique I had figured out
myself was OK for my particular case, namely using the union operator on
two node sets, where one set will always be empty if the condition that
interested me is true. But that's much less general than the RTF
approach.

Michael
---------------------------------------------------------
Michael Beddow   http://www.mbeddow.net/
XML and the Humanities page:  http://xml.lexilog.org.uk/
---------------------------------------------------------


 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.