Problem solve Get help with specific problems with your technologies, process and projects.

Using XML as a common source for middleware and front-end transactions

What is the common theme among Web services, Web Methods, and .NET? It's XML, of course.

What is the common theme among Web services, Web Methods, and .NET? It's XML, of course. The world of ERP and enterprise software seems to be going the way of the XML document. Whether you are mapping IDOCS via XML for batch processing or making synchronous XML calls via a Web service, the XML document is here to stay.

At this point, much of the focus for XML has remained on backend, business-to-business transactions. Wouldn't it be great to use XML as a common source for middleware and front-end transactions, as well? I have been asked this question numerous times, so I thought I would throw out one possible medium and suggest a few tool implementations to do so. If you haven't guessed already, I am talking about XML stylesheets or XSLT.

XSLT describes a mechanism for transformation XML documents into other documents formats using a stylesheet. Stylesheets can transform XML documents into a wide variety of plain text document formats, but the most popular is XML to HTML transformation. If your company is already using XML for inter-system communication, XSLT brings that information out to a cohesive user interface via a Web browser. If your company requires a single data source, multiple output solution, then XML and XSLT might be the optimal combination. Here is a quick example:

This is the original XML document:

<?xml version="1.0" encoding="UTF-8"?>
<ejsap title="EJSAP Title">
  <ejsap-data title="EJSAP">
    <p>Welcome to Ejsap</p>

This is the XML Stylesheet:

<?xml version="1.0"?>

<xsl:stylesheet xmlns:xsl="" version="1.0">
  <xsl:output method="html" indent="yes"/>
  <xsl:template match="ejsap">
      <head><title><xsl:value-of select="@title"/></title></head>
        <xsl:apply-templates select="ejsap-data"/>

  <xsl:template match="ejsap-data">
    <b><xsl:value-of select="@title"/></b>

The output looks like this:
---Web output--- 
Welcome to Ejsap 
---End output--- 

Not terribly exciting, but it shows the division between data and display when using a standard XML data source and a stylesheet. XSLT demonstrates the power of a common data source for multiple outputs within an organization. One of the greatest challenges faced for the SAP middleware developer is access to the vast amount of data stored in SAP. By combining readily available tools such as webMethods with open source XSLT implementations such as Xalan, your company can reap the benefit of XML, regardless of the application tier you are working on. The Apache group provides a great set of Java tools to implement XSLT in your SAP/Java applications. Check out Xalan for more information and downloads. They also have a great links section, here.

Author Austin Sincock is a freelance Java/SAP consultant who contributes regularly to Web and print journals. He can be reached at Check out his upcoming book Enterprise Java for SAP.

Dig Deeper on SAP ABAP

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.