XML Schemas, XSLT, Start AJAX




CS174

Chris Pollett

Apr 18, 2016

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. The regular expression pattern /\d+og/ would match the string: dddog
  2. If we had an HTML button tag with id my-button, we could in Javascript add the function clickMe to handle click events using the syntax:
    document.getElementById("my-button"
        ).addEventListener("click", clickMe, false);
    
  3. In a DTD the <!ENTITY ...> declaration is used to define new tags.

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