Re: [xsl] Re: RE: Postional predicates de-mystified

On XSL-List, Mike Kay wrote:
> No. The attribute value is used directly as the separator. It's a
> string, not an expression. If you want to compute it, use an
> attribute value template. We decided to optimize for the common case
> of a constant string.

On this topic, I think that it might be worth adding a note in the
definition of xsl:value-of to state what focus is used to evaluate an
attribute value template in the separator attribute.

The section on the 'effective value' of attribute value templates does
not describe this (which is understandable, given that it doesn't
really apply in "normal" attribute value templates). It is made more
explicit in other places, for example the AVTs on xsl:sort.

Otherwise, it's not completely clear whether something peculiar like:

<xsl:template match="/">
  <xsl:value-of select="(a, b, c)" separator="[{position()}]" />
</xsl:template>

generates:

  a[1]b[2]c[3]

or:

  a[1]b[1]c[1]

I think the intention is the latter?

Cheers,

Jeni

---
Jeni Tennison
http://www.jenitennison.com/

Received on Friday, 4 January 2002 12:11:05 UTC