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

Re: regd String Tokeniser

Subject: Re: regd String Tokeniser
From: "cutlass" <cutlass@xxxxxxxxxxx>
Date: Mon, 15 Apr 2002 12:47:51 +0100
string tokeniser in java
Hello William,

----- Original Message -----
From: "william locksman" <vsd18@xxxxxxxxxxxxxx>
> hi my question is regarding the String tokenizer function of java.
> I am making use of the String Tokenizer
> in the following way
>
> Statement : 1
>
> <xsl:variable name = "tokens" select =
> "java:util.StringTokenizer.new($MyString,',')"/>



> in analogy to java , where i give a statement like
>
> Statement : 2
>
> StringTokenizer strTokeniser = new StringTokenizer(str,
> token,false);
>
> and then go through each of the token in a loop.
>
> now ho do i do the same with Statement : 1 that is thro xsl

u could use xslt for the job also....
http://www.exslt.org/str/functions/tokenize/index.html


> after the Statement : 1 is executed what will i have in the
> variable $tokens ??

u will have a bunch of xml data .....stored in a variable. eg.
<token>see</token><token>spot</token><token>run</token>

> and how do i iterate throgh the tokens??
just like any other xml ( though remember if u have an RTF, u will have to
use any of the common extension functions to make it a nodeset for
processing ).


u could iterate by using <xsl:for-each/> or match templates.....

maybe giving us an example string and form of processing.

cheers, jim fuller




 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-2011 All Rights Reserved.