Class 10 Notes for XML

Learning Objectives:

You will be able to create an XSL document that meets a set criteria.


Read XSL tutorials from the W3schools.

Read: Chapter 6

Review: The Choose Example and Sort the Food!

Add XSL to your  XML Resume & XML Address book documents

Topics Covered:

Quiz Next Week!


Getting in a Jam with the Choose Example and Sort the Food!

    <xsl:if test="price &lt; 10">
     The items you wish to display that meet the criteria of price less than 10

Lets Take' RSS and make our own version of an RSS reader. We will pull title, description and link and put it in a table.


There are 5 predefined entity references in XML:


< less than


> greater than


& ampersand 


' apostrophe


" quotation mark

Note: Only the characters "<" and "&" are strictly illegal in XML. The greater than character is legal, but it is a good habit to replace it.


More XSL Manipulations:

<xsl:attribute name="attributename" namespace="url"> adds an attribute to your output.

<xsl:comment> adds a comment to your output.

<xsl:apply-templates> apply a template to the XML file. The template can be internal, imported, and/or included.

<xsl:import href="URL"/> Brings in another stylesheet that takes a "back seat" or lower priority to original stylesheet.

<xsl:include href="URL"/> Brings in another stylesheet that has same priority as original sylesheet.


Sets the output type in the result tree to XML, HTML, TEXT

10 Lessons from a Web Developer



SQL, Predefined Entity References, Output Methods



Final Step:

Review in your mind everything we covered in class and remember to cover it again before you go to bed so your mind to process this information while you sleep.