Subject: RE: [xsl] keys and idrefs - XSLT2 request? From: "G. Ken Holman" <gkholman@xxxxxxxxxxxxxxxxxxxx> Date: Tue, 09 Oct 2001 08:39:06 -0400 |
Either to extend the key function in some way to handle idrefs, or to permit a key definition to take in all attributes of type idrefs? (I could see the problem where I have a CDATA attribute with spaces, but surely idrefs are a bit special?)
Date: Wed, 11 Oct 2000 04:31:02 +0800 To: XSL Editors <xsl-editors@xxxxxx> From: "G. Ken Holman" <gkholman@xxxxxxxxxxxxxxxxxxxx> Subject: Feature request: tokenized key table access
Hi folks!
I've been using the key() function a lot lately, and I've been using it to store name tokens similar to (usually) ID values. I would find it helpful if there were a way at declaration time to instruct the processor to tokenize the string and make individual key table entries with each individual token as the string value.
Also, I understand the need for the second argument of the key() function to be a verbatim string, but I would like a function that would tokenize the second argument as id() does and return all key table members with a value of one of the name tokens.
I am aware that a recursive function could walk through the arguments and tokenize them and when done act on the built-up node set ... but it is quite awkward. As for the declaration, there is no way to accomplish that.
So, not to ask for the following syntax, but I would envisage something like the following for topic maps where attribute arguments are strings of multiple name tokens:
<xsl:key name="assocs" match="assoc" use-tokenized="@types | @other"/>
- create as many entries in table as tokens in all given strings
<xsl:variable name="assocs" select="key-tokenized('assocs',refs/@ref)"/>
- return as many entries from table as tokens in all given strings
Thanks!
.............. Ken
-- G. Ken Holman mailto:gkholman@xxxxxxxxxxxxxxxxxxxx Crane Softwrights Ltd. http://www.CraneSoftwrights.com/s/ Box 266, Kars, Ontario CANADA K0A-2E0 +1(613)489-0999 (Fax:-0995) Web site: XSL/XML/DSSSL/SGML/OmniMark services, training, products. Book: Practical Transformation Using XSLT and XPath ISBN 1-894049-06-3 Article: What is XSLT? http://www.xml.com/pub/2000/08/holman/index.html Next public instructor-led training: 2001-10-11,10-22,11-01,11-02, - 11-05,11-19,12-09,12-10
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] keys and idrefs - XSLT2 r, David Carlisle | Thread | RE: [xsl] keys and idrefs - XSLT2 r, DPawson |
RE: [xsl] unity transformation, Jarno . Elovirta | Date | Re: [xsl] Overlapping structures, Patrick Durusau |
Month |