Skip to content
This repository has been archived by the owner on Jul 10, 2024. It is now read-only.

Commit

Permalink
[jqassistant-archive/jqa-manual#7] The XSLT stylesheets generate now …
Browse files Browse the repository at this point in the history
…an id for every toplevel section title
  • Loading branch information
obfischer committed Oct 16, 2020
1 parent 47fb2d1 commit 4e6f3a3
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/main/xsl/plugin2asciidoc.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@
<xsl:param name="groupId"/>
<xsl:param name="artifactId"/>

<!--
! The value of this parameter is used as id in Asciidoctor for the
! toplevel section of the plugin documentation and as target for
! internal cross references.
!-->
<xsl:param name="toplevelid"/>

<xsl:variable name='newline'>
<xsl:text>&#10;</xsl:text>
</xsl:variable>
Expand All @@ -16,6 +23,11 @@
</xsl:template>

<xsl:template match="/">
<xsl:if test="not($toplevelid)">
<xsl:message terminate="yes">Parameter toplevelid is missing. Can't continue without that parameter.</xsl:message>
</xsl:if>

[id=<xsl:value-of select="$toplevelid"/>]
= <xsl:value-of select="//@name"/> Plugin
<xsl:value-of select="$newline"/>
<xsl:apply-templates select="//description"/>
Expand Down

0 comments on commit 4e6f3a3

Please sign in to comment.