xsl-list
[Top] [All Lists]

RE: Looking for a shorter mapping expression

2004-12-05 15:22:47
Could someone, please, suggest a more compact expression, equivalent
to the value of the "select" attribute below:

      <xsl:sequence select=
       "for $this in $pList1 return
          f:apply($pFun, $this)"
      />

It seems to me that this is illegal:

     $pList1/ f:apply($pFun, .)


I'm not sure you regard it as more compact, but if you want to do a mapping
that uses the context item rather than a range variable, you can do it at
the XSLT level:

<xsl:for-each select="$pList1">
  <xsl:sequence select="f:apply($pFun, .)"/>
</xsl:for-each>

This construct works for all (combinations of) sequences, whether they
contain nodes or atomic values.

Michael Kay
http://www.saxonica.com/


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



<Prev in Thread] Current Thread [Next in Thread>