Schematron in ODD

Syd Bauman

2026-08-11

Review: XML representations

Classic boxes-inside-boxes representation of a mythical book that contains an introduction, two chapters, and an index, where each chapter contains a heading and two sections

Classic tree representation of a mythical book that contains an introduction, two chapters, and an index, where each chapter contains a heading and two sections

Try it!

An image of an oXygen window

tree (with self::)

Classic tree diagram of generic XML document, elements only, with /*[1]/*[2]/*[2]/*[3] highlighted.

descendants (child:: and descendant::)

Classic tree diagram of generic XML document, elements only, with /*[1]/*[2]/*[2]/*[3] highlighted, all its children marked in green, and all its descendants (including the children) surrounded with a green circle.

ancestors (parent:: and ancestor::)

Classic tree diagram of generic XML document, elements only, with /*[1]/*[2]/*[2]/*[3] highlighted, its parent marked in purple, and all its ancestors (including the parent) surrounded with a purple circle.

preceding (preceding:: and preceding-sibling::)

Classic tree diagram of generic XML document, elements only, with /*[1]/*[2]/*[2]/*[3] highlighted, its preceding siblings marked in red, and all its preceding elements (including the preceding siblings) surrounded with a red circle.

following (following:: and following-sibling::)

Classic tree diagram of generic XML document, elements only, with /*[1]/*[2]/*[2]/*[3] highlighted, its following sibling marked in blue, and all its following elements (including the following sibling) surrounded with a blue circle.

axes :-)

Combination of above 4

Predicates can be chained

The Hamlet file actually has lots of <ab> elements in speeches as well as <l> elements, so this line count stuff is not a true reflection of the length of speeches. It might be worth telling the students there’s something wrong with it, and asking them to look at the XML source to see if they can figure out what it is. Then you could amend the first item in this slide, and some of the ones in the next slide, to account for this.

Simplified XML tree

Classic simplified tree diagram of the limerick Warp Speed, Ms Bright! that uses a dashed curved arrow to represent the link from the <note> to the <term>, and a dotted arrow to indicate the link from the <ptr> to the Wikipedia article. It is simplified because it does not contain attribute (or text) nodes, and is missing an <l>.

XPath view

Tree diagram of the limerick Warp Speed, Ms Bright! that has element, attribute, and text nodes except for whitespace-only text nodes.