CS 6795 Semantic Web Techniques

Assignment 1


Syllabus
Assigns
Notes
Labs
Project
Resources

 (Please indicate which 5-of-10 subproblems should be graded, except for a0), which cannot be chosen and will not be graded)

Consider the following proposal of a node-labeled ordered tree for taxi rides, instantiated with leaves for a particular taxi ride:

                         taxi-ride
                       /        |            \
 
                      /         |              \
             driver   passengers   transport-information
               /   \                        /         |                          \
              /     \                    /            |                             \
  number   name         date       destination                 fare
    |            /  |  \              |              /          \                         \
    |          /    |   \             |             /            \                          \
  37    first mid last   9/27    street           municipality      12.50
             |       |     |                   /    \                |               \
       Peter   C.  Jones           /       \               |                 \
                                          /          \                                 \
                              number appellation  appellation   province
                                |                |                    |                      |
                              12       Main St       Fredericton          NB


a0)
Do the missing leaf data for passengers cause any (XML-level) issue?

a1) Does the repeatedly occurring appellation label cause a problem with respect to the unambiguous representation of all parts of the taxi-ride information?
Hint: Is it even necessary to check whether every leaf of the tree - ordered  from 37 to 12.50 - is uniquely denoted by the "path name" of node labels leading to it from the taxi-ride root? What about any other repeatedly occurring label?

a2) What if the nodes labeled 'appellation' would have been labeled 'name', too?

a3) Independently of a1) and a2), improve the readability of the tree via a simple relabeling.

b1,2) Could well-formed XML elements be given for the tree versions from a1) and a2)?

b3) Give a well-formed XML element representing your a3)-improved tree.

c) Give a b3)-equivalent Prolog term.

d1) Try to write a DTD that exactly defines taxi-rides according to the original a1)-tree or b1)-element. Explain why this is (im)possible.

d2) Try a modified DTD that exactly defines taxi-rides according to the a2)-tree or b2)-element, with 'appellation' relabeled to 'name'. Explain why that is (im)possible.
Hint: Contrast PCDATA with subelements.

d3) Modify things such that a DTD exactly defines taxi-rides according to your readability-improved a3)-tree or b3)-element or c)-term. In what sense is the b3)-element valid with respect to this DTD?
 

 

 


Maintained by Harold Boley