COAP:COAP-2180/week2: Difference between revisions

The educational technology and digital learning wiki
Jump to navigation Jump to search
m (Daniel K. Schneider moved page Help:COAP-2180/project2 to COAP:COAP-2180/week2)
Line 3: Line 3:
On week two we will look at XML in three ways:
On week two we will look at XML in three ways:
* What is XML (some short demos)
* What is XML (some short demos)
* Editing XML (part II)
* Editing XML (recall)
* XML with Style (part I), i.e. XML plus CSS
* XML styling with CSS


==== Teaching materials ====
==== Teaching materials ====
Line 11: Line 11:
*This week: DocX and docbook
*This week: DocX and docbook


; Understanding and editing XML (recall and part II)
; Understanding and editing XML
* [http://tecfa.unige.ch/guides/te/files/xml-edit.pdf xml-edit.pdf] (slides used to explain how to understand DTDs and how to edit XML)
* [http://tecfa.unige.ch/guides/te/files/xml-edit.pdf xml-edit.pdf] (slides used to explain how to understand DTDs and how to edit XML)
* [[Editing XML tutorial]] (same information as slides, more useful for online reading)
* [[XML principles]]
* [[Editing XML tutorial]]  


; XML with CSS style
; XML with CSS style
Line 70: Line 71:
(easy)
(easy)
| Write simple recipes
| Write simple recipes
| recipe.dtd
| [http://tecfa.unige.ch/guides/xml/examples/dtd-examples/recipe.dtd recipe.dtd]
| [http://tecfa.unige.ch/guides/xml/examples/dtd-examples/recipe.xml recipe.xml]
| Use all tags. Write at least one recipe. Make sure that there is enough information to really use it.
| Use all tags. Write at least one recipe. Make sure that there is enough information to really use it.


|-
|-
| Recipe Markup Language
| Recipe Markup Language (medium)
 
(medium)
| Write complex recipes
| Write complex recipes
| recipeml.dtd
| [http://tecfa.unige.ch/guides/xml/examples/dtd-examples/recipeml.dtd recipeml.dtd]
| [http://tecfa.unige.ch/guides/xml/examples/dtd-examples/recipeml.xml recipeml.xml]
| As above, but only use appropriate tags. Hint: find the website of its creator
| As above, but only use appropriate tags. Hint: find the website of its creator


Line 86: Line 87:
(medium)
(medium)
| News syndication (usually machine generated)
| News syndication (usually machine generated)
| rss-0-92.dtd
| [http://tecfa.unige.ch/guides/xml/examples/dtd-examples/rss-0-92.dtd rss-0-92.dtd]
| [http://tecfa.unige.ch/guides/xml/examples/dtd-examples/rss-0-92-template.xml rss-0-92-template.xml]
| Use enough tags to display this in an aggregator. Enter at least 4 URLs. Hint: look at a RSS news feed first !
| Use enough tags to display this in an aggregator. Enter at least 4 URLs. Hint: look at a RSS news feed first !


Line 94: Line 96:
(hard)
(hard)
| Write "real" articles
| Write "real" articles
| sdocbook.dtd
| [http://tecfa.unige.ch/guides/xml/examples/dtd-examples/sdocbook.dtd sdocbook.dtd]
| [http://tecfa.unige.ch/guides/xml/examples/dtd-examples/sdocbook-template.xml sdocbook-template.xml]
| Do not use all tags, only the needed ones. Copy/paste from a text you already have.  
| Do not use all tags, only the needed ones. Copy/paste from a text you already have.  


Line 102: Line 105:
(medium)
(medium)
| Write "how-to" instructions
| Write "how-to" instructions
| instructions.dtd
| [http://tecfa.unige.ch/guides/xml/examples/dtd-examples/instructions.dtd instructions.dtd]
| [http://tecfa.unige.ch/guides/xml/examples/dtd-examples/instructions.xml instructions.xml]
| Come up with a good "how-to problem". Only use tags you need..
| Come up with a good "how-to problem". Only use tags you need..


Line 110: Line 114:
(medium hard)
(medium hard)
| Write "how-to" instructions
| Write "how-to" instructions
| stepbystep03.dtd
| [http://tecfa.unige.ch/guides/xml/examples/dtd-examples/stepbystep03.dtd stepbystep03.dtd]
| [http://tecfa.unige.ch/guides/xml/examples/dtd-examples/stepbystep03-template.xml stepbystep03-template.xml]
| Make up a good "how-to problem". Only use tags you need..
| Make up a good "how-to problem". Only use tags you need..


Line 118: Line 123:
(medium)
(medium)
| Write simple fairy tales
| Write simple fairy tales
| story-grammar.dtd
| [http://tecfa.unige.ch/guides/xml/examples/dtd-examples/story-grammar.dtd story-grammar.dtd]
| [http://tecfa.unige.ch/guides/xml/examples/dtd-examples/story-grammar-template.xml story-grammar-template.xml]
| Write a nice fairy tale. Doesn’t need to be your own.  
| Write a nice fairy tale. Doesn’t need to be your own.  



Revision as of 23:42, 15 March 2013

Week 2 COAP 2180

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

  • What is XML (some short demos)
  • Editing XML (recall)
  • XML styling with CSS

Teaching materials

Tour de XML
  • This week: DocX and docbook
Understanding and editing XML
XML with CSS style
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

These chapters are available through the world classroom.

For the adventurous

Homework 1/2 - Weeks 1/2

Deadline and submission:

  • Monday week 3 (before start of class)
  • Use the worldclassroom: https://webster.blackboard.edu/
  • Submit the *.xml, the *.dtd and an optional report file (see below)

Task

Edit an XML document with 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
  • Bonus: add longer comments in the DTD or the XML file that explain the XML structure and that express your opinions

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.

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.

Some of the DTDs are described in the following table.

DTD (difficulty)
Purpose
file name
Additional directions
Recipe DTD

(easy)

Write simple recipes recipe.dtd recipe.xml Use all tags. Write at least one recipe. Make sure that there is enough information to really use it.
Recipe Markup Language (medium) Write complex recipes recipeml.dtd recipeml.xml As above, but only use appropriate tags. Hint: find the website of its creator
RSS 0.92

(medium)

News syndication (usually machine generated) rss-0-92.dtd rss-0-92-template.xml 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 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 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 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 Write a nice fairy tale. Doesn’t need to be your own.

Evaluation criteria (roughly)

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.

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
  • Respect of the DTD's semantics
  • Good enough CSS for easy reading

Brilliant work (A) includes either one of:

  • A 1 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 doesn't matter.
  • Outstanding styling