<?xml version="1.0" encoding="UTF-8"?>
<?xml-model href="" href="http://docbook.org/xml/5.1/rng/docbook.rng">http://docbook.org/xml/5.1/rng/docbook.rng" schematypens="
http://relaxng.org/ns/structure/1.0"?>
<?xml-model href="" href="http://docbook.org/xml/5.1/sch/docbook.sch">http://docbook.org/xml/5.1/sch/docbook.sch" type="application/xml" schematypens="
http://purl.oclc.org/dsdl/schematron"?>
<article xmlns="
http://docbook.org/ns/docbook"
xmlns:xlink="
http://www.w3.org/1999/xlink" version="5.1">
<title>AE</title>
<para>Ref: <xref linkend="fig"/>; <xref linkend="a"/>; <xref linkend="b"/></para>
<figure xml:id="fig">
<title>Main figure</title>
<mediaobject xml:id="a">
<textobject><simpara>A</simpara></textobject>
</mediaobject>
<mediaobject xml:id="b">
<textobject><simpara>B</simpara></textobject>
</mediaobject>
</figure>
</article>
My most natural solution would be to allow figure within figure, i.e. things like this:
<?xml version="1.0" encoding="UTF-8"?>
<?xml-model href="" href="http://docbook.org/xml/5.1/rng/docbook.rng">http://docbook.org/xml/5.1/rng/docbook.rng" schematypens="
http://relaxng.org/ns/structure/1.0"?>
<?xml-model href="" href="http://docbook.org/xml/5.1/sch/docbook.sch">http://docbook.org/xml/5.1/sch/docbook.sch" type="application/xml" schematypens="
http://purl.oclc.org/dsdl/schematron"?>
<article xmlns="
http://docbook.org/ns/docbook"
xmlns:xlink="
http://www.w3.org/1999/xlink" version="5.1">
<title>AE</title>
<para>Ref: <xref linkend="fig"/>; <xref linkend="a"/>; <xref linkend="b"/></para>
<figure xml:id="fig">
<title>Main figure</title>
<figure>
<title>A</title>
<mediaobject xml:id="a">
<textobject><simpara>figure</simpara></textobject>
</mediaobject>
</figure>
<figure>
<title>B</title>
<mediaobject xml:id="b">
<textobject><simpara>figure</simpara></textobject>
</mediaobject>
</figure>
</figure>
</article>
Do you have a better way of encoding subfigures (with cross-referencing) or is it completely out of scope for current DocBook (in which case I can submit a PR for DocBook 5.2)?