Subject: Re: [xsl] xsl:if test... Doesn't like the "[" when namespace is changed <From Newbie> From: Ingo Schildmann <ingoschi@xxxxxx> Date: Mon, 21 May 2001 18:07:36 +0200 |
On Monday 21 May 2001 17:25, you wrote: > > I cannot transform this: > > > > <xsl:if test=".[FieldNumber='26']"> > > > > This *did* work with the namespace: http://www.w3.org/TR/WD-xsl", > > That's a completely different language. In XSL(T) you'd write it as > > > <xsl:if test="FieldNumber='26'"> > > if you are testing the string or > > <xsl:if test="FieldNumber=26"> > > if you are testing the number. > > (so > <FieldNumber> 26 </FieldNumber> > <FieldNumber> 026 </FieldNumber> > would be true with the latter test but not with the former) But test=".[FieldNumber='26']" is also a valid XSLT test imho, although not a clever one. The nodelist that contains only the current node is filtered with a predicate, so it's contains either one or none node. Converted to boolean it is a legal test. Darryl's problem is apparently that the XSLT-Processor used by cooktop doesn't recognize a predicate after a '.' or self::node() at all. > > Expected token 'eof' found '['. > > .-->[<--FieldNumber='26'] But as always more information is needed. -- Ingo Schildmann ingoschi@xxxxxx XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] xsl:if test... Doesn't li, David Carlisle | Thread | RE: [xsl] xsl:if test... Doesn't li, Michael Kay |
Re: [xsl] Control over html output, David Carlisle | Date | RE: [xsl] An XSLT equivalent of the, Michael Kay |
Month |