HTML

concerns

The HTML attribute function determines the transposition of the data into HTML specified via an XSL template.

 

Syntax

HTML(XSLT)

Return value

String

Parameter

Use

Name

Type

Passing

Description

Required

XSLT

String

ByVal

XSLT string for transposing the data

 

An example of an XSL template for a database table with fogging structure (not all columns are used in the template)

 

CUSTID         uniqueidentifier         Unchecked

CUSTSEARCHKEY      nvarchar(50)  Unchecked

CUSTIDENT    nvarchar(50)  Checked

CUSTDATECREATED   datetime        Checked

CUSTNAME     nvarchar(MAX)         Checked

CustStreetBuilding     nvarchar(MAX)         Checked

CustPlace      nvarchar(MAX)         Checked

CustZIP         nvarchar(50)  Checked

CustTelCentral         nvarchar(50)  Checked

 

<?xml version="1.0" encoding="UTF-8"?>

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:s="uuid:BDC6E3F0-6DA3-11d1-A2A3-00AA00C14882" xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882" xmlns:rs="urn:schemas-microsoft-com:rowset" xmlns:z="#RowsetSchema">

 

<xsl:template match="/">

 

<html>

<head>

<style media="screen" Type="text/css">

  a:link {color:#0066CC;} /* sets normal link color */

  a:visited {color:#0066CC;} /* sets visited link color */

  a:active {color:#336666;} /* sets active link color */

.CRM_CUST_DIV {width: 200px;float: left;margin: 10px;}

.CRM_CUST_TABLE {font-family: Arial, Helvetica, sans-serif;font-size: 14px;}

</style>

</head>

 

<body>

<table class="CRM_CUST_TABLE" border="0" style="">

<xsl:for-each select="xml/rs:data/z:row">

<tr>

    <td EntryID="{@CUSTID}" width="200px">

       <a href="{@CUSTID}"><xsl:value-of select="@CUSTSEARCHKEY"/></a>

    </td>

    <td EntryID="{@CUSTID}" width="200px">

       <xsl:value-of select="@CUSTNAME"/>

    </td>

    <td EntryID="{@CUSTID}" width="200px">

       <xsl:value-of select="@CustStreetBuilding" disable-output-escaping="no"/>

    </td>

    <td EntryID="{@CUSTID}" width="200px">

       <xsl:value-of select="@CustZIP"/>&#160;<xsl:value-of select="@CustPlace"/>

    </td>

    <td EntryID="{@CUSTID}" width="200px">

       <xsl:value-of select="@COUNTRY_NAME"/>

    </td>

    <td EntryID="{@CUSTID}" width="200px">

       <xsl:value-of select="@CustTelCentral"/>

    </td>

</tr>

</xsl:for-each>

</table>

</body>

</html>

 

</xsl:template>

</xsl:stylesheet>

 

The result of the transformation is the following HTML: