Appendix A. How did you do that?

Using XInclude to read actual source documents reduces the chances that your code and your documentation will get out of sync.

The “How?” slide is just this:

<article xml:id='how'>
<title>How?</title>
 
<para>Markup.</para>
 
<programlisting role="monochrome"
                linenumbering="unnumbered"
                language="xml"
><xi:include
     href="links.xml" parse="text"
     xpointer="search=/extended-link/,#/extended-link#"
/></programlisting>
</article>
☝︎
Important

The use of xpointer here is a complete hack. I really should be using the fragid attribute but there’s a bug in the DocBook schemas.

This slide is, of course, just this:

<appendix>
<title>How did you do <emphasis>that</emphasis>?</title>
 
<para>Using XInclude to read actual source
documents reduces the chances that your code
and your documentation will get out of sync.</para>
 
<para>The “<link linkend="how">How?</link>
slide is just this:</para>
 
<programlisting role="monochrome"
                linenumbering="unnumbered"
                language="xml"
><xi:include href="links.xml" parse="text"
     xpointer="search=/xml:id='how'/,#/article#"
/></programlisting>
 
<important>
<para>The use of <tag class="attribute">xpointer</tag>
here is a complete hack. I really should be using
the <tag class="attribute">fragid</tag> attribute
but there’s
<link xlink:href="https://github.com/docbook/docbook/issues/156">a
bug</link> in the DocBook schemas.</para>
</important>
 
<para><emphasis>This</emphasis> slide is,
of course, just this:</para>
 
<programlisting role="monochrome"
                linenumbering="unnumbered"
                language="xml"
><xi:include href="links.xml" parse="text"
     xpointer="search=/&lt;appendix/,2#/appendix#"
/></programlisting>
 
<para>because it’s turtles all the way down.</para>
</appendix>

because it’s turtles all the way down.

Appendix A. How did you do that?

Using XInclude to read actual source documents reduces the chances that your code and your documentation will get out of sync.

The “How?” slide is just this:

<article xml:id='how'>
<title>How?</title>
 
<para>Markup.</para>
 
<programlisting role="monochrome"
                linenumbering="unnumbered"
                language="xml"
><xi:include
     href="links.xml" parse="text"
     xpointer="search=/extended-link/,#/extended-link#"
/></programlisting>
</article>
☝︎
Important

The use of xpointer here is a complete hack. I really should be using the fragid attribute but there’s a bug in the DocBook schemas.

This slide is, of course, just this:

<appendix>
<title>How did you do <emphasis>that</emphasis>?</title>
 
<para>Using XInclude to read actual source
documents reduces the chances that your code
and your documentation will get out of sync.</para>
 
<para>The “<link linkend="how">How?</link>
slide is just this:</para>
 
<programlisting role="monochrome"
                linenumbering="unnumbered"
                language="xml"
><xi:include href="links.xml" parse="text"
     xpointer="search=/xml:id='how'/,#/article#"
/></programlisting>
 
<important>
<para>The use of <tag class="attribute">xpointer</tag>
here is a complete hack. I really should be using
the <tag class="attribute">fragid</tag> attribute
but there’s
<link xlink:href="https://github.com/docbook/docbook/issues/156">a
bug</link> in the DocBook schemas.</para>
</important>
 
<para><emphasis>This</emphasis> slide is,
of course, just this:</para>
 
<programlisting role="monochrome"
                linenumbering="unnumbered"
                language="xml"
><xi:include href="links.xml" parse="text"
     xpointer="search=/&lt;appendix/,2#/appendix#"
/></programlisting>
 
<para>because it’s turtles all the way down.</para>
</appendix>

because it’s turtles all the way down.