Lecture Notes

Useful Resources

In-Class Exercises

Readings

  1. background (what is XSLT, in a nutshell)
  2. <xsl:template> (describes rules to apply when a specific node matches the template)
  3. <xsl:value-of> (extracts the value of a matched and selected node)
  4. <xsl:for-each> (iterations for logical expressions)
  5. <xsl:sort> (instructions for sorting outputs)
  6. <xsl:if> (selections for logical expressions)
  7. <xsl:choose> (selections in conjunction with <xsl:when> and <xsl:otherwise>)
  8. <xsl:apply-templates> (applies a template rule to the current element or to its children)
  9. Chapter 17 of the XML Bible, Second Edition : XSL Transformations
  10. push vs pull approaches

Simple Example

XML Data File (example.xml)

XSL Transformation File (example.xsl)


<?xml version="1.0"?> 
<?xml-stylesheet type="text/xsl" href=”example.xsl"?>
<message>Woohoo!</message>

<?xml version="1.0"?> 
<xsl:stylesheet version="1.0” 
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> 
  <xsl:template match="/">
    <html>
    <body> 
      <h1><xsl:value-of select="message"/></h1> 
    </body>
    </html> 
  </xsl:template>
</xsl:stylesheet>

revalidate XHTML Revalidate CSS Section 508 testing unique visitor counter

Last modified: 11 Mar 2009 05:02:22 PM