More XML Schemas, XSLT, and AJAX




CS174

Chris Pollett

Nov. 1, 2010

Outline

Overview of data types

Simple Types

Complex Types

References

Indicating the Schema Used By an XML document

Quiz

Which of the following statements is true?

  1. Any parameter entities defined in a DTD can appear in documents conforming to that DTD.
  2. To specify multiple attributes of an element you need to use multiple <!ATTLIST ... > tags.
  3. Using the xmlns attribute several xml language tags can be used in the same document.

XML and CSS

XSLT

XSLT Example -- Initial XML Document

<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="xslplane.xsl" ?>
<plane>
    <year>1970</year>
</plane>

XSLT Example -- The Transformation

<?xml version="1.0" encoding="utf-8" ?>
<xsl:stylesheet version="1.0"
    xmlns:xsl= "http://www.w3.org/1999/XSL/Transform"
   xmlns = "http://www.w3.org/1999/xhtml"
>
<xsl:template match="plane">
<html><head>
<title>result of applying a stylesheet to plane</title>
</head><body><h1>Plane Description</h1>
     <xsl:apply-templates />
     </body></html>
 </xsl:template>
<xsl:template match="year">
    <p style="color:red">
    <xsl:value-of select="." />
    </p>
</xsl:template>
</xsl:stylesheet>

POSH -- Plain Old Semantic HTML

Beginning AJAX

Step-by-Step

Step-by-Step Continued I

Step-by-Step Continued II

Step-by-Step Continued III

Step-by-Step Continued IV