收藏订阅
XML Schema Comparison and Merging
DiffDog 2010 introduces a powerful new XML Schema comparison feature that goes far beyond the existing XML-aware comparison of the content of XSD files.
XML developers frequently need to modify and enhance XML Schemas as XML-based applications are designed. Similarly, users of industry-standard XML-based data exchange systems need to update XML file formats to remain compatible with evolving standards. When an XML Schema is modified, existing XML files likely also need to be modified to remain valid.
The new DiffDog 2010 Schema Comparison tool automatically maps schema elements, with a provision for manual override.
After comparing two XML Schemas, DiffDog 2010 users can generate an XSLT file that will transform existing XML documents for the new schema. A portion of the XSLT file for the example mapping is shown below. Any title element in the source XML file will be saved as a title element in the output (lines 7-11), and any feedback element in the source will be saved as an email element in the output (lines 12-16).
Alternatively, users can choose to generate an Altova MapForce mapping file between the schemas. The mapping file is fully editable for further refinement in MapForce. In the example above, the XML Schema on the right contains the publication element, with no corresponding element on the left. MapForce could supply a string constant to fill that value during transformation.
Options for left-to-right or right-to-left translations are available via a context menu in the DiffDog 2010 XML Schema comparison window.
DiffDog 2010 even lets users save the settings for an XML Schema comparison in a file for quick and convenient reuse, or to share with other development team members.
Database schema comparison and merging
DiffDog 2010 adds a new database schema comparison functionality similar to the description in the DatabaseSpy 2010 section above. Like DatabaseSpy 2010, DiffDog 2010 can compare two versions of databases of the same type, or two schemas from different database types.
DiffDog 2010 automatically matches database elements and allows for manual override via drag and drop mapping. Differences between the database schemas are identified by color shading.
In the example below, the columns named FirstName and LastName were mapped automatically, and MiddleInitial was manually mapped to MiddleInit.
DiffDog 2010 users can create database change scripts to merge differences in either direction. In our example the Oracle database on the right capitalized the table names Cars, CellPhones, and People, but the MySQL version on the left did not. The corresponding portion of the database change script generated by DiffDog 2010 is shown below.
All database schema merge options are available from a right-click context menu.
The context menu also offers an option to immediately open a database content comparison based on the database schemas. This makes DiffDog 2010 a single highly-productive database differencing tool to rapidly compare both database structures and database content.
DiffDog 2010 permits users to store all database schema comparison settings, including database connection information, in a file that can be quickly reloaded later. This is extremely useful for comparisons between development and production servers that need to be performed on an ongoing basis.
These database schema comparison files are interchangeable between DiffDog 2010 and DatabaseSpy 2010.
Pretty-print XML files before comparison
Many contemporary XML files are programmatically generated and delivered in a continuous stream without line breaks. Analyzing these files in a DiffDog XML file comparison window and merging differences can be difficult without reader-friendly formatting.
DiffDog 2010 adds a user preference to automatically pretty-print XML files as they are loaded to enable a more useful comparison result and create a more user-friendly display.