Task: Convert XHTML to XML

When and why? You inherit XHTML and want to convert it to something easier to work with and easier to maintain

What’s the problem? Difficult because the input is flat and the output hierarchical

]]>

Selects all h2 and li elements

Each h2 begins a new group, which continues until the next h2 or the end of the lis

Refer to the current group as current-group()

Grouping in XSLT, slide 8 of 9