RU beehive logo ITEC dept promo banner
ITEC 325
2016fall
ibarland

homelectshws
D2Lbreeze (snow day)

dtd
DTDs
defining movie data

Due: 2015.Dec.09 (Fri) 11:00 On D2L, submit your file movies.xml (and, if using an external DTD, movies.dtd). Hardcopy not needed.

In this homework, we'll develop a DTD for the movies.xml (remember, use show-source to see the XML.) from last week's homework. (Note that you don't need any XSLT from the previous homework — you can just add the DTD to the XML file.)

  1. (9pts) Generate a DTD for the grammar (You can have the DTD either in-line in your xml file, or as an external file.) Validate the file, using an XML validator such as at xmlvalidation.com or validome.org. (It is easiest if you only have to upload one file to the validator, so I recommend keeping the DTD in the same file as your XML data.)

    Your DTD must match the three provided movies. Use your best judgement about whether a field that occurs in all three is required, or optional, or allowed to have multiple entries.

  2. (1pt) Define two (or more) entities1 such as “&disney;” which might expand to “Disney logonoid.com/images/mickey-mouse-logo.jpg Studios” as a clickable-link to their home-page.

Note that there's not much result to “view” for this homework; just the DTD embedded in the xml file, and perhaps the fact that it passes the external validator.


1Okay okay, if you get technical, the “&” and “;” aren't part of the entity. Still, you know what I mean. The ampersand and semicolon are part of how you denote an entity-literal. Similarly, in programming languages, quotes aren't part of the string but just how you denote what the string-literal is.      

homelectshws
D2Lbreeze (snow day)


©2016, Ian Barland, Radford University
Last modified 2016.Dec.07 (Wed)
Please mail any suggestions
(incl. typos, broken links)
to ibarlandradford.edu
Rendered by Racket.