Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion xpath sequence methods and subscripts
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Martin Honnen  
View profile  
 More options Feb 8 2011, 7:33 am
Newsgroups: mozilla.dev.tech.xml
From: Martin Honnen <mahotr...@yahoo.de>
Date: Tue, 08 Feb 2011 13:33:02 +0100
Local: Tues, Feb 8 2011 7:33 am
Subject: Re: xpath sequence methods and subscripts

rvj wrote:
> 1. anyone got an example of how to return the results of a sequence method
> such as tokenize ?

>      <assign var="?alltokens"  expr="tokenize('in the beginning') />

> 2. or how to return the second "token" - some kind of subscript on data??

>      <assign var="?secondtoken"  expr="data(tokenize('in the beginning'),2)
> />

I am not sure what technology you are trying to use. This is the Mozilla
newsgroup for XML. tokenize is a function supported in XPath and XSLT
2.0 and in XQuery 1.0 but as far as I know Mozilla does only support
XSLT and XPath 1.0 which does not know any sequences.

In XPath 2.0 to access the second item in the sequence $foo is simply
   $foo[2]
so
   tokenize('in the beginning', ' ')[2]
should give you the string 'the'.

--

        Martin Honnen
        http://msmvps.com/blogs/martin_honnen/


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.