doc: parameterize hidden config option doc generation

Add a configuration parameter for the xsltproc processing to decide
whether to include hidden options.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
This commit is contained in:
David B. Kinder
2022-06-07 17:21:53 -07:00
committed by David Kinder
parent 6eeef69433
commit 98a3d0d2cf
2 changed files with 12 additions and 4 deletions

View File

@@ -5,6 +5,8 @@
<xsl:variable name="section_adornment" select="'#*=-%+@`'"/>
<xsl:variable name="vLower" select="'abcdefghijklmnopqrstuvwxyz'"/>
<xsl:variable name="vUpper" select="'ABCDEFGHIJKLMNOPQRSTUVWXYZ'"/>
<!-- Default is to not show hidden options (acrn:views='') overridded by passing - -paramstring showHidden 'y' to xsltproc -->
<xsl:param name="showHidden" select="n" />
<!-- xslt script to autogenerate config option documentation -->
<!-- Get things started with the ACRNConfigType element -->
<xsl:template match="/xs:schema">
@@ -56,9 +58,9 @@
<!-- Only visit elements having complex types. Those having simple types are
described as an option -->
<xsl:choose>
<xsl:when test="xs:annotation/@acrn:views=''">
<!-- don't document elements if not viewable -->
</xsl:when>
<xsl:when test="xs:annotation/@acrn:views='' and $showHidden='n'">
</xsl:when>
<xsl:when test="//xs:complexType[@name=$ty]">
<!-- The section header -->
<xsl:if test="$level &lt;= 4">
@@ -136,6 +138,9 @@
<xsl:when test="xs:annotation/@acrn:views=''">
<xsl:text>|icon-not-available| </xsl:text>
</xsl:when>
<xsl:when test="$parent/xs:annotation/@acrn:views=''">
<xsl:text>|icon-not-available| </xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:choose>
<xsl:when test="count(ancestor-or-self::node()[xs:annotation[@acrn:views]])!=0">