XSL References-from w3schools.com

XSLT Elements Reference

prev next


The XSLT elements from the W3C Recommendation (XSLT Version 1.0).


XSLT Elements

The links in the "Element" columns point to attributes and more useful information about the specific element.

  • NN : indicates the earliest version of Netscape that supports the tag
  • IE : indicates the earliest version of Internet Explorer that supports the tag

Note: All elements supported in IE 5.X may have NON-standard behavior, because IE 5.X was released before XSLT became a W3C Recommendation!

ElementDescriptionIENN
apply-importsApplies a template rule from an imported style sheet6.0
apply-templatesApplies a template rule to the current element or to the current element's child nodes5.06.0
attributeAdds an attribute5.06.0
attribute-setDefines a named set of attributes6.06.0
call-templateCalls a named template6.06.0
chooseUsed in conjunction with
 1<when> and <otherwise> to express multiple conditional tests  |  5.0  |  6.0   
 2comment  |  Creates a comment node in the result tree  |  5.0  |  6.0   
 3copy  |  Creates a copy of the current node (without child nodes and attributes)  |  5.0  |  6.0   
 4copy-of  |  Creates a copy of the current node (with child nodes and attributes)  |  6.0  |  6.0   
 5decimal-format  |  Defines the characters and symbols to be used when converting numbers into strings, with the format-number() function  |  6.0  |   
 6element  |  Creates an element node in the output document  |  5.0  |  6.0   
 7fallback  |  Specifies an alternate code to run if the processor does not support an XSLT element  |  6.0  |   
 8for-each  |  Loops through each node in a specified node set  |  5.0  |  6.0   
 9if  |  Contains a template that will be applied only if a specified condition is true  |  5.0  |  6.0   
10import  |  Imports the contents of one style sheet into another. **Note:** An imported style sheet has lower precedence than the importing style sheet  |  6.0  |  6.0   
11include  |  Includes the contents of one style sheet into another. **Note:** An included style sheet has the same precedence as the including style sheet  |  6.0  |  6.0   
12key  |  Declares a named key that can be used in the style sheet with the key() function  |  6.0  |  6.0   
13message  |  Writes a message to the output (used to report errors)  |  6.0  |  6.0   
14namespace-alias  |  Replaces a namespace in the style sheet to a different namespace in the output  |  6.0  |   
15number  |  Determines the integer position of the current node and formats a number  |  6.0  |  6.0   
16otherwise  |  Specifies a default action for the <choose> element  |  5.0  |  6.0   
17output  |  Defines the format of the output document  |  6.0  |  6.0   
18param  |  Declares a local or global parameter  |  6.0  |  6.0   
19preserve-space  |  Defines the elements for which white space should be preserved  |  6.0  |  6.0   
20processing-instruction  |  Writes a processing instruction to the output  |  5.0  |  6.0   
21sort  |  Sorts the output  |  6.0  |  6.0   
22strip-space  |  Defines the elements for which white space should be removed  |  6.0  |  6.0   
23stylesheet  |  Defines the root element of a style sheet  |  5.0  |  6.0   
24template  |  Rules to apply when a specified node is matched  |  5.0  |  6.0   
25text  |  Writes literal text to the output  |  5.0  |  6.0   
26transform  |  Defines the root element of a style sheet  |  6.0  |  6.0   
27value-of  |  Extracts the value of a selected node  |  5.0  |  6.0   
28variable  |  Declares a local or global variable  |  6.0  |  6.0   
29when  |  Specifies an action for the <choose> element  |  5.0  |  6.0   
30with-param  |  Defines the value of a parameter to be passed into a template  |  6.0  |  6.0   
31  
32
33
34* * *
35
36#  XSLT Functions 
37
38![Previous](http://www.w3schools.com/images/btn_previous.gif) ![Next](http://www.w3schools.com/images/btn_next.gif)
39
40* * *
41
42XSLT supplies a number of functions. 
43
44* * *
45
46##  XSLT Functions 
47
48**Name** |  **Description**  
49---|---  
50current()  |  Returns the current node   
51document()  |  Used to access the nodes in an external XML document   
52element-available()  |  Tests whether the element specified is supported by the XSLT processor   
53format-number()  |  Converts a number into a string   
54function-available()  |  Tests whether the function specified is supported by the XSLT processor   
55generate-id()  |  Returns a string value that uniquely identifies a specified node   
56key()  |  Returns a node-set using the index specified by an <xsl:key> element   
57system-property()  |  Returns the value of the system properties   
58unparsed-entity-uri()  |  Returns the URI of an unparsed entity   
59  
60
61
62* * *
63
64##  Inherited XPath Functions 
65
66You can also use ALL the XPath functions in XSLT.  Look at the XPath functions  .   
67
68
69* * *</xsl:key></choose></choose></otherwise></when>
Published At
Categories with Web编程
Tagged with
comments powered by Disqus