Learnthat.com Free Certification and Computer Online Courses
ThatNetwork.com Internet Media Network Exampractice.com free certification practice exams, mcse, comptia Definethat.com - Free technical definitions, define Free Romance Tips, Romantic Tips, Date Ideas Free POD publisher comparison print on demand
Learnthat.com Free A+ Certification, Computer Classes, Certification Courses, Business, Lifestyle, ApplicationsFree business tutorials and definitionsFree certification tutorials and definitionsFree computer and technical tutorials and technical definitionsFree Finance Tutorials and DefinitionsFree House Repair TutorialsFree Lifestyle and Fun Tutorials
  All Online CoursesNew Courses QuickTipsWord DefinitionsSubmit a TutorialLinks
÷ Resources
Home
free tech tutorials
Free Tutorials
free tech tutorials
Certifications
free tech tutorials
Definitions
free tech tutorials
Resources/Links
free tech tutorials
Forums
free tech tutorials
Distance Education
free tech tutorials
Highest Rated Tutorials
÷ Popular Tutorials
÷ New Tutorials

Learn XML programming in this free XML training course

 

What is the eXtensible Stylesheet Language, or XSL?

The eXtensible Stylesheet Language, henceforth referred to as XSL, is a programming language that is used to create XML Stylesheets or XSS.  XSL allows XML data to be used by the stylesheet itself, creating a more dynamic end result.  Since the stylesheet can use the data, it can in turn manipulate and arrange the data before it even reaches the end user… meaning that you have a lot more control over the data.  You can even transform XML into HTML!

Of course, using XSL is somewhat different than using CSS.  The first major difference comes when declaring the XML processor… using cats.xml as an example, if you were using XSL instead of CSS, your processor declaration would look more like this:

            <?xml-stylesheet type="text/xsl" href="cats.xsl"?>

As you can see, the main difference here is the change from the letters “CSS” to “XSL”.  Of course, they are different file types, so this is a significant difference… even if it just seems like you’re only changing a few letters around.

XSL is a much more powerful language than CSS.  Though they do share some features in common, XSL has additional processing commands that can be applied and is more capable at making changes to the document as a whole than CSS could ever be.

Whereas a sample CSS file might look like this:

family_tree
{
      color: red;
      font-size: 10pt;
}
parents
{
display: block;
      color: blue;
      font-size: 12pt;
}
children
{
      color: yellow;
      font-size: 12pt;
}
aunts_and_uncles 
{
      color: gray;
      font-size: 11pt;
}
 

A sample XSL document might look like this:

<?xml version="1.0"?>

<html xsl:version="1.0">

<body style="font-family:Arial,helvetica,sans-serif;font-size:10pt; background-color: blue">

<xsl:for-each select="cats">

<div style="background-color:white;color:white">

<span style="color:black">

                                    <xsl:value-of select="name" />

                                    </span>

                                    <xsl:value-of select="color" />

  </div>

<div style=”font-size:10pt; color: orange">

                                    <xsl:value-of select="size" />

<span style="font-style:italic">

                                    (

                                    <xsl:value-of select="weight" />

                                    pounds)

                                    </span>

  </div>

  </xsl:for-each>

  </body>

  </html>

As you can see, that’s quite some difference in formatting.  After all, the XSL stylesheet is actually an XML document, with HTML implemented in it as well! And while both CSS and XSL do have elements in common, the elements of XSL pages are much more open to change and interpretation by the programmer.  Don’t worry if it looks too advanced for you, either… even basic programming can seem intimidating at first, but as you work on it more you’ll find that it’s actually quite easy.

 

by John Casteele

Find more free Internet tutorials from Learnthat.com.

More Information:

Help us by rating this tutorial: [---] [--] [+] [++] [+++]
[---] lowest; [+++] highest

 

 

 


Learn: Free Tutorials - Links to Free Tutorials
Understand: Free Technical Definitions - ExplainThat Whitepapers
Use: Certification Section - Discussion Forum

Visit Our Network Sites:

DefineThat.com Technical Defintions Romancetips.com
Free Gift Ideas - GiveThat Planthat.com Free Unique Business Ideas
PublishOnDemand.net - Learn about Print on Demand (POD) - Self Publishing Seekthat.com - Technical Search Engine
ThatNetwork.com  

About Us : Contact Us : Advertise : Privacy Information

© 1998-2004 Learnthat.com