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

Comparing 2 XML Documents

Subject: Comparing 2 XML Documents
From: "Fraser Goffin" <goffinf@xxxxxxxxxxx>
Date: Wed, 09 Nov 2005 12:28:47 +0000
comparing 2 xml documents
Does anyone know a good way of comparing aspects of two XML instance documents using XSLT. The number of possible differences may be large so I would prefer not to have to create a hard coded test for each e.g. would prefer not to do this :-

<xsl:variable name="foo" select="document('foo.xml')"/>

<xsl:template match="Person">

<xsl:if test="FName = $foo/Person/FNamel"> .. report mis-match .. </xsl:if>
<xsl:if test="MiddleInitial = $foo/Person/MiddleInitial"> .. report mis-match .. </xsl:if>
<xsl:if test="LName = $foo/Person/LName"> .. report mis-match .. </xsl:if>
....


</xsl:template>

... gzillions of other templates and tests ...

Am I barking up the wrong tree here trying to do this sort of thing in XSLT ??

Cheers

Fraser.

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.