Subject: Re: [xsl] how to ask analyze-string for only one match? From: Roger I Martin PhD <hypernexdev@xxxxxxxxxxxxxxx> Date: Wed, 25 Jan 2006 13:17:12 -0500 |
This stylesheet does what you asked. Of course, I can't see the rest of the stylesheet to see if there are any other issues, but this should be the seed you need.
<?xml version="1.0" encoding="UTF-8" ?>
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" indent="yes" />
<xsl:strip-space elements="*" />
<xsl:template match="/path"> <xsl:analyze-string select="@d" regex="^M (\d+ )(\d+ )"> <xsl:matching-substring> currentX=<xsl:value-of select="regex-group(1)"/>f; currentY=<xsl:value-of select="regex-group(2)"/>f; </xsl:matching-substring> </xsl:analyze-string> </xsl:template>
</xsl:stylesheet>
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] how to ask analyze-string, Roger I Martin PhD | Thread | Re: [xsl] how to ask analyze-string, Roger I Martin PhD |
Re: [xsl] Are whitespace text nodes, David Carlisle | Date | Re: [xsl] Quotes in a variable, Geert Josten |
Month |