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

RE: Can this be written in a shorter form?

Subject: RE: Can this be written in a shorter form?
From: "Ragulf Pickaxe" <jawxml@xxxxxxxxxxx>
Date: Wed, 07 Jan 2004 09:15:32 +0000
shorter form
Helle Joeri,


<xsl:when test="$node_detlijn[$node_position]/@type = 'text' or $node_detlijn[$node_position]/@type = 'style'">

I need to test if the attribute type = "style" or "text".


As far as I know, the syntax must be like your working solution:
test="$A='A' or $A='B' or $A='C'" <- The usual way

I don't think it is possible to group the right sides of the equations:
test="$A=('A' or 'B' or 'C')" <- Not possible
I have not tried this, but I seem to remember having seen on this list, that it is not possible.


If you have many tests (more than just two), perhaps it would be shorter if you make a variable with a short name that contains $node_detlijn[$node_position]/@type.

Regards,
Ragulf :)

_________________________________________________________________
MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*. http://join.msn.com/?page=features/virus



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.