The transformation component of the XSL is XSLT. Its purpose is to transform XML documents. It describles the process of transforming an XML document, using a transform engine and XSL. The XML document and XSL stylesheet are provided as input to the XML transform engine, also known as the XSLT processor.
The XML processor reads an XML document and processes it into a hierarchical tree containing nodes for each piece of information in document. After a document has been processe into a tree, the XSL processor begins applying the rules of an XSL stylesheet to the document tree.
Top Level XSLT Elements: The top level XSLT elements can occur directly inside the xsl:stylesheet element. An element occurring as a child of an xsl:stylesheet element is called a top-level element. These elements provide the building blocks for creating XSLT documents
A template is the main component of a stylesheet. Templates are defined with the helps of rules. The template rule is used to control the output of the XSLT processor. It defines the method by which an XML element node. A template rule consists of a pattern that indentifies the XML node and an action that selects and transforms the node.
Each template rule is represented by the <xsl:template> element. The <xsl: template> is an element that defines an action for producing output from a source document.
Create by ChungLD faculty /36
Example the <xsl:template> Element Create by ChungLD faculty /36
The xsl:apply-template element defines a set of nodes to be processed. This element, by default, selects all child nodes of the current node being processed, and finds a matching template rule to apply to each node in the set.
<xsl:apply-templates select=“name of element”/>
Where: select is an attribute can be used to process nodes selected by an expressiono instead f processing all children
Where: count is used indicates what nodes are to be counted. Only nodes that match the pattern are counted, format to be used for each number in the list, value specifies the expression to be converted to a number and output to the result tree.
The xsl:if element evaluates a conditional expression against the content of the XML file. The test attribute of xsl:if element contains a conditional expression that evaluates to a boolean value of true of false.
Explain: the condition in the source data to test with either a true or false anwser.
The xsl:choose element is used to make a decision when there are two or moree possible course of action. The xsl:choose element is used in conjunction with xsl:when and xsl:otherwise to express multiple conditional tests.