Class 10 Notes for XML

Learning Objectives:

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

Homework:

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!

Practice:

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
      </xsl:if>

Lets Take BoardGuaranteed.com' 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:

&lt;

< less than

&gt;

> greater than

&amp;

& ampersand 

&apos;

' apostrophe

&quot;

" 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.

<xsl:output
method="xml|html|text|name"
version="string"
encoding="string"
omit-xml-declaration="yes|no"
standalone="yes|no"
doctype-public="string"
doctype-system="string"
cdata-section-elements="namelist"
indent="yes|no"
media-type="string"/>

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

10 Lessons from a Web Developer

 

Terms:

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.