Subject: RE: when question - am I doing something stupid or is this a limi tation / processor bug? From: "Rigby, David" <rigbyd@xxxxxxxxxx> Date: Fri, 7 Apr 2000 10:06:57 +0100 |
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@xxxxxxx] > Sent: Friday, April 07, 2000 8:46 AM > To: 'xsl-list@xxxxxxxxxxxxxxxx' > 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
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: could one xsl file generate mor, Kay Michael | Thread | select attribute in apply-templates, Richard Bell |
Re: could one xsl file generate mor, David Carlisle | Date | RE: could one xsl file generate mor, Linda van den Brink |
Month |