File: site.xsl

package info (click to toggle)
libvirt 11.8.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 208,540 kB
  • sloc: ansic: 534,712; xml: 319,206; python: 11,974; perl: 2,629; sh: 2,185; makefile: 448; javascript: 126; cpp: 22
file content (36 lines) | stat: -rw-r--r-- 1,189 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<?xml version="1.0"?>
<xsl:stylesheet
  xmlns:html="http://www.w3.org/1999/xhtml"
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  xmlns:exsl="http://exslt.org/common"
  exclude-result-prefixes="xsl exsl"
  version="1.0">

  <xsl:import href="page.xsl"/>

  <xsl:param name="builddir" select="'..'"/>

  <xsl:template match="html:div[@id='include']" mode="content">
    <xsl:call-template name="include"/>
  </xsl:template>

  <xsl:template name="include">
    <xsl:variable name="inchtml">
      <xsl:copy-of select="document(concat($builddir, '/docs/', @filename))"/>
    </xsl:variable>

    <xsl:apply-templates select="exsl:node-set($inchtml)/html:html/html:body/*" mode="content"/>
  </xsl:template>

  <xsl:output method="xml" omit-xml-declaration="yes" encoding="UTF-8" indent="yes"/>

  <xsl:template match="/">
    <xsl:apply-templates select="." mode="page">
      <xsl:with-param name="pagesrc" select="$pagesrc"/>
      <xsl:with-param name="timestamp" select="$timestamp"/>
      <xsl:with-param name="link_href_base" select="$href_base"/>
      <xsl:with-param name="asset_href_base" select="$href_base"/>
    </xsl:apply-templates>
  </xsl:template>

</xsl:stylesheet>