only for RuBoard |
xsl:text outputs literal text that can be escaped depending on the value of the disable-output-escaping attribute.
Generally, it is considered bad form to disable output escaping to generate HTML tags such as <p> or <br> that do not require closing tags and should be avoided.
Attribute Name | Enforced | Description | Values |
---|---|---|---|
disable-output- escaping | Optional | Determines if the element will be output without escaping. The default is no . | yes or no |
Consider the following XML file, links.xml :
<?xml version="1.0" encoding="UTF-8" ?> <links> <link name="NewRiders.com" URL="http://www.newriders.com" /> <link name="Xmlandasp.net" URL="http://www.xmlandasp.net" /> <link name="MSDN Online Library" URL="http://msdn.microsoft.com/library" /> </links>
The following stylesheet can be applied to the XML file to generate brackets around each of the values specified:
<?xml version="1.0" encoding="UTF-8" ?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:template match="/"> <xsl:for-each select="links/link"> <xsl:text>[</xsl:text> <xsl:value-of select="@name" /> <xsl:text>]</xsl:text> </xsl:for-each> </xsl:template> </xsl:stylesheet>
This yields the following result:
<?xml version="1.0" encoding="UTF-16"?>[NewRiders.com][Xmlandasp.net][MSDN Online Library]
xsl:attribute, xsl:comment, xsl:copy, xsl:element, xsl:for-each, xsl:if, xsl:otherwise, xsl:param, xsl:processing-instruction, xsl:template, xsl:variable, xsl:when, xsl:with-param, output elements
None.
only for RuBoard |