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: xsl:if test... Doesn't like the "[" when namespace is changed <From Newbie>


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@web.de

 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]