Subject: Re: [xsl] xdiff. XML file comparison using xslt From: David Carlisle <davidc@xxxxxxxxx> Date: Sat, 10 Apr 2010 13:17:03 +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
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] xdiff. XML file comparison us, Dave Pawson | Thread | [xsl] mixed content grouping by whi, James Cummings |
[xsl] xdiff. XML file comparison us, Dave Pawson | Date | Re: [xsl] Create Table, Eric J. Bowman |
Month |