#23 Add xsl:key like functionality to stx

open
nobody
None
5
2004-10-05
2004-10-05
Brett Knights
No

Hello,

I am planning to use stx to combine a number of xml
files together. It would be very helpful if stx had a
construct similar to the xsl:key construct that could
be used on a buffer or document.

Possible usage would be to define the key at the top
level of the stylesheet.

<stx:key name='keyName' match='nodeTest' use='key value'/>

and then use the key something like:

<stx:process-buffer
name = qname
group = qname
filter-method = 'http://stx.sourceforge.net/2002/key'
filter-src = "url('key:keyName?{urlEncodeParamForUse}')">
<!-- Content: stx:with-param* -->
</stx:process-buffer>

The key would be constructed the first time the buffer
is used and would be cleared whenever new content is
added to the buffer.

Multiple keys could defined and implementations would
have to keep track of key/buffer associations.
This should allow a fairly decent performance increase
when buffers are being reused.

Discussion