COAP:COAP-2180/week2

The educational technology and digital learning wiki
Jump to navigation Jump to search

Week 2 COAP 2180

On week two we will look at XML in four ways:

  • What is XML (some short demos)
  • Editing XML (recall)
  • XML styling with CSS (Monday)
  • DTD architecture (Wednesday)

In addition to creating a CSS for XML, we also will start working on your own DTD (project 2/week 3)

Teaching materials

Tour de XML
  • This week: DocX and docbook
Understanding and editing XML (recall)
XML with CSS style
Creating a DTD
Examples files
  • DTD and XML templates example directory
  • To retrieve these files, I strongly suggest that you "save link as". If you open a file in a navigator like IE and then save, you may loose information ....
  • Also consider taking the ALLFILES.zip archive which should include everything. Before unzipping, create a directory.
Textbook chapters (see also week 1)

If you find that my lecture notes and slides are incomplete, too short or not good enough, reading either one or both texts is mandatory !

  • Learning XML, Chapter 5 CSS
  • XML in a Nutshell, Chapter 13 CSS
  • XML in a Nutshell, Chapter 3 Document Type Definitions (start here)
  • Learning XML, Chapter 4 Quality Control with Schemas (additional reading)

These chapters are available through the world classroom.

For the adventurous

Homework 1-2 - Weeks 1/2

Deadline and submission:

Task

Edit an XML document using one of the suggested DTDs below

  • Respect the semantics of the elements and the attributes
  • Validate your document
  • Try to use as many different elements as you can (if appropriate)
  • Follow additional directions for each suggested DTD
  • Use an existing CSS if it exists, create one if it does not.

Bonus:

  • Add longer comments in the DTD or the XML file that explain the XML structure and that express your opinions. Alternatively or in addition, write a short report that discussed the DTD and the CSS.
  • Styling: improve or create the CSS (if appropriate)
  • Good, meaningful contents

Do not worry too much about rendering (display). It is more important that your get the XML editing right, i.e. be able to fill in a dynamic information structure with data. Producing a really good looking CSS will give you a bonus of course.

Example files

You can choose among the DTDs available at http://tecfa.unige.ch/guides/xml/examples/dtd-examples/

  • Make sure to get both the *-template.xml and the corresponding *.dtd file. If available, you also should take the *.css.
  • You may suggest another DTD to the instructor, but before Wed week 2.

Some of the DTDs are described in the following table.

DTD (difficulty) Purpose DTD file XML start CSS Additional instructions
Recipe DTD (easy medium) Write simple recipes recipe.dtd recipe.xml recipe.css Use all tags. Write at least one recipe. Make sure that there is enough information, i.e. a user ought to able to cook this. Look at this example.
CD_list (medium) Create simple CD lists cd-list.dtd cd-list-template.xml cd-list.css Use most tags. Write at least two entries and at least one that uses most of the tags. Do better than cd-list.xml
Recipe Markup Language (hard) Write complex recipes recipeml.dtd recipeml.xml none As above, but only use appropriate tags. Read more in the official website.
RSS 0.92 (medium) News syndication (usually machine generated) rss-0-92.dtd rss-0-92-template.xml none Use enough tags to display this in an aggregator. Enter at least 4 URLs. Hint: look at a RSS news feed first !
Simple Docbook (hard) Write "real" articles sdocbook.dtd sdocbook-template.xml none (but see this) Do not use all tags, only the needed ones. Copy/paste from a text you already have.
Instructions (medium) Write "how-to" instructions instructions.dtd instructions.xml instructions.css Come up with a good "how-to problem". Only use tags you need..
StepbyStep (medium hard) Write "how-to" instructions stepbystep03.dtd stepbystep03-template.xml stepbystep03.css Make up a good "how-to problem". Only use tags you need..
Story grammar (medium) Write simple fairy tales story-grammar.dtd story-grammar-template.xml story-grammar.css Write a nice fairy tale. Doesn’t need to be your own. Make sure to use the right tags, i.e. think in terms of structure. A very short example is here.

Tips for getting a good grade

Evaluation criteria (roughly). See the detailed grid in the world classroom.

Work considered as weak:

  • Well-formed (but not valid) document using the DTD’s elements

Work considered as minimalistic:

  • Valid document that includes very minimal content. No report.

Good work includes:

  • Valid document with an interesting content
  • Some CSS

Excellent work (A-) includes:

  • Inserted useful comments <!-- ... --> in the XML and/or the DTD or a minimalistic report
  • Respect of the DTD's semantics
  • Good contents
  • Good enough CSS for easy reading

Very good work (A) includes either one of:

  • A 1-2 page report that discusses the architecture of the DTD and your opinion of it, e.g. you can describe architecture of the DTD (without going into detailed description of every element !), discuss what you would like to improve, what you liked/disliked, your difficulties, etc. You simply can include this report into the DTD that you resubmit or as word/PDF/HTML file. As you like, presentation of the report doesn't matter.
  • Outstanding styling + extended contents

Brilliant work (A+) includes all of the above.

Report structure and contents