Subject: RE: when question - am I doing something stupid or is this a limi tation / processor bug? From: Linda van den Brink <lvdbrink@xxxxxxx> Date: Fri, 7 Apr 2000 09:45:44 +0200 |
> Tje problem is that the test inside the xsl:when never succeeds. > I tried all > manner of combinations of @ and $ tokens in desperation and useing > test="@model=@applicableModel" succeeds in all cases > (presumably because > the value of applicableModel is being assigned to model > within the test > itself..?) but nothing else yields any results, even when > we're testing > model = 8800 against applicableModel = 8800. I tried your code and after removing a few typos :-) this worked: <?xml version="1.0"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:template match="schematics"> <xsl:variable name="model" select="modelnumber"/> <xsl:variable name="applicableModel" select="documentation/currentModel"/> <xsl:choose> <xsl:when test="$model=$applicableModel">succeeded </xsl:when> </xsl:choose> </xsl:template> </xsl:stylesheet> On this test source I created: <?xml version="1.0" ?> <schematics> <modelnumber id="1">8000</modelnumber> <documentation> <currentModel>8000</currentModel> </documentation> </schematics> The when test succeeded, so something else must be going wrong. Linda XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: xsl:if question, David Carlisle | Thread | RE: if question, Rigby, David |
xsl:if question, Matthew Cordes | Date | Re: xsl:if question, David Carlisle |
Month |