In the case of an attribute value template , this applies to the effective value obtained when the attribute value template is expanded. Unless the element is required to be empty, the model element contains a comment specifying the allowed content. The allowed content is specified in a similar way to an element type declaration in XML; sequence constructor means that any mixture of text nodes, literal result elements , extension instructions , and XSLT elements from the instruction category is allowed; other-declarations means that any mixture of XSLT elements from the declaration category, other than xsl:import , is allowed, together with user-defined data elements.
The element is prefaced by comments indicating if it belongs to the instruction category or declaration category or both. The category of an element only affects whether it is allowed in the content of elements that allow a sequence constructor or other-declarations. This example illustrates the notation used to describe XSLT elements.
This example defines a non-existent element xsl:example-element. The element is classified as an instruction. The content of an xsl:example-element instruction is defined to be a sequence of zero or more xsl:variable and xsl:param elements, followed by an xsl:sequence element.
Attributes are validated as follows.
These rules apply to the value of the attribute after removing leading and trailing whitespace. If the processor is able to detect the error statically for example, when any XPath expressions within the curly brackets can be evaluated statically , then the processor may optionally signal this as a static error. Special rules apply if the construct appears in part of the stylesheet that is processed with forwards-compatible behavior : see 3.
The use of this term implies that stylesheet authors should not use the construct, and that the construct may be removed in a later version of this specification. The syntax summaries described in this section are normative. XSLT defines a set of standard functions which are additional to those defined in [Functions and Operators]. The signatures of these functions are described using the same notation as used in [Functions and Operators]. The names of these functions are all in the standard function namespace. This document does not specify any application programming interfaces or other interfaces for initiating a transformation.
This section, however, describes the information that is supplied when a transformation is initiated. Except where otherwise indicated, the information is required. Implementations may allow a transformation to run as two or more phases, for example parsing, compilation and execution. Such a distinction is outside the scope of this specification, which treats transformation as a single process controlled using a set of stylesheet modules , supplied in the form of XML documents.
The stylesheet module that is to act as the principal stylesheet module for the transformation. The complete stylesheet is assembled by recursively expanding the xsl:import and xsl:include declarations in the principal stylesheet module, as described in 3. A set possibly empty of values for stylesheet parameters see 9. These values are available for use within expressions in the stylesheet.
This node is accessible within the stylesheet as the initial value of the XPath expressions. If no initial context node is supplied, then the context item , context position , and context size will initially be undefined, and the evaluation of any expression that references these values will result in a dynamic error.
Note that the initial context size and context position will always be 1 one when an initial context node is supplied, and will be undefined if no initial context node is supplied. Optionally, the name of a named template which is to be executed as the entry point to the transformation.
This template must exist within the stylesheet. If no named template is supplied, then the transformation starts with the template rule that best matches the initial context node , according to the rules defined in 6.
Either a named template, or an initial context node, or both, must be supplied. Optionally, an initial mode.
This must either be the default mode, or a mode that is explicitly named in the mode attribute of an xsl:template declaration within the stylesheet. If an initial mode is supplied, then in searching for the template rule that best matches the initial context node , the processor considers only those rules that apply to the initial mode. If no initial mode is supplied, the default mode is used. A base output URI. If the transformation generates more than one final result tree, then typically each one will be allocated a URI relative to this base URI.
A mechanism for obtaining a document node and a media type, given an absolute URI. The total set of available documents modeled as a mapping from URIs to document nodes forms part of the context for evaluating XPath expressions, specifically the doc FO function. The XSLT document function additionally requires the media type of the resource representation, for use in interpreting any fragment identifier present within a URI Reference. The set of documents that are available to the stylesheet is implementation-dependent , as is the processing that is carried out to construct a tree representing the resource retrieved using a given URI.
Some possible ways of constructing a document specifically, rules for constructing a document from an Infoset or from a PSVI are described in [Data Model]. A stylesheet parameter is visible if it is not masked by another global variable or parameter with the same name and higher import precedence. If a named template is supplied when the transformation is initiated, then this is the initial template; otherwise, the initial template is the template rule selected according to the rules of the xsl:apply-templates instruction for processing the initial context node in the initial mode.
Attempt to create a transformation results in error "transf. does not exist - SAP Q&A
Parameters passed to the transformation by the client application are matched against stylesheet parameters see 9. All template parameters within the initial template to be executed will take their default values. A stylesheet can process further source documents in addition to those supplied when the transformation is invoked.
These additional documents can be loaded using the functions document see A template rule has three parts: a pattern that is matched against nodes, a possibly empty set of template parameters , and a sequence constructor that is evaluated to produce a sequence of items. A transformation as a whole is executed by evaluating the sequence constructor of the initial template as described in 5. If the initial template has an as attribute, then the result sequence of the initial template is checked against the required type in the same way as for any other template. If this result sequence is non-empty, then it is used to construct an implicit final result tree , following the rules described in 5.
An implicit result tree is also created when the result sequence is empty, provided that no xsl:result-document instruction has been evaluated during the course of the transformation. In this situation the implicit result tree will consist of a document node with no children.
- Acústica (Fichas de física) (Spanish Edition).
- Tu Pum Pum: As Reggaeton Goes Pop, Never Forget the Genre’s Black Roots?
- 40,000 years ago: The hunt for Thylacoleo.
- Attempt to create a transformation results in error "transf. does not exist.
- Hammer of God: Godspeaker: Book Three.
This means that there is always at least one result tree. It also means that if the content of the initial template is a single xsl:result-document instruction, as in the example above, then only one result tree is produced, not two. It is useful to make the result document explicit as this is the only way of invoking document-level validation.
A sequence constructor is a sequence of sibling nodes in the stylesheet, each of which is either an XSLT instruction , a literal result element , a text node, or an extension instruction. Extension instructions are described in The main categories of XSLT instruction are as follows:. Instructions that declare variables: xsl:variable , xsl:param ;. Often, a sequence constructor will include an xsl:apply-templates instruction, which selects a sequence of nodes to be processed.
Trace Taylor Swift’s Country-to-Pop Transformation in 5 Songs
Each of the selected nodes is processed by searching the stylesheet for a matching template rule and evaluating the sequence constructor of that template rule. The resulting sequences of items are concatenated, in order, to give the result of the xsl:apply-templates instruction, as described in 6. Since the sequence constructors of the selected template rules may themselves contain xsl:apply-templates instructions, this results in a cycle of selecting nodes, identifying template rules , constructing sequences, and constructing result trees , that recurses through a source tree.
The results of some expressions and instructions in a stylesheet may depend on information provided contextually. This context information is divided into two categories: the static context, which is known during static analysis of the stylesheet, and the dynamic context, which is not known until the stylesheet is evaluated.
Although information in the static context is known at analysis time, it is sometimes used during stylesheet evaluation. Some context information can be set by means of declarations within the stylesheet itself. For example, the namespace bindings used for any XPath expression are determined by the namespace declarations present in containing elements in the stylesheet. Other information may be supplied externally or implicitly: an example is the current date and time.
The context information used in processing an XSLT stylesheet includes as a subset all the context information required when evaluating XPath expressions. The XPath 2. XSLT augments the context with additional information: this additional information is used firstly by XSLT constructs outside the scope of XPath for example, the xsl:sort element , and secondly, by functions that are defined in the XSLT specification such as key and format-number that are available for use in XPath expressions appearing within a stylesheet. The static context for an expression or other construct in a stylesheet is determined by the place in which it appears lexically.
The details vary for different components of the static context, but in general, elements within a stylesheet module affect the static context for their descendant elements within the same stylesheet module. The dynamic context is maintained as a stack.
- Tu Pum Pum: The Rise of Colombian Reggaeton and Perreo’s Pop Transformation.
- Onsite CSS Hot Fix.
- Marriott International Announces Vision For Sheraton Transformation | Marriott News Center.
- Footer links.
When an instruction or expression is evaluated, it may add dynamic context information to the stack; when evaluation is complete, the dynamic context reverts to its previous state. An expression that accesses information from the dynamic context always uses the value at the top of the stack.
The most commonly used component of the dynamic context is the context item. This is an implicit variable whose value is the item it may be a node or an atomic value currently being processed. The value of the context item can be referenced within an XPath expression using the expression. Full details of the static and dynamic context are provided in 5. An XSLT stylesheet describes a process that constructs a set of final result trees from a set of source trees. The stylesheet does not describe how a source tree is constructed.
Some possible ways of constructing source trees are described in [Data Model]. Frequently an implementation will operate in conjunction with an XML parser or more strictly, in the terminology of [XML 1. An implementation may also provide an application programming interface allowing the tree to be constructed directly, or allowing it to be supplied in the form of a DOM Document object see [DOM Level 2].
This is outside the scope of this specification. Users should be aware, however, that since the input to the transformation is a tree conforming to the XDM data model as described in [Data Model] , constructs that might exist in the original XML document, or in the DOM, but which are not within the scope of the data model, cannot be processed by the stylesheet and cannot be guaranteed to remain unchanged in the transformation output.
This process is referred to as serialization. Like parsing, serialization is not part of the transformation process, and it is not required that an XSLT processor must be able to perform serialization. However, for pragmatic reasons, this specification describes declarations the xsl:output element and the xsl:character-map declarations, see 20 Serialization , and attributes on the xsl:result-document instruction, that allow a stylesheet to specify the desired properties of a serialized output file.
In Long Run, There’s No Such Thing as an Einstein Investor
When serialization is not being performed, either because the implementation does not support the serialization option, or because the user is executing the transformation in a way that does not invoke serialization, then the content of the xsl:output and xsl:character-map declarations has no effect. Under these circumstances the processor may report any errors in an xsl:output or xsl:character-map declaration, or in the serialization attributes of xsl:result-document , but is not required to do so.
XSLT defines a number of features that allow the language to be extended by implementers, or, if implementers choose to provide the capability, by users. These features have been designed, so far as possible, so that they can be used without sacrificing interoperability.