Subject: Re: [xsl] Need a confirmation of a difference between WD-xsl and 1999/XSL/Transform From: "Jonathan Perret" <jonathan@xxxxxxxxxxxx> Date: Wed, 23 Jan 2002 15:30:17 +0100 |
> 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. I can't help with the other points, but (perhaps only for the sake of discussion ?) here's an equivalent way of doing an OR with 3 if's that doesn't involve duplicating the result block : <xsl:variable name="testresult"> <xsl:if test='test1'>x</xsl:if> <xsl:if test='test2'>x</xsl:if> <xsl:if test='test3'>x</xsl:if> </xsl:variable> <xsl:if test="string-length($testresult)!=0"> write my XML bloc </xsl:if> (note that you can do AND by just replacing the final test with "string-length($testresult)=3") Cheers, --Jonathan XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] Need a confirmation of a diff, Jean-Christophe Papo | Thread | Re: [xsl] determining whether an XP, Jeni Tennison |
[xsl] Newbie question: dynamic outp, Mike Bandy | Date | Re: [xsl] Splitting a String Reques, Mike Ferrando |
Month |