Not
Åtkomst till den här sidan kräver auktorisering. Du kan prova att logga in eller ändra kataloger.
Åtkomst till den här sidan kräver auktorisering. Du kan prova att ändra kataloger.
The document element of a style sheet containing <xsl:template> and <msxsl:script> elements. Synonym for <xsl:stylesheet>.
<xsl:transform
id = id
extension-element-prefixes = tokens
exclude-result-prefixes = tokens
version = number>
<!-- Content: (xsl:import*, top-level-elements) >
</xsl:transform>
Attributes
- id
A unique identifier that facilitates embedding style sheets.
- extension-element-prefixes
The namespace to be used as an extension namespace. The value is a white-space-separated list of namespace prefixes. The namespace bound to each of the prefixes is designated as an extension namespace. The default namespace (as declared byxmlns) can be designated as an extension namespace by including#defaultin the list of namespace prefixes. The designation of a namespace as an extension namespace is effective within the subtree of the style sheet rooted at the element bearing theextension-element-prefixes; a subtree rooted at an<xsl:stylesheet>element does not include any style sheets imported or included by children of that<xsl:stylesheet>element.
- exclude-result-prefixes
The namespace URI to be used as an excluded namespace. The value is a white-space-separated list of namespace prefixes. The namespace bound to each of the prefixes is designated as an excluded namespace. The default namespace (as declared byxmlns) may be designated as an excluded namespace by including#defaultin the list of namespace prefixes. The designation of a namespace as an excluded namespace is effective within the subtree of the style sheet rooted at the element bearing theexclude-result-prefixes; a subtree rooted at an<xsl:stylesheet>element does not include any style sheets imported or included by children of that<xsl:stylesheet>element.
- version
Required. The version of XSLT that the XSLT file requires. The value should be set to"1.0"for this version of XSLT.
Element Information
Number of occurrences |
One |
Parent elements |
(No parent elements) |
Child elements |
xsl:attribute-set, xsl:import, xsl:include, xsl:output, xsl:param, xsl:template, xsl:variable, msxsl:script |
Remarks
A synonym for the <xsl:stylesheet> element. This element can have a set of <xsl:template> elements representing different output templates. Processing begins by processing the root template, indicated by the pattern "/".
Example
This style sheet outputs a text string, and begins with <xsl:transform>, rather than <xsl:stylesheet>.
XML File (mymin.xml)
<?xml version='1.0'?>
<?xml-stylesheet type="text/xsl" href="helloxslt.xsl"?>
<myelem/>
XSLT File (helloxslt.xsl)
<?xml version='1.0'?>
<xsl:transform version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html"/>
<xsl:template match="/">
<html>
<body><p>Hello from XSLT!</p></body>
</html>
</xsl:template>
</xsl:transform>
Output
This is the formatted output:
Hello from XSLT!
This is the processor output:
<html> <body><p>Hello from XSLT!</p></body> </html>