Design Article
Introduction to XML for engineering applications
Allen Razdow
11/28/2005 9:00 AM EST

Figure 1 XML uses tags to surround content, allowing the inclusion of metadata.
As you can see, the tags are surrounded by angle brackets, and can contain attributes such as the ID number, position, state and so on, that pertain to the content contained within the tag. Then there is the content itself, which is also contained within tags, some of which have cryptic names like "ml" (short for Math Language in this example).
The point is that if you know how information is marked up that is, what the available tags and attributes are for any type of document then you can tell a great many things about the content. You can determine its value, formatting, identifying numbers or other information without having available the original application that created it. And you can represent that same content in other ways by massaging the pieces, selecting just those that are relevant to the new application or bringing to the surface attributes that were hidden before.
Because XML documents are text-based, they are very portable, and can be read by a great many systems, from the simple search tools available on the average Windows desktop to sophisticated document repository databases. Getting the information into a portable form is the first benefit of XML.
What is a schema?
It should be clear by now that an XML document is not a stand-alone entity, nor is there only one flavor of XML. Any given XML-based file is only truly powerful in conjunction with its specified schema. A schema is a set of rules that specifies every type of information that can be represented in a particular kind of XML file. Any file in XML format will use the rules specified in its schema to represent a particular type of information.
Recognizing XML’s potential for calculation management in capturing the information surrounding engineering calculations on top of the results themselves the engineering industry is developing several schemas that support this information capture for better product development.
UnitsML, for example, is an emerging standard describing unit of length, area, volume, mass and other measures. No longer is a number in an electronic document at best a known quantity of mysterious unknown units. Seven what? Millimeters? Milligrams? Rads? Bits per second? Units can now be specified in XML and searched, indexed and retrieved on a desktop, on an intranet and across the Internet as units.
Mathsoft Engineering and Education, Inc. has developed and published a comprehensive XML-based schema for engineering, the Mathcad XML Information Architecture (XML-IA). Although XML schemas for math already exist, this new schema accounts for the peculiarities of applied math and engineering information, including parameters, units, results and annotations.
In addition, the new architecture has the facility to store an audit trail that remembers provenance where numbers are copied and pasted from, as well as any annotations entered when an equation is first created. All this information is carried along with calculations as they are copied and reworked from worksheet to worksheet, and can be inspected either inside or outside the originating system.
XML-IA is an open, non-proprietary data model that incorporates UnitsML and is readable by human engineers and their software, whether it is Mathsoft’s calculation software or any other vendor’s design, document management, database or product lifecycle management (PLM) application. The schema is for the benefit of engineering product development wherever it takes place even across multiple companies and systems and can be used with any software. It was deliberately designed to flexibly accommodate the many types of information that engineers and their management might wish to know about engineering designs.

