XPath and Schematron for TEI Customization

Syd Bauman

2016-06-15

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

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