summaryrefslogtreecommitdiff
path: root/docs/newapi.xsl
diff options
context:
space:
mode:
authorPeter Krempa <pkrempa@redhat.com>2023-02-17 22:47:34 +0100
committerPeter Krempa <pkrempa@redhat.com>2023-02-20 18:26:53 +0100
commit91d890bdced94d567e1abbfd376b01980a3765ce (patch)
tree53074b4d90983d2d08ed0cf5fda558cf83b1b7c8 /docs/newapi.xsl
parente0def8d58767c5f382eb84cf7ed01feeb2b8e080 (diff)
downloadlibvirt-91d890bdced94d567e1abbfd376b01980a3765ce.tar.gz
docs/html: Properly generate ACL permissions into API reference
The 'newapi.xsl' stylesheet was referencing non-existing paths to the XML files holding ACL permission flags for individual APIs. Additionally the 'document()' XSL function doesn't even allow concatenation of the path as it was done via '{$builddir}/src..', but requires either direct argument or use of the 'concat()' function. This meant that the 'acls' variable was always empty and thus none of our API documentation was actually generated with the 'acl' section. Fix it by passing the path to the XML via an argument to the stylesheet as the files differ based on which document is being generated. Since the 'admin' API does not have ACL we need to handle it separately now in the build system. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Diffstat (limited to 'docs/newapi.xsl')
-rw-r--r--docs/newapi.xsl12
1 files changed, 5 insertions, 7 deletions
diff --git a/docs/newapi.xsl b/docs/newapi.xsl
index 3de603bb00..cc3ec681b7 100644
--- a/docs/newapi.xsl
+++ b/docs/newapi.xsl
@@ -24,18 +24,16 @@
<xsl:param name="indexfile" select="''"/>
+ <xsl:param name="aclxmlpath" select="''"/>
+
<!-- the target directory for the HTML output -->
<xsl:variable name="htmldir">html</xsl:variable>
<xsl:variable name="href_base">../</xsl:variable>
<xsl:variable name="acls">
- <xsl:copy-of select="document('{$builddir}/src/libvirt_access.xml')/aclinfo/api"/>
- </xsl:variable>
- <xsl:variable name="qemuacls">
- <xsl:copy-of select="document('{$builddir}/src/libvirt_access_qemu.xml')/aclinfo/api"/>
- </xsl:variable>
- <xsl:variable name="lxcacls">
- <xsl:copy-of select="document('{$builddir}/src/libvirt_access_lxc.xml')/aclinfo/api"/>
+ <xsl:if test="$aclxmlpath != ''">
+ <xsl:copy-of select="document($aclxmlpath)/aclinfo/api"/>
+ </xsl:if>
</xsl:variable>
<xsl:template name="aclinfo">