This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: when question - am I doing something stupid or is this a limi tation / processor bug?


Thanks very much. I'll look again at my XML - perhaps the insertion of the
currentModel node is causing the problem.

David

> -----Original Message-----
> From:	Linda van den Brink [SMTP:lvdbrink@baan.nl]
> Sent:	Friday, April 07, 2000 8:46 AM
> To:	'xsl-list@mulberrytech.com'
> Subject:	RE: when question - am I doing something stupid or is this a
> limi tation / processor bug?
> 
> > 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


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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]