XML: Foundations, Techniques, Applications; Summer 2000
Solution to Problem 7: Harold Boley
July 13, 2000
a)
Not well-formed, since 1st definition contains
start-tag without end-tag . Easiest correction:
Remove , obtaining 1st definition.
b)
Not valid w.r.t. Mathpaper DTD -- after well-formedness correction
in a): Element
1st corollary's statement
1st corollary's proof
contains stat and proof subelements, but for coro the DTD defined none.
Easiest correction (for fixed DTD): Remove stat and proof *as tags* in
the coro element, leaving only PCDATA inside, as in
stat: 1st corollary's statement
proof: 1st corollary's proof
Easiest correction (for flexible DTD): Insert new DTD declaration
c)
apply
/ | \
/ | \
/ | \
/ | \
/ | \
/ | \
/ | \
/ | \
/ | \
eq apply apply
/ | \ / | \
times ci ci times ci ci
| | | |
| | | |
x y y x
d)
apply(
eq(),
apply(
times(),
ci("x"),
ci("y")),
apply(
times(),
ci("y"),
ci("x")))
e)
. . .
easy
f)