[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
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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|