[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: is there a more elegant way to change page refere

Subject: Re: is there a more elegant way to change page references?
From: David Carlisle <davidc@xxxxxxxxx>
Date: Mon, 28 May 2012 17:11:03 +0100
Re:  is there a more elegant way to change page  refere
On 28/05/2012 16:42, Terry Ofner wrote:
<ref><b>TG:</b>pp. 19, 20, 21, 29, 32, 40, 43, 44, 46, 56, 57, 58, 60, 61, 66, 67&#8211;68</ref>

<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:template match="ref[b='TG: ']">
<xsl:copy-of select="b"/>
<xsl:analyze-string select="b/following-sibling::text()" regex="[0-9]+">
 <xsl:value-of select="number(.)+2"/>
<xsl:value-of select="."/>


$ saxon9 ref.xml ref.xsl
<?xml version="1.0" encoding="UTF-8"?><ref><b>TG: </b>pp. 21, 22, 23, 31, 34, 42, 45, 46, 48, 58, 59, 60, 62, 63, 68, 6970</ref>


________________________________________________________________________ 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.

This e-mail has been scanned for all viruses by Star. The service is
powered by MessageLabs. ________________________________________________________________________

Current Thread


Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
First Name
Last Name
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.