XML and ASP.NET

only for RuBoard

xsl:stylesheet or xsl:transform

The document element of a stylesheet, containing all other stylesheet elements.

Attributes

Attribute Name

Enforced

Description

Values

version

Required

The version of XSLT transformations the stylesheet uses. The current value is 1.0.

Number

id

Optional

A unique identifier to facilitate embedding stylesheets.

ID

extension-element prefixes

Optional

Specifies a namespace as an extension namespace.

White space separated list of NMTokens

exclude-element prefixes

Optional

Specifies the namespace URIs that are excluded from the result tree.

White space separated list of NMTokens .

case-order

Optional

Determines if strings will be sorted with uppercase first or lowercase first.

upper-first or lower-first . The default is lower- first (despite the documentation in MSDN to the contrary).

Example

The following is a complete stylesheet:

<?xml version="1.0" encoding="UTF-8" ?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="text" omit-xml-declaration="yes" /> <xsl:template match="/"> <xsl:for-each select="links/link"> <xsl:sort select="attribute::name" order="descending" case-order="lower-first" /> <xsl:value-of select="@name" /> <xsl:if test="position() != last()"> <xsl:text>,</xsl:text> </xsl:if> </xsl:for-each> </xsl:template> </xsl:stylesheet>

Parent Elements

None.

Child Elements

xsl:attribute-set, xsl:import, xsl:include, xsl:output, xsl:param, xsl:template, xsl:variable

only for RuBoard

Категории