|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Using xsl:analyze-string and regex to parse long
Rob Newman wrote:
Hi All, You seem to be trying to capture it all at once. But you are not taking into consideration the basic greediness of any regular expression (this is explained, for instance, on www.regular-expressions.info). Instead of trying to match it all at once, there's (in your case) a much simpler way to match this: <xsl:for-each select="tokenize($elValue, '\n')">
<xsl:for-each select="tokenize($elValue, '\s+')">
do your stuff
</xsl:for-each>
</xsl:for-each>You may want to put the second for-each in a variable, which makes for easy reference by index: <xsl:for-each select="tokenize($elValue, '\n')"> <xsl:variable select="tokenize($elValue, '\s+')" name="values" /> do your stuff with $values </xsl:for-each> HTH, Cheers, -- Abel
|
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








