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: variables/parameters in match of xsl:key, 'ends-with'


> Does anyone know if future versions of XSLT will allow variables or
> parameters in the "match" attribute of xsl:key?

No, I can say confidently that no-one does.
> 
> In particular, I have a parameterized XSLT stylesheet (using 
> xsl:param), where the param is used to filter what is generated.
>
Yes, that's a nice use case. The restriction was put it to ensure
non-circularity (the value of the variable might depend on the key), but in
fact the restrictions on non-circularity that are there in the spec are
already broken, e.g. there's nothing in the spec that stops you writing:

<xsl:variable name="x">
  <xsl:call-template name="y"/>
</xsl:variable>

<xsl:template name="y">
  <xsl:value-of select="$x"/>
</xsl:template>

so my view would be to get rid of all the "static" restrictions and replace
them with a run-time restriction that says you can't refer to a variable
while you are evaluating it. It's quite hard, though, to express that in
rigorous language.

Mike Kay 

 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]