HTML tutorial
CSS3 tutorial
Bootstrap tutorial
JavaScript tutorial
JQuery tutorial
AngularJS tutorial
React tutorial
NodeJS tutorial
PHP tutorial
Python tutorial
Python3 tutorial
Django tutorial
Linux tutorial
Docker tutorial
Ruby tutorial
Java tutorial
C tutorial
C ++ tutorial
Perl tutorial
JSP tutorial
Lua tutorial
Scala tutorial
Go tutorial
ASP.NET tutorial
C # tutorial
XSL stylesheets are called by one or more sets of template (template) of the rules.
Each template contains a rule when a specified node is matched applied.
<Xsl: template> element is used to build templates.
The match attribute is used to associate XML elements and templates.match attribute can also be used to define a template for the entire XML document. Value match attribute is an XPath expression (for example, match = "/" defines the entire document).
Well, let's look at a simplified version of the last chapter of the XSL file:
Since the XSL stylesheet is itself an XML document, so it is always starting from the XMLdeclaration: <xml version = "1.0" encoding = "ISO-8859-1"??>.
The nextelement, <xsl: stylesheet>, Define this document is an XSLT style sheet document (along with the version number and XSLT namespace attributes).
<xsl: template> element defines a template.Thematch = "/" attribute put the template with the root of the XML source document linked.
<Xsl: template> defines the content of the element inside the HTML code is written to the output.
The last two lines define the end of the template and the end of the style sheet.
The results of this example there is a little flawed, because the data is not copied from the XML document to the output. In the next chapter, you will learn how to use the<xsl: value-of> element to select values from the XML elements.