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

Re: XSL - parsing a delimited string (URL)

Subject: Re: XSL - parsing a delimited string (URL)
From: web138p1 <web138p1@xxxxxxxxxxxxxxx>
Date: Thu, 23 Dec 2010 14:52:18 +0100
Re:  XSL - parsing a delimited string (URL)
> I have an XML element that might might be empty or might contain: 
> ;#http://www.blah.com/blah/blah2/blah.doc;# or: 
>
>
;#http://www.blah.com/blah/blah3/blah.doc;#http://www.blah.com/blah/blah/blah.doc;#
>
> How do I tokenize the string so that I can get only that first
occurrence?
> That is, only the first URL (if any) between the delimiters ... ? 


Only first occurence ==> no recursion needed.

$ cat data.xml
<data>;#http://www.blah.com/blah/blah3/blah.doc;#http://www.blah.com/blah/blah4/blah.doc;#</data>
$
$ xpath++ "substring-before(concat(substring-after(.,';#'),';#'),';#')"
data.xml
http://www.blah.com/blah/blah3/blah.doc
$


Mit besten Gruessen / Best wishes,

Hermann Stamm-Wilbrandt
Developer, XML Compiler, L3
Fixpack team lead
WebSphere DataPower SOA Appliances
----------------------------------------------------------------------
IBM Deutschland Research & Development GmbH
Vorsitzender des Aufsichtsrats: Martin Jetter
Geschaeftsfuehrung: Dirk Wittkopp
Sitz der Gesellschaft: Boeblingen
Registergericht: Amtsgericht Stuttgart, HRB 243294

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.