April 24, 2006



Coverage: [DBCB] Chapter 4, pp. 180-185 and other references listed below


Demo of Scheme Implementation of the A-Priori Algorithm for Mining Association Rules


DTDs


XSchema


Yacc for XML?


Mining for Schema


XML Suite of Technologies and Tools

XML has matured from simple text markup for data interchange to a mature technology with a rich suite of associated tools. While these tools are beyond the scope of this lecture, below we provide references to a few and encourage you to explore them.


Cascading Stylesheets (CSS)

XML is not very useful in isolation. In order to view XML, it needs to be converted into HTML. There are two methods for this conversion: CSS (Cascading Style Sheets) and XSL (eXtensible Stylesheet Language). CSS does not actually perform an explicit conversion from XML to HTML. It is rather a lightweight method which associates each element with a style of presentation. Click here for a nice page on the differences between CSS and XSLT. The following CSS code specifies how a browser should render the books.xml (courtesy O'Reilly Mozilla DevCenter).

books {
    display:block;
    height:200px;
    width:280px;
    border:1px solid #000;
    overflow:auto;
    background-color:#eee;
    font: 12px verdana;
}

book {
   display: block;
   padding:10px;
   margin-bottom:10px;
   border-top:1px solid #ccc;
   border-bottom:1px solid #ccc;
   background-color:#fff;
}

CSS permits multiple presentations for the same document.

To associate an XML document with a CSS, use the following element after the <?xml version="1.0"?> in the XML document.

<?xml-stylesheet href="books.css" type="text/css"?>

To associate an HTML document with a CSS, use the following element within the <head> element of the HTML document:

<link rel="stylesheet" href="homepage.css" type="text/css">

CSS can now be used to do some pretty slick rendering. Illustration of HTML list where list items appear to be images.


Simple Example of Adding a CSS to HTML

homepage.css
body {
   background-color: E0F7F0; 
}

h1 {font-weight: bold;
    text-align: left;
    color: black;
    font-family: "Verdana", Arial, sans-serif}

/* unvisited links */
a:link {color: #CC9933;
        size: 3;
        font-family: Verdana, Arial, Helvetica, sans-serif}

index.html
<html>

<head>
<title>A simple webpage</title>
<link rel="stylesheet" href="homepage.css" type="text/css">
</head>

<h1>Header 1</h1>

<a href="http://espn.com">ESPN.com</a>

</html>


Files Used In Class


References



Return Home