|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: XSLT processor and substring-after
Hi Jay,
Thank you very much! I think the path is correct, but my processor does not support XPath well. I'm usingXML::XSLT with a depedency on XML::Parser not on XPath. Do you know Perl XSLT module supporting XPath 1.0 or higher? I know Saxon but I prefer CGI script. The full source data: <?xml version="1.0" encoding="ISO-8859-1" ?> <wfs:FeatureCollection xmlns:wfs="http://www.opengis.net/wfs" xmlns:gml="http://www.opengis.net/gml"> <gml:boundedBy> <gml:Box srsName="epsg:4326"> <gml:coordinates>-89,43 -95,43</gml:coordinates> </gml:Box> </gml:boundedBy> </wfs:FeatureCollection> My XSL is: <?xml version='1.0' ?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:wfs="http://www.opengis.net/wfs" xmlns:gml="http://www.opengis.net/gml" xmlns:b="http://www.opengis.net/examples" xmlns="http://www.fgdc.gov/fgdc/gc" xmlns:saxon="http://icl.com/saxon"> <xsl:output method="xml" standalone="yes" omit-xml-declaration="no" encoding="ISO-8859-1"/> <xsl:template match="/"> <Points> <gml:boundedBy> <gml:Envelope> <xsl:variable name="coords1" select="wfs:FeatureCollection/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> </gml:Envelope> </gml:boundedBy> </Points> </xsl:template> </xsl:stylesheet> Thanks again. N Zhou From: JBryant@xxxxxxxxx Reply-To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx Subject: Re: XSLT processor and substring-after Date: Wed, 13 Apr 2005 14:48:00 -0500
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








