Subject: [xsl] 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 |
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 works) 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 </xsl:if> </xsl:if> </xsl:if> 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> <xsl:if test='test2'> write my XML bloc </xsl:if> <xsl:if test='test3'> write my XML bloc </xsl:if> And it's the same with the xsl:choose/xsl:when. If someone feels inspired... Don't hesitate Thanks a lot Jean-Christophe XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] determining whether an XP, David Carlisle | Thread | Re: [xsl] Need a confirmation of a , Jonathan Perret |
RE: [xsl] generate xsl 1.0 from 2.0, Bryan Rasmussen | Date | Re: [xsl] Muenchian method, and key, Jeni Tennison |
Month |