vty: Merge from a generic section in case no specific one exists

jolly/7bit_ussd
Holger Hans Peter Freyther 11 years ago
parent e89ad6d1dd
commit 317aee5878
  1. 13
      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>

Loading…
Cancel
Save