A Developer’s Life is Never Simple


Earlier this month in our blog post on Comparing XML Schemas we showed a realistic – but simplified – example to illustrate a slick new feature of DiffDog 2010 to compare XML Schemas and update corresponding XML data files by generating XSL transformations.
A real-life XML developer’s project is rarely as small and straightforward as the example we used. In this post we will take a look at some typical complications developers face every day and how the Altova MissionKit cuts through complexity to enhance productivity.
Longer XML Schemas and Larger Mappings
Your XML Schemas are not likely to be as short and simple as the ones in our earlier post, and you will likely want to save your work while you are mapping your XML Schema migration. DiffDog lets you save your mapping in an XML Schema comparison file that you can reload later to continue your work, or to share with a colleague.
DiffDog Save XML Schema Comparison dialog
If you need to compare two XML Schemas on a regular basis, the XML Schema Comparison Document can be a valuable time saver.
Embedded XML Schema Assignment
The screen shot below shows the XML data file from our original example with one important difference. In this version the story element includes an embedded reference to the XML Schema on line 2.
XMLSpy XML Editor view
When we transform this file with the simple XSLT we created in DiffDog, the new XML data file will not include the updated XML Schema reference. In our earlier blog post embedded XML Schema references weren’t an issue because we used the XMLSpy Project / Properties menu option to assign default XML Schemas for each folder.
If there are many XML data files to transform, and they require embedded XML Schema references, we can take advantage of an additional feature of MapForce. We can export our mapping from DiffDog to MapForce, as we did in the earlier post, and then use the Component Settings dialog for the MapForce output component to include the XML Schema reference.
MapForce Component Settings dialog
Document Your Work
Developers can lose productivity trying to retrace history when a project needs additional work months or even years after an early iteration. The MapForce Generate Documentation feature can help us avoid this frustrating experience.
MapForce will document the mapping of each element in the XML Schemas in Microsoft Word, RTF, or HTML formats. Regardless which format we choose, the resulting document is an excellent stand-alone project artifact, or it can be further edited and included in a larger report.
MapForce Generate Documentation dialog
We can even combine the MapForce mapping documentation with full descriptions of each version of the XML Schema generated with the XMLSpy XML Schema Editor documentation feature.
Source/Version Control
Source/version control systems let teams of developers work closely together on the same project without a risk of overwriting each others’ changes. Because a version of the source code is saved at each stage of the design process, it is very easy to look at or revert to an earlier version when needed.
Altova has implemented the Microsoft Source Code Control Interface (MSSCCI) v1.1 – v1.3 in XMLSpy and tested support for many popular source control systems, so we can manage the files in our XML Schema evolution project across the development enterprise. Additionally, DiffDog can be integrated with source control systems as the default comparison tool. DiffDog can even generate differences report files in a variety of formats.
See for yourself how the tools in the Altova MissionKit can cut through the complexity of your own XML, Web Services, data integration, XML publishing, XBRL, and UML modeling development projects – download a free 30-day trial!

Tags: , , , , , , , ,

Curl up with a good book from the Altova library


Remember when a reference book was the only place to look up information? Today information is available at your finger tips, but there is still something to be said about turning the pages of good book. Altova products are highly regarded by authors of books focusing on XML and related technologies. Whether you need an overview of XML technologies or steps on how to transform XML files using XSLT, or want to delve into Web services, you’ll want to check out the Altova Reference Books page on our Web site.   These recently published books provide in-depth discussions on topics ranging from SOA and Web services interface design to dynamic Web application development; and many of the books include examples using XMLSpy and other tools available in the Altova MissionKit, our suite of XML, database, and UML tools.

Tags:

Comparing XML Schemas with DiffDog 2010


DiffDog 2010 includes a powerful new tool to compare XML Schemas that XML developers and others can use to update existing XML data files as XML Schemas evolve. This post takes a look at an example scenario for this feature.Before we drop into the new functionality, let’s take a quick look at two XML Schemas using the DiffDog File Compare feature. Of course, just like in previous versions, DiffDog 2010 users can compare XML Schemas as .xsd documents and display differences in a color-coded, XML-aware format.DiffDog file comparison view of XML Schemas This is a good way to identify and manage differences in XML Schemas, especially when you want to review revisions to industry-standard XML Schemas that evolve over time.What’s new in DiffDog 2010 is an additional XML Schema Differencing option that graphically displays two XML Schemas side by side, identifies identical elements automatically, and lets users map differences and generate XSL transformations to update XML data files.Here’s our first view when we open the same two XML Schemas shown in the file comparison above, using the new XML Schema Differencing feature.Initial DiffDog XML Schema Differencing view of XML Schemas The root elements of the two XML Schemas are automatically connected. We can click the Compare button in the toolbar to automatically connect identical elements in the two XML Schemas.DiffDog XML Differencing (Of course we could also select Compare XML Schemas from the right click context menu, or choose Start Comparison from the Diff and Merge menu, or press the F5 keyboard shortcut – DiffDog gives you many options to perform the same task, so you can work the way you like.)Next, we can map elements with different names in the two XML Schemas by manually connecting the pointer arrows between them. In this example most of the changes to the version of the XML Schema on the right simply give elements new names that will be more clear when the XML Schema and its data files are distributed through our enterprise.User-mapped XML Schemas in DiffDog XML Schema Differencing view When all the elements are mapped, we can generate an XSLT file to transform existing XML data files based on the XML Schema on the left to reflect revisions in the newer version on the right. This feature is designed to rescue XML developers from the tedious tasks of writing and debugging XSL transformations by hand.DiffDog Diff and Merge Menu Here is an example of an original XML data file based on the XML Schema on the left side, as viewed in Altova XMLSpy:XML data file viewed in XMLSpy The output file after applying the XSL transformation we created with DiffDog 2010 appears below. Note the substitution of the author element for writer, email for feedback, and so on.XSL output viewed in XMLSpy If there are many existing XML files that need to be transformed, the Project Management features of XMLSpy can help us automate the process. We can add external folders to an XMLSpy project.XMLSpy Project Helper Window Using the XMLSpy properties dialog for each project folder, we can assign default values to assign an XML Schema for validation, the XSL transformation, and the destination of the output.XMLSpy project folder properties dialog Now we can select the input folder in the XMLSpy Project helper window and transform all the files in it with the single-keystroke F10 shortcut.When we originally mapped the XML Schema elements in DiffDog, we left the publication element on the left side unconnected, since it had no corresponding element in the earlier version of the schema. That means when we transform XML input files using the XSLT, the resulting output will not contain the publication element. If publication is a required element, we can call on Altova MapForce for a quick solution.One of the options in DiffDog is to generate a MapForce mapping rather than XSLT. When we choose this option, MapForce launches with our DiffDog mapping already loaded as a new MapForce design, as shown below.MapForce New Design It’s easy to enhance the mapping by adding a constant as a default value for the publication element.MapForce enhanced design Now we can save an XSL file from MapForce that reuses all the element mappings we originally designed in DiffDog and adds the constant. When we apply the new XSL to transform our original XML data file, we get a result that includes the default value for the publication element.Final version of output viewed in XMLSpy This post started by describing the new XML Schema Comparison feature in DiffDog 2010. Fleshing out a simple – but typical – real-world example quickly highlighted additional tasks easily completed by taking advantage of tight integration with XMLSpy and MapForce.All three of these tools and more are available at substantial savings in the Altova MissionKit 2010, the integrated suite of XML, database, and UML tools designed to meet the diverse development and data management needs of today’s software architects and XML developers. Click here to download a free trial today!

Tags: , , , , , , , , ,