Reputation: 2235
I have 2 different xsd for same request. one is latest version while the other one is older version. I want to compare 2 xsd's.
I used Liquid XML tool to generate the XML but the generated xml tells that the 2 xsds are TOTALLY different, which i believe is not possible. either my approach is wrong or the xsds are really different.
could you guys suggest me the best practice to compare 2 xsds?
Upvotes: 4
Views: 7314
Reputation: 21638
QTAssistant has an XSD-aware compare feature, that is part of the XML Schema Refactoring (XSR) module; Being XSD-aware, it sometimes surprises people that are rather used to file-based comparison, be that compare text or XML-aware.
QTAssistant doesn’t actually compare XSD files; instead, it compares “compiled” sets of XSD files. So, if someone decides to simply split an XSD in two files, linked together using an <xsd:include/>, and then compare these two sets, the result would come back as “identical”. A good example is the ACORD standard, which changed its way of releasing XSDs. Below is an example showing 2.21 vs. 2.26 releases organized as sets in QTAssistant...
... and the relationships between files in release 2.21 (uses <xsd:include/>s).
Another example: if a minOccurs or maxOccurs=”1” attribute is removed between versions, this difference won’t be flagged since these 1s are default values anyway…
Other interesting feature is the granularity provided by the diff report...
In addition to have the result available at the level of each XSD component, it is also split in two: one result, Status, for whether the schema component was materially changed directly (below the LastRaceDate was "replaced" with a choice between LastRaceDate and LastDatePartialDate)...
... and another, Extended Status, that considers an impact analysis based on dependencies (below the attribute was changed from mandatory to optional).
The report can be exported, for further integration with other tools.
Upvotes: 1
Reputation: 75609
Oxygen has an XML comparison tool.
Alternatively, you can pretty-print both XSDs and compare them using diff or TortoiseMerge or something like that.
Upvotes: 0