summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVadim Yanitskiy <vyanitskiy@sysmocom.de>2020-10-07 15:08:53 +0700
committerVadim Yanitskiy <vyanitskiy@sysmocom.de>2020-10-07 15:09:00 +0700
commit204550e1245fee07e1b917dabb9648082e21e17c (patch)
tree0395a113e21cfae1b7fcf67d0f3c41e16ddb0dc2
parentd3ac855a38340b7b41a102f9698ebea34d1d22db (diff)
vty_reference.xsl: also handle 'global' and 'library' attributes
Unfortunately, there is no xsl:function support in XSL 1.0, so we have to duplicate the existing code :/ For more details about the attribute scopes / types, see: https://lists.osmocom.org/pipermail/openbsc/2020-October/013278.html Change-Id: I7f7e6e32c156de24dcc80166a29119e6dda8c169 Related: SYS#4937
-rw-r--r--vty_reference.xsl57
1 files changed, 56 insertions, 1 deletions
diff --git a/vty_reference.xsl b/vty_reference.xsl
index 414a1a8..d7aaa8b 100644
--- a/vty_reference.xsl
+++ b/vty_reference.xsl
@@ -40,11 +40,66 @@
</listitem>
</varlistentry></variablelist>
+ <!-- Unfortunately, there is no xsl:function support in XSL 1.0 -->
+
+ <!-- Print global attributes (if any) -->
+ <xsl:if test="./vty:attributes[@scope='global']">
+ <variablelist>
+ <varlistentry>
+ <listitem>
+ <para>Global attributes</para>
+ </listitem>
+ </varlistentry>
+ <xsl:for-each select="./vty:attributes[@scope='global']/*">
+ <varlistentry>
+ <listitem>
+ <xsl:choose>
+ <xsl:when test="@flag">
+ <para>Flag: <xsl:value-of select="@flag" /></para>
+ </xsl:when>
+ <xsl:otherwise>
+ <para>Flag: (not assigned)</para>
+ </xsl:otherwise>
+ </xsl:choose>
+ <para><xsl:value-of select="@doc" /></para>
+ </listitem>
+ </varlistentry>
+ </xsl:for-each>
+ </variablelist>
+ </xsl:if>
+
+ <!-- Print library specific attributes (if any) -->
+ <xsl:if test="./vty:attributes[@scope='library']">
+ <variablelist>
+ <varlistentry>
+ <listitem>
+ <para>Library specific attributes</para>
+ </listitem>
+ </varlistentry>
+ <xsl:for-each select="./vty:attributes[@scope='library']/*">
+ <varlistentry>
+ <listitem>
+ <xsl:choose>
+ <xsl:when test="@flag">
+ <para>Flag: <xsl:value-of select="@flag" /></para>
+ </xsl:when>
+ <xsl:otherwise>
+ <para>Flag: (not assigned)</para>
+ </xsl:otherwise>
+ </xsl:choose>
+ <para><xsl:value-of select="@doc" /></para>
+ </listitem>
+ </varlistentry>
+ </xsl:for-each>
+ </variablelist>
+ </xsl:if>
+
+ <!-- Print application specific attributes (if any) -->
<xsl:if test="./vty:attributes[@scope='application']">
<variablelist>
<varlistentry>
<listitem>
- <para>Attributes</para>
+ <para>Application specific attributes</para>
</listitem>
</varlistentry>
<xsl:for-each select="./vty:attributes[@scope='application']/*">