[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: keys and idrefs - XSLT2 request?

Subject: RE: keys and idrefs - XSLT2 request?
From: "G. Ken Holman" <gkholman@xxxxxxxxxxxxxxxxxxxx>
Date: Tue, 09 Oct 2001 08:39:06 -0400
RE:  keys and idrefs - XSLT2 request?
At 01/10/09 13:05 +0100, DPawson@xxxxxxxxxxx wrote:
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?)

I've suggested tokenized access to the key tables in a letter to the XSL Editors a year ago (almost to the day). I've attached my contribution below.


...................... Ken

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


XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list



Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.