Example XSLT Template

To use a user-defined template in a transformation map, create an XSLT style sheet file containing a single named template and import this file into the Sybase project where your transformation service resides.

Example template:

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

<xsl:stylesheet version="1.0" 

 xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:output method="xml"/>

          <xsl:template name="DateTemplate">

                  <year>

                              <xsl:value-of select="Year"/>

                  </year>

                  <month>

                               <xsl:value-of select="Month"/>

                   </month>

                   <day>

                               <xsl:value-of select="Day"/>

                   </day>

          </xsl:template>

</xsl:stylesheet>
Related tasks
Mapping with a User-Defined XSLT Template

Send your feedback on this help topic to Sybase Technical Publications: pubs@sybase.com

Your comments will be sent to the technical publications staff at Sybase, Inc. For product-related issues or technical support, contact Sybase Technical Support at 1-800-8SYBASE.