Skip to content

Commit

Permalink
Recognize section element for intra xrefs
Browse files Browse the repository at this point in the history
GeekoDoc allows section's now (see openSUSE/geekodoc#34) which should
be taken into account
  • Loading branch information
tomschr committed Jan 29, 2018
1 parent 8e4e9d4 commit 42fc208
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions daps-xslt/lib/resolve-xrefs.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@

<!-- DocBook4 template rules in xref.target mode -->
<xsl:template match="chapter|appendix|preface|part|
sect1|sect2|sect3|sect4|sect5" mode="xref.target">
sect1|sect2|sect3|sect4|sect5|section" mode="xref.target">
<xsl:param name="target" select="."/>
<xsl:param name="target.book.info"/>
<xsl:variable name="title" select="(title|*/title)[1]"/>
Expand All @@ -144,7 +144,8 @@
<xsl:if test="$target/self::sect1 or
$target/self::sect2 or
$target/self::sect3 or
$target/self::sect4">
$target/self::sect4 or
$target/self::section">
<xsl:call-template name="gentext">
<xsl:with-param name="key" select="local-name($target)"/>
</xsl:call-template>
Expand Down Expand Up @@ -208,7 +209,7 @@

<!-- DocBook5 template rules in xref.target mode -->
<xsl:template match="d:chapter|d:appendix|d:preface|d:part|
d:sect1|d:sect2|d:sect3|d:sect4|d:sect5" mode="xref.target">
d:sect1|d:sect2|d:sect3|d:sect4|d:sect5|d:section" mode="xref.target">
<xsl:param name="target" select="."/>
<xsl:param name="target.book.info"/>
<xsl:variable name="title" select="(d:title|*/d:title)[1]"/>
Expand All @@ -224,7 +225,8 @@
<xsl:if test="$target/self::d:sect1 or
$target/self::d:sect2 or
$target/self::d:sect3 or
$target/self::d:sect4">
$target/self::d:sect4 or
$target/self::d:section">
<xsl:call-template name="gentext">
<xsl:with-param name="key" select="local-name($target)"/>
</xsl:call-template>
Expand Down

0 comments on commit 42fc208

Please sign in to comment.