Re: [xslt] XPath weirdness
- From: Thomas Broyer <tbroyer ltgt net>
- To: xslt gnome org
- Subject: Re: [xslt] XPath weirdness
- Date: Thu, 13 Sep 2001 14:21:03 +0200
Le 13/09/01 12:58:27, robert a écrit :
> <xsl:variable name="catid" select="'1'"/>
>
> <xsl:template match="categorynode[@catid = $catid]">
Hmm, here's another bug (in your stylesheet, but LibXSLT should raise an
error and it seems it doesn't). Let me cite the spec (5.3 Defining Template
Rules):
It is an error for the value of the match attribute to contain
a VariableReference.
Hopefully, it should be quite easy to fix LibXSLT. You'll need to fix your
stylesheet (idea: match "categorynode[@catid]" or "categorynode" and
enclose the whole template content inside an xsl:if with test="@catid =
$catid")
Tom.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]