docs: fix include of ACL permissions files

The XSL generator loads included HTML files relative to the source dir
but we need to tell it to load them from the build dir instead.

Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
Daniel P. Berrangé 2019-11-20 15:24:18 +00:00
parent 9434d7e139
commit eef089db78
3 changed files with 4 additions and 2 deletions

View File

@ -293,6 +293,7 @@ EXTRA_DIST += \
style=subsite.xsl; \ style=subsite.xsl; \
fi; \ fi; \
$(XSLTPROC) --stringparam pagename $$name \ $(XSLTPROC) --stringparam pagename $$name \
--stringparam builddir '$(abs_top_builddir)' \
--stringparam timestamp $(timestamp) --nonet \ --stringparam timestamp $(timestamp) --nonet \
$(top_srcdir)/docs/$$style $< > $@ \ $(top_srcdir)/docs/$$style $< > $@ \
|| { rm $@ && exit 1; } || { rm $@ && exit 1; }

View File

@ -22,7 +22,6 @@
<!-- Build keys for all symbols --> <!-- Build keys for all symbols -->
<xsl:key name="symbols" match="/api/symbols/*" use="@name"/> <xsl:key name="symbols" match="/api/symbols/*" use="@name"/>
<xsl:param name="builddir" select="'..'"/>
<xsl:param name="indexfile" select="'index.html'"/> <xsl:param name="indexfile" select="'index.html'"/>
<!-- the target directory for the HTML output --> <!-- the target directory for the HTML output -->

View File

@ -7,6 +7,8 @@
exclude-result-prefixes="xsl exsl html" exclude-result-prefixes="xsl exsl html"
version="1.0"> version="1.0">
<xsl:param name="builddir" select="'..'"/>
<xsl:template match="node() | @*" mode="content"> <xsl:template match="node() | @*" mode="content">
<xsl:copy> <xsl:copy>
<xsl:apply-templates select="node() | @*" mode="content"/> <xsl:apply-templates select="node() | @*" mode="content"/>
@ -168,7 +170,7 @@
<xsl:template name="include"> <xsl:template name="include">
<xsl:variable name="inchtml"> <xsl:variable name="inchtml">
<xsl:copy-of select="document(@filename)"/> <xsl:copy-of select="document(concat($builddir, '/docs/', @filename))"/>
</xsl:variable> </xsl:variable>
<xsl:apply-templates select="exsl:node-set($inchtml)/html:html/html:body/*" mode="content"/> <xsl:apply-templates select="exsl:node-set($inchtml)/html:html/html:body/*" mode="content"/>