Subject: [xsl] xdiff. XML file comparison using xslt From: Dave Pawson <davep@xxxxxxxxxxxxx> Date: Sat, 10 Apr 2010 12:49:08 +0100 |
2010-04-10T12:39:24Z DaveP ideas on what an xdiff should do. HL requirement, to compare two XML files as being 'equal', using XSLT. KISS compare doc1, doc2 1. traverse the tree of doc1 in its entirity 2. for each element node: have access to doc2, same xpath access # children is the same order of children is the same # attributes is the same (irrespective of order) 3. for each attribute node have access to doc2, same xpath access check normalized space value is the same for doc2 4 for each text node have access to doc2, same xpath access check normalized space value is the same for doc2 5. for each comment - ignore 6. for each PI have access to doc2, same xpath access check name is the same check normalized space value is the same for doc2 At first error, report both node contents, xpath [line number] halt processing. For any node, inability to access the matching node in doc2 is deemed a failure. 'How' to be based on this. Thoughts? regards -- Dave Pawson XSLT XSL-FO docbook FAQ. http://www.dpawson.co.uk -- regards -- Dave Pawson XSLT XSL-FO FAQ. http://www.dpawson.co.uk
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Re: XML-MOZILLA Compatibi, Martin Honnen | Thread | Re: [xsl] xdiff. XML file compariso, David Carlisle |
Re: [xsl] Re: XML-MOZILLA Compatibi, Martin Honnen | Date | Re: [xsl] xdiff. XML file compariso, David Carlisle |
Month |