This code sample is adapted from Clifford B. Anderson and Joseph C. Wicentowski, XQuery for Humanists (College Station: Texas A&M University Press, 2020), 187-188. Download this code sample in its raw form. View the source on GitHub.

<ul>
    <li><a href="#ch1">Chapter One</a>
        <ul>
            <li><a href="#ch1.1">Introduction</a></li>
            <li><a href="#ch1.2">Section 1</a>
                <ul>
                    <li><a href="#ch1.2.1">Subsection 1</a></li>
                    <!-- Additional subsections -->
                </ul>
            </li>
            <!-- Additional sections -->
        </ul>
    </li>
    <!-- Additional chapters -->
</ul>