What is an XML transformation?

0

XML has strong methods to use or reuse data. The mechanism of reusing data is called transformation in extensible language (Extensible Stylesheet Language). The transformations are making the XML language really interesting. For example, after validating a data file, you will have the possibility to make a transformation to use the data in MS Office 2003, or you could make a marketing brochure to create a sales report.

You can use the transformations to exchange data between the backend systems, such as databases. For the moment, let’s suppose A stores sales data in a chart that works well for the sales department. B database stores data from incomes and expenses in a table structure adapted for the accounting department. The B database can use a transformation to accept data from A and to write the correct data.

 

The combination between the file and the transformation scheme is called an elementary XML system. The data file is validated according with the scheme, than it is reproduced. In this case, the transformation distributes data from a chart to a Web page.

A structure with an XML file and a transformation scheme

The next code example shows one of the methods to write a transformation. The code loads data <DOG> in a chart from a web page. The purpose of the example is not to show you how you could write in a transformation; it has to show you one of the forms that the transformation can take.

 

<?xml version=”2.1″?>

<xsl:style sheet version=”2.1″>

<TABLE>

<TR>

<TH>Nameofdog</TH>

<TH>Breedofdog</TH>

<TH>Ageofdog</TH>

<TH>OwnerLicense</TH>

<TH>Ownerdof</TH>

</TR>

<xsl:for-each select=”DOG”>

<TR ALIGN=”RIGHT” VALIGN=”BOTTOM”>

<TD>

<xsl:value-of select=”NAMEOFDOG”/>

</TD>

<TD>

<xsl:value-of select=”BREEDOFDOG”/>

</TD>

<TD>

<xsl:value-of select=”AGEOFDOG”/>

</TD>

<TD>

<xsl:value-of select=”LICENSEOFDOG”/>

</TD>

<TD>

<xsl:value-of select=”OWNEROFDOG”/>

</TD>

</TR>

</xsl:for-each>

</TABLE>

 

This example shows a type of transformation when it is coded. However, remember that you have the possibility to describe exactly what you want from the data in the English language. As an example, go to the IT department and say you want to print the sales charts for some regions in the next two years. “And it must look like this.” The IT department can write (or modify) a transformation so it could have the expected result.

What makes it even more convenient is the fact that Microsoft and other companies create transformations for any kinds of activities. I the future, you will be able to download a transformation that will meet all your necessities and it can also comply with any purpose. This means that XML will cost less in the future.

 

However, it will pass some time before the perfect transformation would be invented. For the moment, the software developers are trying to develop universal transformation. For example, they are trying to find a marketing transformation that will be able to extract the charts from any sales report.

 

If the developers would manage to create this perfect transformation code, the usage of XML will be extended. Practically, anyone would be able to use the XML language directly, without a complicated interface or IT support.

Leave a Reply

Your email address will not be published. Required fields are marked *