Subject: Re: [xsl] is there a more elegant way to change page references? From: David Carlisle <davidc@xxxxxxxxx> Date: Mon, 28 May 2012 17:11:03 +0100 |
<ref><b>TG:</b>pp. 19, 20, 21, 29, 32, 40, 43, 44, 46, 56, 57, 58, 60, 61, 66, 67–68</ref>
<xsl:template match="ref[b='TG: ']"> <ref> <xsl:copy-of select="b"/> <xsl:analyze-string select="b/following-sibling::text()" regex="[0-9]+"> <xsl:matching-substring> <xsl:value-of select="number(.)+2"/> </xsl:matching-substring> <xsl:non-matching-substring> <xsl:value-of select="."/> </xsl:non-matching-substring> </xsl:analyze-string> </ref> </xsl:template> </xsl:stylesheet>
________________________________________________________________________ The Numerical Algorithms Group Ltd is a company registered in England and Wales with company number 1249803. The registered office is: Wilkinson House, Jordan Hill Road, Oxford OX2 8DR, United Kingdom.
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] is there a more elegant w, G. Ken Holman | Thread | [xsl] XSLT2.0 coding guidelines, Toshihiko Makita |
Re: [xsl] is there a more elegant w, G. Ken Holman | Date | Re: [xsl] Comparing direct ancestor, Spencer Tickner |
Month |