- From: Kay, Michael <Michael.Kay@softwareag.com>
- Date: Wed, 20 Feb 2002 16:17:46 +0100
- To: "'Lee Humphries'" <Lee_Humphries@softworks.com.au>, www-xpath-comments@w3.org
- Cc: "'Anders Berglund'" <alrb@us.ibm.com>, "'Norman Walsh'" <ndw@nwalsh.com>
Issue 143 in the functions and operators document [1] refers to the requirement for a tokenize() function. Thank you for providing this use case which (in my view) helps to justify the requirement. [1] http://www.w3.org/TR/xquery-operators/#need-tokenize-function (Anders/Norm: could you cross-refer the issue to this mail item, please?) Mike Kay > -----Original Message----- > From: Lee Humphries [mailto:Lee_Humphries@softworks.com.au] > Sent: 19 February 2002 22:31 > To: www-xpath-comments@w3.org > Subject: Something missing with XSLT and XPath > > > Hi, > > 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. > > Regards, > Lee Humphries > SOFTWORKS Australia > 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 10:17:59 UTC