| Join wMUsers | Blog at wMUsers | User Control Panel | Site Map | webMethods Jobs |For Employers |
![]() | ![]() |
![]() |
Introduction to XSLXSL (Extensible Stylesheet Language) is an XML-based language which converts XML documents into other formats including HTML, XML, or other styled documents. With all the characteristics of a programming language, XSL drastically reduces the effort required to represent XML data in a browser, a PDA device, or other medium. XSL is W3C sanctioned (http://www.w3c.org/Style/XSL/) and is actually comprised of three separate languages:
By using XSL, XML documents can be easily mapped to new schemas, reducing the effort required to pass information between different systems with different schemas.
XSLT TransformationsXSLT transformation is the process of converting a source tree -- the XSLT processor's representation of the source XML document -- into a result tree -- the XSLT processor's representation of the formatted target document. Source trees do not need to be read from file, either. Source trees can be read from local memory as a DOM. The same is true for result trees. Result trees can be written to memory and then later used as source trees for another process. There are several transformation scenarios:
In most cases, an XSLT processor strictly reads an input document into a source tree and then applies an XSLT stylesheet to generate a formatted output document. The above table just demonstrates that their are unending possibilities for "daisy-chaining" XSLT transformations. A Sample XSL DocumentXSL documents should not look foreign to users of XML or HTML. The self-describing nature of the document is the same, but the tags have their own meaning. Below is a sample XSL document for drawing horizontal lines and a brief description of the document's tags. XSL Tag Description
<xsl:stylesheet> -- The parent tag which encapsulates all the XSL tags.
Sample XSL Document<xsl:template name="drawHlines">
<xsl:param name="startY" select="240"/>
<xsl:param name="startYY" select="295"/>
<xsl:param name="YNumber" select="1"/>
<xsl:if test="($YNumber < 13)">
<xsl:value-of select="$YNumber * 10 "/>
<v:shape coordsize = "3460,2590"
filled = "f"
strokecolor = "#00c"
strokeweight = ".96pt"
path = "m3280,2174 l320,2174 e">
<xsl:attribute name="style">
<xsl:value-of select="concat('WIDTH: 3460px;
POSITION: absolute;
HEIGHT: ',$startY)"/>
</xsl:attribute>
<v:stroke joinstyle = "round" endcap = "round">
</v:stroke>
<v:fill></v:fill>
<v:path></v:path>
</v:shape>
<P class="Chart" id="p">
<xsl:attribute name="style">
<xsl:value-of select="concat('font-weight:normal;
FONT-SIZE: 7pt;
LEFT: 12.6pt;
WIDTH: 16.7pt;
POSITION:absolute;
text-align:center;',
'TOP:',$startYY)"/>
</xsl:attribute>
<xsl:value-of select="295 - $startYY"/>
</P>
<xsl:call-template name="drawHlines">
<xsl:with-param name="startY" select="$startY + 200"/>
<xsl:with-param name="startYY" select="$startYY - 25"/>
<xsl:with-param name="YNumber" select="$YNumber + 1"/>
</xsl:call-template>
</xsl:if>
</xsl:template>
Using the webMethods XSLT Module for XSLwebMethods offers an XSLT module for webMethods Integration Server v4.6 and higher. The following steps should be followed to download the package.
Launch Developer and confirm that the XSLT package is installed. It is named "XSLT". In the XSLT package, there are two main services:
Go Deeper on the Subject: The wMUsers Discussion Forums Prabhu Palanisamy is a Software Engineer working at Satyam Computer Services. He has in-depth knowledge in the areas of Web-based applications and B2B integration. He has strong passion for XML, XSL and has written various articles on the same.
Prabhu can be reached via email at |
| © All Rights Reserved, 2001-2008. |