N1 Service Provisioning System 4.1 Reference Guide

The stylesheet transform Child Element

The <stylesheet> element is a child of the <transform> step, and specifies an XSLT transform to apply on the input source. At most one <stylesheet> element may appear as a child of a particular <transform> element, and they may not be used in conjunction with any other child elements.

The <stylesheet> element is an XSLT version 1.0 element as defined by the namespace “http://www.w3.org/1999/XSL/Transform”. Please see the XSLT specification at “http://www.w3.org/TR/xslt” for details. Note that only the XSLT <stylesheet> element is accepted as a child of the transform element. In particular, neither the XSLT synonym <transform> nor the simplified XSLT transform syntax described in section 2.3 of the XSLT specification are supported as children of the transform element.

The stylesheet element body may include substitution variable references so long as the body is still considered valid XSLT without first undergoing variable substitution.

When a <stylesheet> element is used as a transform, it is assumed that the input file is written in XML.

Example of the stylesheet Element

The following is an example of an XSLT transform.


<transform output="/etc/hosts">
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<xsl:for-each select="a" >
<xsl:value-of select="b"/>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>
</transform>