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

RE: Conditional initialisation of variable outside a t

Subject: RE: Conditional initialisation of variable outside a template: just checking
From: "Oleg Tkachenko" <olegt@xxxxxxxxxxxxx>
Date: Sat, 11 Aug 2001 18:37:19 +0200
outside at
Hello Michael !

What's wrong with RTF ? You could use <xsl:choose> in <xsl:variable>'s content and select according some global parameter.

---
Oleg Tkachenko,
Multiconn International 

> -----Original Message-----
> From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx 
> [mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx]On Behalf Of Michael Beddow
> Sent: Saturday, August 11, 2001 12:30 PM
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject:  Conditional initialisation of variable outside a 
> template: just checking
> 
> 
> Can I just check up that I've got the right idea about something?
> 
> I have a sheet that needs to initialise a variable that will be in scope
> in all
> templates. I was doing this near the top of the sheet with
> 
> <xsl:variable name="mainID" select ="//body//div/@id"/>
> 
> Fine. But now I'm gettimg data that disregards the project's encoding
> guidelines and uses div1 in the place of div. Since I know I can't use
> <xsl:choose> or <xsl:if> outside a template for a conditional
> initialisation,
> I came up with this
> 
> <xsl:variable name="mainID" select ="//body//div1/@id |
> //body//div/@id"/>
> 
> which works in all the cases I've tried. But am I storing up some sort
> of problem for myself, and if so, is there a better way?
> 
> 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
> 


 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.