|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: coodinate tranformation
Hi,
> e.g I have:gml:coordinates>0 50, 70 60, 80 90</gml:coordinates>
> select="saxon:tokenize(*/gml:coordinates, '\s')"
> the current result: <path d="0 50, 70 60, 80 90"/>
> how can I obtain: <path d="M0 50, L 70 60, L 80 90" />
Assuming there are three coordinates then the following XSL should do it:
<xsl:variable name="v" select="*/gml:coordinates"/>
<xsl:variable name="vRest" select="substring-after($v, ',')"/>
<xsl:value-of select="concat(
'M',
substring-before($v, ','),
', L',
substring-before($vRest, ','),
', L',
substring-after($vRest, ',')
)"/>
Hope that helps,
George
-------------------------------------------------------
George Cristian Bina mailto:george@xxxxxxxxxxxxx
<oXygen/> XML Editor and XSLT Editor/Debugger
http://www.oxygenxml.com/
|
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








