Wrox Programmer Forums
Go Back   Wrox Programmer Forums > XML > XSLT
|
XSLT General questions and answers about XSLT. For issues strictly specific to the book XSLT 1.1 Programmers Reference, please post to that forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XSLT section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 30th, 2006, 03:15 PM
Authorized User
 
Join Date: Apr 2006
Posts: 51
Thanks: 0
Thanked 0 Times in 0 Posts
Default compare two xml documents

hi,
I am converting from one XML file to another XML file using XSLT. The content is the same, I am just renaming some of the tags.
How can I compare the content only between 2 XML files. I want to make sure no content is lost between both conversion.

Any ideas, please.

Thanks,
Bill

 
Old October 30th, 2006, 03:33 PM
mhkay's Avatar
Wrox Author
 
Join Date: Apr 2004
Posts: 4,962
Thanks: 0
Thanked 292 Times in 287 Posts
Default

Since the string value of a document node is the concatenation of all the text nodes, you could just do a string compare between the document nodes, i.e. string($doc1) = string($doc2)

Michael Kay
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference





Similar Threads
Thread Thread Starter Forum Replies Last Post
how to compare two word documents using full text connect2sandep SQL Server 2005 1 October 7th, 2008 07:26 AM
How to merge two xml documents together? NewToXSL Pro VB.NET 2002/2003 2 August 22nd, 2008 05:28 AM
merging 2 xml documents espider4u XSLT 0 August 31st, 2004 11:48 AM
merge 2 xml documents Beulah VS.NET 2002/2003 0 November 20th, 2003 09:33 PM
Referencing multiple XML documents... qornboy XML 3 October 9th, 2003 09:40 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.