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

Need a confirmation of a difference between WD-xsl and

Subject: Need a confirmation of a difference between WD-xsl and 1999/XSL/Transform
From: "Jean-Christophe Papot" <jcp@xxxxxxxxxxxx>
Date: Wed, 23 Jan 2002 12:19:51 +0100
xsl if test and
Hi all,

I'm generating an XSL from an XML template, using the DOM, for the WD-xsl
version (IE5 client) !!!
In my application, depending on the value of an attribute (@LOGIC = 'and' or
@LOGIC='or'), I have to write a different output :

If the value is 'and', i must write an xsl:if test with few tests depending
on the number of specific childnodes. For example if I have three childnodes

<xsl:if test='(test1) and (test2) and (test3)'>

Of course with a value of 'or', I should write :

<xsl:if test='(test1) or (test2) or (test3)'>

My first problem is that it seems the WD-xsl version can't handle that, I
can only make one test : example :

<xsl:if test='/ELEMENT1[@Attrib1 = 'val1' $and$ @Attrib2 = 'val2']'> (this

This doesn't work :

<xsl:if test='(/ELEMENT1[@Attrib1 = 'val1' $and$ @Attrib2 = 'val2']) and
(test2) and (test3)'>

So first question : Is this "normal" and does it depends on the XSL Parser
version ?
Second question : How can i handle it with the WD-xsl version ?

I started looking for a serie of <xsl:if> such as :
<xsl:if test='test1'>
    <xsl:if test='test2'>
        <xsl:if test='test3'>
            This is okay in the case of a 'and' for my @LOGIC attribute

But how to do it for the 'or'

I can't do this (the output file would be too large)

<xsl:if test='test1'>
     write my XML bloc
<xsl:if test='test2'>
     write my XML bloc
<xsl:if test='test3'>
     write my XML bloc

And it's the same with the xsl:choose/xsl:when.

If someone feels inspired... Don't hesitate

Thanks a lot


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

Current Thread


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.
First Name
Last Name
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.