3
0
Fork 0
forked from mirrors/nixpkgs

Manual: Generate stable ids for options

E.g. ‘#opt-boot.initrd.kernelModules’.

Also, shut up a stupid XSLT warning (‘attribute value is not an NCName’).
This commit is contained in:
Eelco Dolstra 2014-04-14 10:19:30 +02:00
parent 6449bc2f23
commit ba29614578

View file

@ -18,8 +18,10 @@
<variablelist>
<xsl:for-each select="attrs">
<xsl:variable name="id" select="concat('opt-', str:replace(str:replace(str:replace(str:replace(attr[@name = 'name']/string/@value, '*', '_'), '&lt;', '_'), '>', '_'), '?', '_'))" />
<varlistentry>
<term xml:id="{generate-id(attr[@name = 'name']/string/@value)}" xlink:href="#{generate-id(attr[@name = 'name']/string/@value)}">
<term xlink:href="#{$id}">
<xsl:attribute name="xml:id"><xsl:value-of select="$id"/></xsl:attribute>
<option>
<xsl:for-each select="attr[@name = 'name']/string">
<xsl:value-of select="@value" />