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

RE: How to Tag Several Words in a Given String

Subject: RE: How to Tag Several Words in a Given String
From: UlyLee <ulyleeka@xxxxxxxxx>
Date: Wed, 12 Oct 2005 02:32:06 -0700 (PDT)
how to tag
I actually had an idea on how to go around with this
but i dont how to properly code it in XSLT.

<String>Name1 and Name3 also Name4 Name5 but not
Name2</String>

<table>
<tr>
<td>Name1</td>
<td>ValidName1</td>
</tr>
<tr>
<td>Name3</td>
<td>ValidName3</td>
</tr>
<tr>
<td>Name4 Name5</td>
<td>ValidName4 ValidName5</td>
</tr>
</table>

* i'll assign first into a variable, validStr, all the
td[1] in table
* test if contents of String is equal to $validStr
* if true then i'll assign to a variable, match, the
sibling of the td[1] that matches $validStr[1]
* then call replace(String, $validStr[1], $match)
* then run this all over again but this time passing
the replaced string as new string to process and
remove the $validStr[1] in $validStr to avoid
repetition.

output should be:

<String><ValidName>ValidName1</ValidName> and
<ValidName>ValidName3</ValidName> also
<ValidName>ValidName4 ValidName5</ValidName> but not
Name2</String>

i hope that makes sense :D

-- UlyLee


		
__________________________________ 
Start your day with Yahoo! - Make it your home page! 
http://www.yahoo.com/r/hs

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