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

using recult-document

Subject: using recult-document
From: munna@xxxxxxxxxx
Date: Tue, 27 Jul 2004 09:05:55 -0500
recult
Hello all,
I have the following stylesheet which essentially performs an identity transform on a given xml instance, producing a copy with only slight changes (the e.g. below has one of these -- stripping out the concluding punctuation from element 'onlyNum' -- but the actual stylesheet will have more). I would like to produce another document that records these changes, at least as a list containing the original and changed node. this can be either text or xml, something on the lines of:
<onlyNum>E345.</onlyNum> changed to <onlyNum>E345</onlyNum>
I have a feeling this could be done with xsl:result-document, but am not sure how to proceed. Any suggestions would be most welcome. 

Thanks in advance,

Munna

-----------
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" indent="no" omit-xml-declaration="yes"/>

<xsl:template match="/|@*|node()">
<xsl:copy>
<xsl:apply-templates select="@*|node()"/>
</xsl:copy>
</xsl:template>

<xsl:template match="onlyNum">
	<onlyNum>
		<xsl:analyze-string select="." regex="^(\w+)(\s)*([.])(\s)*$" flags="m">
			<xsl:matching-substring>
				<xsl:value-of select="regex-group(1)" />
			</xsl:matching-substring>
		</xsl:analyze-string>
	</onlyNum>
</xsl:template>

</xsl:stylesheet>

----------------------------
-- 
___________________________________________________________
Sign-up for Ads Free at Mail.com
http://promo.mail.com/adsfreejump.htm

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

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.
Email
First Name
Last Name
Company
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.