mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-13 05:05:29 +03:00
make-options-doc: Make variablelist id configurable
I've tried XInclude set-xml-id first, but our tooling did not pick up on it.
This commit is contained in:
parent
4a8bc4fd07
commit
aff2dbbc82
2 changed files with 8 additions and 1 deletions
|
@ -22,6 +22,10 @@
|
||||||
, transformOptions ? lib.id # function for additional tranformations of the options
|
, transformOptions ? lib.id # function for additional tranformations of the options
|
||||||
, documentType ? "appendix" # TODO deprecate "appendix" in favor of "none"
|
, documentType ? "appendix" # TODO deprecate "appendix" in favor of "none"
|
||||||
# and/or rename function to moduleOptionDoc for clean slate
|
# and/or rename function to moduleOptionDoc for clean slate
|
||||||
|
|
||||||
|
# If you include more than one option list into a document, you need to
|
||||||
|
# provide different ids.
|
||||||
|
, variablelistId ? "configuration-variable-list"
|
||||||
, revision ? "" # Specify revision for the options
|
, revision ? "" # Specify revision for the options
|
||||||
# a set of options the docs we are generating will be merged into, as if by recursiveUpdate.
|
# a set of options the docs we are generating will be merged into, as if by recursiveUpdate.
|
||||||
# used to split the options doc build into a static part (nixos/modules) and a dynamic part
|
# used to split the options doc build into a static part (nixos/modules) and a dynamic part
|
||||||
|
@ -177,6 +181,7 @@ in rec {
|
||||||
${pkgs.libxslt.bin}/bin/xsltproc \
|
${pkgs.libxslt.bin}/bin/xsltproc \
|
||||||
--stringparam documentType '${documentType}' \
|
--stringparam documentType '${documentType}' \
|
||||||
--stringparam revision '${revision}' \
|
--stringparam revision '${revision}' \
|
||||||
|
--stringparam variablelistId '${variablelistId}' \
|
||||||
-o intermediate.xml ${./options-to-docbook.xsl} sorted.xml
|
-o intermediate.xml ${./options-to-docbook.xsl} sorted.xml
|
||||||
${pkgs.libxslt.bin}/bin/xsltproc \
|
${pkgs.libxslt.bin}/bin/xsltproc \
|
||||||
-o "$out" ${./postprocess-option-descriptions.xsl} intermediate.xml
|
-o "$out" ${./postprocess-option-descriptions.xsl} intermediate.xml
|
||||||
|
|
|
@ -14,6 +14,7 @@
|
||||||
<xsl:param name="revision" />
|
<xsl:param name="revision" />
|
||||||
<xsl:param name="documentType" />
|
<xsl:param name="documentType" />
|
||||||
<xsl:param name="program" />
|
<xsl:param name="program" />
|
||||||
|
<xsl:param name="variablelistId" />
|
||||||
|
|
||||||
|
|
||||||
<xsl:template match="/expr/list">
|
<xsl:template match="/expr/list">
|
||||||
|
@ -31,7 +32,8 @@
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
||||||
<xsl:template name="variable-list">
|
<xsl:template name="variable-list">
|
||||||
<variablelist xml:id="configuration-variable-list">
|
<variablelist>
|
||||||
|
<xsl:attribute name="id" namespace="http://www.w3.org/XML/1998/namespace"><xsl:value-of select="$variablelistId"/></xsl:attribute>
|
||||||
<xsl:for-each select="attrs">
|
<xsl:for-each select="attrs">
|
||||||
<xsl:variable name="id" select="
|
<xsl:variable name="id" select="
|
||||||
concat('opt-',
|
concat('opt-',
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue