aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2012-07-25 17:33:18 +0200
committerHolger Hans Peter Freyther <zecke@selfish.org>2012-07-25 17:35:52 +0200
commit317aee5878d6fd2a6c69d0b9632e36376ba2de62 (patch)
tree9575df2b86eeae8c97eaf8db8cf33d3c7313391e /doc
parente89ad6d1dd9a2d5c0841358eb76e2a4ad9606f4b (diff)
vty: Merge from a generic section in case no specific one exists
Diffstat (limited to 'doc')
-rw-r--r--doc/vty/merge_doc.xsl13
1 files changed, 11 insertions, 2 deletions
diff --git a/doc/vty/merge_doc.xsl b/doc/vty/merge_doc.xsl
index c4e05203..caea1103 100644
--- a/doc/vty/merge_doc.xsl
+++ b/doc/vty/merge_doc.xsl
@@ -27,12 +27,21 @@
<!-- Copy command and add nodes -->
<xsl:template match="vty:command">
+ <xsl:variable name="info" select="document($with)/vty:vtydoc/vty:node[@id=current()/../@id]/vty:command[@id=current()/@id]/." />
+ <xsl:variable name="info_generic" select="document($with)/vty:vtydoc/vty:common/vty:command[@id=current()/@id]/." />
<xsl:copy>
<xsl:apply-templates select="@*|node()" />
- <xsl:variable name="info" select="document($with)/vty:vtydoc/vty:node[@id=current()/../@id]/vty:command[@id=current()/@id]/." />
+
+ <!-- Copy the specific issue... -->
<xsl:for-each select="$info/*">
- <xsl:copy-of select="." />
+ <xsl:copy-of select="." />
</xsl:for-each>
+
+ <xsl:if test="not($info)">
+ <xsl:for-each select="$info_generic/*">
+ <xsl:copy-of select="." />
+ </xsl:for-each>
+ </xsl:if>
</xsl:copy>
</xsl:template>
</xsl:transform>