EDSS – Class 6

Based on photo by dhester from morgueFile.com

Based on photo by dhester from morgueFile.com

Link to all EDSS classes     Class 1     Class2     Class3     Class 4     Class 5

EDSS is a combination of Create an Extensible Document (ICPMM491D) and Create an Extensible Style Sheet (ICPMM492D). This class is a cluster of the two units, that will be delivered together.

Overview

  • XML Summary
  • Creating a Style Sheet
  • Including Meta-Data in a Website
  • Internal DTD Declaration
  • Assessment

XML Summary (>W3Schools)

XML can be used to exchange, share, and store  data.

XML documents form a tree structure that starts at  “the root” and branches to “the leaves”.

XML has very simple syntax rules. XML with  correct syntax is “Well Formed”. Valid XML also validates against a DTD.

XSLT is used to transform XML into other formats  like HTML.

All modern browsers have a built-in XML parser  that can read and manipulate XML.

The DOM (Document Object Model) defines a standard  way for accessing XML.

The XML examples on W3Schools also represent a summary of this XML tutorial.

Creating a Style Sheet

Look at the style sheet used in the example of this XML/XSLT editor on W3Schools. It uses XSLT. Change aspects of it, replacing style elements. Change the colour, the border…

Including Meta-Data in a Website

Including meta-data in a website is best done in the HTML code. Use the head section to include your meta-data. Look at this link to see how to include it: Head Element With Meta Tags in HTML.

Examples:

  • Define keywords for search engines: <meta name=”keywords” content=”HTML, CSS, XML, XHTML, JavaScript”>
  • Define a description of your web page: <meta name=”description” content=”Free Web tutorials on HTML and CSS”>
  • Define the author of a page: <meta name=”author” content=”Hege Refsnes”>
  • Refresh document every 30 seconds: <meta http-equiv=”refresh” content=”30″>

Internal DTD Declaration

The internal DTD declaration is placed inside the XML document. See example on W3Schools.

Assessment Task

You will use the  XML/XSLT online editor on W3Schools to create an XML document with internal DTD declaration as well as a XLST document with integrated Meta-data.

Task:

Create two price lists with the help of two well formed and valid XML and XSLT files. Use the W3School online editor (as per last link above) and save the xml file as menu.xml and the xslt as menu.xslt.

Price List 1 is supposed to be for a cafe menu. Include a column for 8 or more food item and one for the price and description. You will need to make the descriptions and cost up.

Include an internal DTD in the XML document. You need to rename the individual parent and child elements. Do not use the elements in the example!

Incorporate the meta data into the HTML part of the XSLT document. The meta data needs to include: keywords, description and author.

Price List 2 is supposed to be for a purpose of your choice (eg a book catalog or supermarket stock). Apply the same principle and save as xml and xslt.

Submit the 2 xml and 2 xslt files on MyKangan.

Due Date: 19/7

Note: Your comments and feedback are as always welcome. Please leave additional information for other users. Thanks!

Advertisements

One thought on “EDSS – Class 6

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s