xsl:text

only for RuBoard

xsl:text

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.

Attributes

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

Example

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] 

Parent Elements

 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 

Child Elements

None.

only for RuBoard


XML and ASP. NET
XML and ASP.NET
ISBN: B000H2MXOM
EAN: N/A
Year: 2005
Pages: 184

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net