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

XSLT processor and substring-after

Subject: XSLT processor and substring-after
From: "N Zhou" <zhou_naijun@xxxxxxxxxxx>
Date: Wed, 13 Apr 2005 13:57:58 -0500
xsl substring
Hi,

I'm using XML::XSLT Perl module to transform XML data:
<gml:boundedBy>
 <gml:Box>
     <gml:coordinates>89,43 90,43.5</gml:coordinates>
</gml:Box>
</gml:boundedBy>

I want to split the 89,42 90, 43.5 to two substrings as :
<gml:boundedBy>
 <gml:Envelope>
     <gml:lowerCorner>89,43</gml:lowerCorner>
     <gml:upperCorner>90,43.5</gml:upperCorner>
</gml:Envelope>
</gml:boundedBy>

I tried substring-after but didn't get results (XML::XSLT returned blank):
<xsl:variable name="coords1" select="gml:boundedBy/gml:Box/gml:coordinates"/>
<gml:lowerCorner>
<xsl:value-of select="substring-before($coords1, ' ')"/>
</gml:lowerCorner>
<gml:upperCorner>
<xsl:value-of select="substring-after($coords1,' ')"/>
</gml:upperCorner>


Could anyone tell me why I cannot split the string: are there errors in my XSL; or, the module XML::XSLT does not support substring-after (it uses XPath1.3)? Anyone can recommend me another Perl module of XSLT processor?

Thank you very much!

n zhou

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.