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

Re: Converting individual words in a string to nodes

Subject: Re: Converting individual words in a string to nodes
From: "Dimitre Novatchev" <dnovatchev@xxxxxxxxx>
Date: Thu, 26 Apr 2007 06:34:52 -0700
Re:  Converting individual words in a string to nodes
FXSL provides this with the str-split-to-words template:


http://www.biglist.com/lists/xsl-list/archives/200501/msg01223.html




--
Cheers,
Dimitre Novatchev
---------------------------------------
Truly great madness cannot be achieved without significant intelligence.
---------------------------------------
To invent, you need a good imagination and a pile of junk
-------------------------------------
You've achieved success in your field when you don't know whether what
you're doing is work or play



On 4/26/07, Andy Carr1 <CARRA@xxxxxxxxxx> wrote:
I am using XSLT 2.0 to transform a WordML document and have run into a
spot of trouble.

I have a / delimited string and need to create a node for each word in the
string.



WordML snippet:
<w:p>
  <w:r>
     <w:t>UK/England/Yorkshire/Hull</w:t>
  </w:r>
</w:p>

needs to be output as:

<NodeSet>
  <PlaceNode>UK</PlaceNode>
  <PlaceNode>England</PlaceNode>
  <PlaceNode>Yorkshire</PlaceNode>
  <PlaceNode>Hull</PlaceNode>
</NodeSet>

The number of words in the string is unlimited.

I can tokenize the string and count the number of words in the string, but
I can't create a node for each word and it is really frustrating.

Can anyone help?

Regards
Andy

Andy Carr
Senior IT Specialist
Tel: Internal - 298037 External - 01252 558037
Mail Point  M1C IBM Application Services
Meudon House, Meudon Avenue, Farnborough, GU14 7NB
(Notes) Andy Carr1/UK/IBM@IBMGB
(Internet)CARRA@xxxxxxxxxx






Unless stated otherwise above: IBM United Kingdom Limited - Registered in England and Wales with number 741598. Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU

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.