xsl:element

only for RuBoard

xsl:element

xsl:element creates an output element.

Attributes

Attribute Name

Enforced

Description

Values

Name

Required

The name of the element to output.

QName

namespace

Optional

The character used for a decimal sign. The default is a period ( . ).

URI Reference

use-attribute-sets

Optional

The character used as a grouping (for example, thousands) separator. The default is a comma (,).

QNames

Example

Given the following XML instance document, links.xml :

 <?xml version="1.0" encoding="utf-8" ?>  <links>       <link id="newriders" URL="http://www.newriders.com" name="NewRiders.com"  description="Available books by New Riders" />  </links> 

The following template rule generates an anchor tag:

 <xsl:template match="link">       <xsl:element name="a">            <xsl:attribute name="href">                 <xsl:value-of select="@URL"/>            </xsl:attribute>            <xsl:value-of select="@name" />       </xsl:element>  </xsl:template> 

This results in the following markup:

 <a href="http://www.newriders.com">NewRiders.com</a> 

Parent Elements

 xsl:copy, xsl:element, xsl:for-each, xsl:if, xsl:otherwise, xsl:param,  xsl:template, xsl:variable, xsl:when, xsl:with-param, output elements 

Child Elements

 xsl:apply-templates, xsl:attribute, xsl:call-template, xsl:choose,  xsl:comment, xsl:copy, xsl:copy-of, xsl:element, xsl:for-each, xsl:if,  xsl:processing-instruction, xsl:text, xsl:value-of, xsl:variable, output  elements 
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