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

global variables and more

Subject: global variables and more
From: "Jonny Pony" <jonnypony666@xxxxxxxxxxx>
Date: Sun, 14 Dec 2003 21:27:18 +0000
xsl global variables
Hi,

I want to adjust the layout of my page (potrait or landscape), depending on how many entries I got in my xml.
If there are 5 or less entries potrait, 5+ entries landscape.


So I try to check first and create some global-variables and put in some values for the layout (page height, ...)


This approach doesn't work of course: <xsl:choose> <xsl:when test="count(/ColumnNames/Column) &lt;= 5"> <xsl:variable name="page-height">29.7cm</xsl:variable> <xsl:variable name="page-width">21cm</xsl:variable> ... </xsl:when> <xsl:otherwise> <xsl:variable name="page-height">21cm</xsl:variable> <xsl:variable name="page-width">29.7cm</xsl:variable> ... </xsl:otherwise> </xsl:choose>

But is there a way to do something like that?
I don't want to check a million times in my xsl (I have a lot of attributes depending on the kind of layout).


Thanks
Jonny

_________________________________________________________________
NEU: Polyphone Klingeltöne und farbige Logos für Ihr Handy! http://polyphonetoene.handy.msn.de Jetzt Handy aufpeppen!



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.