mirror of https://gerrit.osmocom.org/libosmocore
vty: Merge from a generic section in case no specific one exists
parent
e89ad6d1dd
commit
317aee5878
|
@ -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…
Reference in New Issue