Online XSLT tester v0.4

procInfo






What is XSLT?

XSLT is a language for transforming XML documents into other documents such as XML, HTML and many other.

XSLT 2.0 introduced a host of new features:
- Strong typing and all XSD types
- The ability to define and write own functions
- node-set() - replaces XSLT's 1.0 Result Tree Fragment, creating fully functional tree
- New functions and operators:
- - XPath 2.0
- - String processing and regular expressions
- - Grouping (for-each-group function) - - String processing
- - Sequence type

XSLT 3.0 further improved the formula:
- Streaming tranformations (previously file had to be loaded to memory to be processed)
- Packages - improve the modularity of large stylesheets
- Improved error handling (for example <xsl:try>)
- Support for maps and arrays, enabling XSLT to handle JSON as well as XML
- Functions can now be arguments to other (higher-order) functions

XSLT 1.0, 2.0 & 3.0 functions

[v1.0] <xsl:template> - defines a set of rules to be applied to specified node.
[v1.0] <xsl:apply-templates> - applies a template rule to the current element or to element's child nodes.
[v1.0] <xsl:apply-imports> - Applies a template rule from an imported style sheet
[v1.0] <xsl:apply-templates> - Applies a template rule to the current element or to the current element's child nodes
[v1.0] <xsl:call-template> - Calls a named template [v2.0] <xsl:next-match> - overrides another template rule (considers all other template rules of lower import precedence/priority)
[v3.0] <xsl:mode> - Allows properties of a mode to be defined
[v3.0] <xsl:override> - Allows using package to override selected components from a used package
[v3.0] <xsl:package> - Defines a set of stylesheet modules that can be compiled as a unit
[v3.0] <xsl:accept> - Allows a package to restrict the visibility of components exposed by a package
[v3.0] <xsl:global-context-item> - Declares whether a global context item is required, and if so, to declare its required type
[v1.0] <xsl:for-each> - Loops through each node in a specified node set
[v1.0] <xsl:if> - Contains a template that will be applied only if a specified condition is true
[v1.0] <xsl:choose> - Used in conjunction with <when> and <otherwise> to express multiple conditional tests
[v1.0] <xsl:when> - Specifies an action for the <choose> element
[v1.0] <xsl:otherwise> - Specifies a default action for the <choose> element
[v2.0] <xsl:for-each-group> - Groups elements and performs operations once for each group
[v3.0] <xsl:iterate> - Used to iterate over a sequence, with the option to set parameters for use in the next iteration
[v3.0] <xsl:break> - Causes premature completion before the entire input sequence has been processed
[v3.0] <xsl:next-iteration> - The contents are a set of xsl:with-param elements defining the values of the iteration parameters to be used on the next iteration
[v3.0] <xsl:on-completion> - Defines processing to be carried out when the input sequence is exhausted
[v3.0] <xsl:fork> - The result of the xsl:fork instruction is the sequence formed by concatenating the results of evaluating each of its contained instructions, in order
[v3.0] <xsl:on-empty> - Outputs the enclosed content only if the containing sequence generates no "ordinary" content
[v3.0] <xsl:on-non-empty> - Outputs the enclosed content only if the containing sequence also generates "ordinary" content
[v3.0] <xsl:try> - Allows recovery from dynamic errors occurring within the expression it wraps
[v3.0] <xsl:catch> - In conjunction with xsl:try, handles dynamic errors
[v3.0] <xsl:context-item> - Used to declare the initial context item for a template
[v1.0] <xsl:attribute> - Adds an attribute
[v1.0] <xsl:attribute-set> - Defines a named set of attributes
[v1.0] <xsl:copy> - Creates a copy of the current node (without child nodes and attributes)
[v1.0] <xsl:number> - Determines the integer position of the current node and formats a number
[v1.0] <xsl:value-of> - Extracts the value of a selected node
[v1.0] <xsl:text> - Writes literal text to the output
[v1.0] <xsl:comment> - Creates a comment node in the result tree
[v1.0] <xsl:processing-instruction> - Writes a processing instruction to the output
[v1.0] <xsl:key> - Declares a named key that can be used in the style sheet with the key() function
[v1.0] <xsl:decimal-format> - Defines the characters and symbols to be used when converting numbers into strings, with the format-number() function
[v1.0] <xsl:preserve-space> - Defines the elements for which white space should be preserved
[v1.0] <xsl:strip-space> - Defines the elements for which white space should be removed
[v1.0] <xsl:sort> - Sorts the output
[v1.0] <xsl:output> - Defines the format of the output document
[v2.0] <xsl:for-each-group> - Sorts given sequence
[v2.0] <xsl:result-document> - Creates a final result tree
[v2.0] <xsl:character-map> - Allows a specific character appearing in the final result tree to be substituted by a specified string of characters
[v2.0] <xsl:output-character> - Defines characters and their replacements to be used by character-map
[v3.0] <xsl:merge> - Merges two or more pre-sorted input files
[v3.0] <xsl:merge-action> - Defines action to be carried out on each merged group
[v3.0] <xsl:merge-key> - Used to define the merge keys on which the input sequences are sorted
[v3.0] <xsl:merge-source> - Describes the input source for an xsl:merge instruction
[v1.0] <xsl:stylesheet> - Defines the root element of a style sheet
[v1.0] <xsl:transform> - Defines the root element of a style sheet
[v1.0] <xsl:import> - Imports the contents of one style sheet into another. Note: An imported style sheet has lower precedence than the importing style sheet
[v1.0] <xsl:include> - Includes the contents of one style sheet into another. Note: An included style sheet has the same precedence as the including style sheet
[v1.0] <xsl:namespace-alias> - Replaces a namespace in the style sheet to a different namespace in the output
[v1.0] <xsl:element> - Creates an element node in the output document
[v1.0] <xsl:param> - Declares a local or global parameter
[v1.0] <xsl:variable> - Declares a local or global variable
[v1.0] <xsl:with-param> - Defines the value of a parameter to be passed into a template
[v1.0] <xsl:copy-of> - Creates a copy of the current node (with child nodes and attributes)
[v2.0] <xsl:document> - Creates a new document node
[v2.0] <xsl:namespace> - Creates a namespace node
[v2.0] <xsl:namespace-alias> - Declares that a literal namespace URI is being used as an alias for a target namespace URI
[v2.0] <xsl:sequence> - Constructs a sequence of nodes and/or atomic values
[v2.0] <xsl:analyze-string> - Identifies substrings that match given regex
[v2.0] <xsl:matching-substring> - Used in conjunction with analize-string, returns matching substrings
[v2.0] <xsl:non-matching-substring> - Used in conjunction with analize-string, returns substrings that didn't match the regex
[v2.0] <xsl:function> - Declares a function that can be called from any XPath expression in the stylesheet
[v3.0] <xsl:evaluate> - Allows dynamic evaluation of XPath expressions from a string
[v3.0] <xsl:assert> - Asserts a XPath expression, optionally throwing a dynamic error
[v1.0] <xsl:message> - Writes a message to the output (used to report errors)
[v1.0] <xsl:fallback> - Specifies an alternate code to run if the processor does not support an XSLT element
[v3.0] <xsl:map> - Used to construct a new map
[v3.0] <xsl:map-entry> - Used to construct a singleton map (one key and one value)
[v3.0] <xsl:expose> - Used to modify the visibility of selected components within a package
[v3.0] <xsl:accumulator> - Defines a rule that is to be applied while the document is being sequentially processed
[v3.0] <xsl:accumulator-rule> - Defines a rule for an xsl:accumulator
Streaming: (not usable on this website!) [v3.0] <xsl:source-document> - Initiates streamed or unstreamed processing of a source document
[v3.0] <xsl:use-package> -
[v3.0] <xsl:where-populated> - Allows conditional content construction to be made streamable
Packages: (not usable on this website!) [v3.0] <xsl:accept> - Allows a package to restrict the visibility of components exposed by a package that it uses