W3C home > Mailing lists > Public > www-xpath-comments@w3.org > January to March 2002

Something missing with XSLT and XPath

From: Lee Humphries <Lee_Humphries@softworks.com.au>
Date: Tue, 19 Feb 2002 17:31:21 -0500 (EST)
Message-ID: <426B71FE520A87419C9C4E1BBD2F18F2446A1D@swa02.softworks.lan.au>
To: <www-xpath-comments@w3.org>

I've been making fairly heavy use of XPath and XSLT for around a year
now.  But I've found what appears to be a hole in functionality that I
don't see fixed in version 2 of XPath or XSLT.

We have an interest in using the 'list' simpleType in XML Schemas, yet I
can't find any function to readily perform the tokenisation of any such
element or attribute. For example, we have an element that contains a
list of identifiers of varying formats, I want to be able to loop
through the list extracting each identifier in turn and processing it.
At present I've resorted to recursion, I call a template passing in the
list, the template extracts the first token, performs the required
action, and then calls itself with the remainder of the list.
Unfortunately this limits what I can do, as some XSLT processors won't
allow you to build up XML fragments within a variable if those XML
fragments are built within a new template scope (e.g. MSXML).  However,
I've also had need to do things like building up dictionaries from the
contents of elements - so it's not just lists of IDs or keys that I need
to be able to tokenise.

Ideally what I would like to see is some XPath string function that
allows you to identify a string to tokenise, a set of tokenising
characters and an index of the token desired (if there was some way of
easily working backwards through a set of tokens that would be really
handy also).  Alternatively, an XPath function that could be used within
the select in a for-each that results in iterating across the tokens.

Lee Humphries
email: Lee_Humphries@softworks.com.au
phone: +61-7 3511 7000
Level 1, 33 Park Road, Milton, Queensland 4066, Australia
Received on Wednesday, 20 February 2002 05:26:36 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:09:42 UTC