Academic Tutorials



English | French | Portugese | German | Italian
Google

Home Source Codes E-Books Downloads Contact Us About Us

XSL Tutorial
XSL Introduction
Introduction to XSL
XSL Templates
XSL Attributes
The XSL Axes
Repetitions And Sortings in XSL
XSL Elements
XSL Conditional processing
Number generation and formatting in XSL
XSL Variables
Numeric Calculation in XSL
XSL Boolean Function
XSL String Functions
XSL Nodeset
XSL Output Element
Copy and Copy-of Constructs in XSL
Miscellaneous Additional Functions
XSL Combining
XSL Internationalization
Summary to xsl

HTML Tutorials
HTML Tutorial
XHTML Tutorial
CSS Tutorial
TCP/IP Tutorial
XML Tutorials
XML Tutorial
XSL Tutorial
XSLT Tutorial
DTD Tutorial
Schema Tutorial
XForms Tutorial
XSL-FO Tutorial
XML DOM Tutorial
XLink Tutorial
XQuery Tutorial
XPath Tutorial
XPointer Tutorial
RDF Tutorial
SOAP Tutorial
WSDL Tutorial
RSS Tutorial
WAP Tutorial
Web Services Tutorial
Browser Scripting
JavaScript Tutorial
VBScript Tutorial
AJAX Tutorial
DHTML Tutorial
HTML DOM Tutorial
WMLScript Tutorial
E4X Tutorial
Server Scripting
ASP Tutorial
PHP Tutorial
PERL Tutorial
SQL Tutorial
ADO Tutorial
.NET (dotnet)
Microsoft.Net
XML Web Services
ASP.Net
.Net Mobile
C# : C Sharp
ADO.NET
VB.NET
Multimedia
SVG Tutorial
Flash Tutorial
Media Tutorial
SMIL Tutorial
Web Building
Web Browsers
Web Hosting
W3C Tutorial
Web Building
Web Quality
Web Semantic
Web Careers
Java Tutorials
Java Tutorial
JSP Tutorial
Servlets Tutorial
Struts Tutorial
EJB Tutorial
JMS Tutorial
JMX Tutorial
Programming Langauges
C Tutorial
C++ Tutorial
Visual Basic Tutorial
Data Structures Using C
Soft Skills
Communication Skills
Time Management
Project Management
Team Work
Leadership Skills
Corporate Communication
Negotiation Skills


XSL Introduction

Previous Next



Introduction to XSL

With the XSL you can freely do modify any of the source text. Stylesheet 1 and the Stylesheet 2 produces the different output from a same source file.



XSL stylesheet 1

<xsl:stylesheet xmlns:xsl='http://www.w3.org/1999/XSL/Transform' >

<xsl:template match="/">
<H1><xsl:value-of select="//title"/></H1>
<H2><xsl:value-of select="//author"/></H2>
</xsl:template>
</xsl:stylesheet>


XSL stylesheet 2

<xsl:stylesheet xmlns:xsl='http://www.w3.org/1999/XSL/Transform' >

<xsl:template match="/">
<H2><xsl:value-of select="//author"/></H2>
<H1><xsl:value-of select="//title"/></H1>
</xsl:template>
</xsl:stylesheet>



An XML Syntax

An every XSL stylesheet should start with the xsl:stylesheet element. Atribute xmlns:xsl specifies the version of the XSL(T) specification. This example do show simplest possible stylesheet. As it do not contains any of the information, a default processing is been used.

<xsl:stylesheet xmlns:xsl='http://www.w3.org/1999/XSL/Transform' >

</xsl:stylesheet>



An XSL Processor

The XSL processors parses the XML source and tries to find out the matching template rule. If it do find it, then the instructions inside the matching template are been evaluated.

Contents of the original elements can be recovered from a original sources in two basic ways. A Stylesheet 1 uses the xsl:value-of a construct. In this case contents of the element is been used without any further processing. Construct an xsl:apply-templates in the Stylesheet 2 is different. The parser further processes the selected elements, for which the template is been defined..



XSL stylesheet 1

<xsl:stylesheet xmlns:xsl='http://www.w3.org/1999/XSL/Transform'>

<xsl:template match="employee">
<B><xsl:value-of select="."/></B>
</xsl:template>
<xsl:template match="surname">
<i><xsl:value-of select="."/></i>
</xsl:template>
</xsl:stylesheet>


XSL stylesheet 2

<xsl:stylesheet xmlns:xsl='http://www.w3.org/1999/XSL/Transform' >

<xsl:template match="employee">
<B><xsl:apply-templates select="firstName"/></B>
<B><xsl:apply-templates select="surname"/></B>
</xsl:template>

<xsl:template match="surname">
<i> <xsl:value-of select="."/></i>
</xsl:template>
</xsl:stylesheet>



Share And Enjoy:These icons link to social bookmarking sites where readers can share and discover new web pages.
  • blinkbits
  • BlinkList
  • blogmarks
  • co.mments
  • connotea
  • del.icio.us
  • De.lirio.us
  • digg
  • Fark
  • feedmelinks
  • Furl
  • LinkaGoGo
  • Ma.gnolia
  • NewsVine
  • Netvouz
  • RawSugar
  • Reddit
  • scuttle
  • Shadows
  • Simpy
  • Smarking
  • Spurl
  • TailRank
  • Wists
  • YahooMyWeb

Previous Next

Keywords xsl tutorial, html introduction, jsp introduction, css introduction, javascript introduction, xsl examples , xsl attributes, xsl tutorials, xsl example, xsl cdata, xsl reference, xsl elements, xsl tags, struts introduction, jsp xsl, xsl schema, c# introduction, rss introduction, j2ee introduction, ejb introduction, xsl namespaces, xsl dtd, xsl programming, java introduction, xsl attribute, XSL introduction, asp net introduction, asp net xsl, xsl for each, vb net introduction, xsl vb net, xml introduction, xslt introduction, xpath introduction, xslt intro


HTML Quizes
HTML Quiz
XHTML Quiz
CSS Quiz
TCP/IP Quiz
XML Quizes
XML Quiz
XSL Quiz
XSLT Quiz
DTD Quiz
Schema Quiz
XForms Quiz
XSL-FO Quiz
XML DOM Quiz
XLink Quiz
XQuery Quiz
XPath Quiz
XPointer Quiz
RDF Quiz
SOAP Quiz
WSDL Quiz
RSS Quiz
WAP Quiz
Web Services Quiz
Browser Scripting Quizes
JavaScript Quiz
VBScript Quiz
AJAX Quiz
DHTML Quiz
HTML DOM Quiz
WMLScript Quiz
E4X Quiz
Server Scripting Quizes
ASP Quiz
PHP Quiz
PERL Quiz
SQL Quiz
ADO Quiz
.NET (dotnet) Quizes
Microsoft.Net Quiz
XML Web Services Quiz
ASP.Net Quiz
.Net Mobile Quiz
C# : C Sharp Quiz
ADO.NET Quiz
VB.NET Quiz
Multimedia Quizes
SVG Quiz
Flash Quiz
Media Quiz
SMIL Quiz
Web Building  Quizes
Web Browsers Quiz
Web Hosting Quiz
W3C Quiz
Web Building Quiz
Web Quality Quiz
Web Semantic Quiz
Web Careers Quiz
Java Quizes
Java Quiz
JSP Quiz
Servlets Quiz
Struts Quiz
EJB Quiz
JMS Quiz
JMX Quiz
Programming Langauges Quizes
C Quiz
C++ Quiz
Visual Basic Quiz
Data Structures Using C Quiz
Soft Skills Quizes
Communication Skills Quiz
Time Management Quiz
Project Management Quiz
Team Work Quiz
Leadership Skills Quiz
Corporate Communication Quiz
Negotiation Skills Quiz

Privacy Policy
Copyright © 2003-2008 Vyom Technosoft Pvt. Ltd., All Rights Reserved.