xsl-list
[Top] [All Lists]

Re: [xsl] multiple values for the key

2008-08-02 10:00:46
Hi Ken,
   I appreciate your ideas. Your solution below is certainly very
portable, and should be preferred when portability of stylesheet is
the concern.

But I am only concerned, that if stylesheet is quite large, then to
access the contents of a variable (i.e., this one, <xsl:variable
name="x-values">), we are asking processor to build a large tree (an,
additional one) in memory, which might cause some performance
concerns.

Using node-set function I feel is more memory efficient than, using
document('') (which you wrote).

But certainly, even if node-set function is provided by multiple XSLT
processors, it's likely that it's not portable between processors (as,
it's namespace URI may be different).

The namespace URI I used for node-set, is what is suggested by EXSLT
set of extensions, and it's likely that it will be portable between
processors supporting EXSLT.


On Sat, Aug 2, 2008 at 3:13 PM, G. Ken Holman
<gkholman(_at_)cranesoftwrights(_dot_)com> wrote:
The above can be replaced with standard XSLT 1.0 to read the stylesheet file
as a source node tree ...

   <xsl:for-each
     select="key('x',document('')/*/xsl:variable[(_at_)name='x-values']/v)">


-- 
Regards,
Mukul Gandhi

--~------------------------------------------------------------------
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>