Home Search

DriveWorks Pro 21
How To: Create an XML Transform (KB12121008)

Send Feedback

How To: Create a Simple XSL Transform

Paste the following into Notepad and save it as an .XSL file.

Example XSL Document
<?xmlversion="1.0"?>
<xsl:stylesheetxmlns:xsl="http://www.w3.org/1999/XSL/Transform"version="1.0">
<xsl:templatematch="/Document">
<html>
<head>
<styletype="text/css">
* {
font-family: arial, verdana; }
h1 {
font-size: 18pt;
color: #0000ff;
}
h2 {
font-size: 12pt;
color: #ff0000;
}
h3 {
font-size: 24pt;
color: #009900;
}
</style>
</head>
<body>
<h1>MY XML PAGE</h1>
<h2>This is field 1's value -<xsl:value-ofselect="Field[@id='Field1']"/></h2>
<h1>This is field 2's value -<xsl:value-ofselect="Field[@id='Field2']"/></h1>
<h3>This is field 3's value -<xsl:value-ofselect="Field[@id='Field3']"/></h3>
</body>
</html>
</xsl:template>
</xsl:stylesheet>

This can then be displayed in your web browser by opening the .xml file.

XML
Display


Knowledge Base Article Ref:KB12121008