2005-12-07 12:33:00 +03:00
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl= "http://www.w3.org/1999/XSL/Transform" version= "1.0" >
<xsl:output method= "xml" encoding= "ISO-8859-1" indent= "yes"
doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"/>
<xsl:variable name= "href_base" select= "''" />
<xsl:variable name= "menu_name" > Main Menu</xsl:variable>
<!--
- returns the filename associated to an ID in the original file
-->
<xsl:template name= "tocfilename" >
<xsl:param name= "name" select= "string(@href)" />
<xsl:choose >
<xsl:when test= "$name = '#Introducti'" >
<xsl:text > intro.html</xsl:text>
</xsl:when>
<xsl:when test= "$name = '#Documentat'" >
<xsl:text > docs.html</xsl:text>
</xsl:when>
<xsl:when test= "$name = '#Reporting'" >
<xsl:text > bugs.html</xsl:text>
</xsl:when>
<xsl:when test= "$name = '#help'" >
<xsl:text > help.html</xsl:text>
</xsl:when>
<xsl:when test= "$name = '#Help'" >
<xsl:text > help.html</xsl:text>
</xsl:when>
<xsl:when test= "$name = '#Downloads'" >
<xsl:text > downloads.html</xsl:text>
</xsl:when>
<xsl:when test= "$name = '#News'" >
<xsl:text > news.html</xsl:text>
</xsl:when>
<xsl:when test= "$name = '#Contributi'" >
<xsl:text > contribs.html</xsl:text>
</xsl:when>
<xsl:when test= "$name = '#xsltproc'" >
<xsl:text > xsltproc2.html</xsl:text>
</xsl:when>
<xsl:when test= "$name = '#API'" >
<xsl:text > </xsl:text>
</xsl:when>
<xsl:when test= "$name = '#XSLT'" >
<xsl:text > XSLT.html</xsl:text>
</xsl:when>
<xsl:when test= "$name = '#XML'" >
<xsl:text > XMLinfo.html</xsl:text>
</xsl:when>
<xsl:when test= "$name = '#Validation'" >
<xsl:text > xmldtd.html</xsl:text>
</xsl:when>
<xsl:when test= "$name = '#tree'" >
<xsl:text > </xsl:text>
</xsl:when>
<xsl:when test= "$name = '#library'" >
<xsl:text > </xsl:text>
</xsl:when>
<xsl:when test= "$name = '#interface'" >
<xsl:text > </xsl:text>
</xsl:when>
<xsl:when test= "$name = '#Example'" >
<xsl:text > </xsl:text>
</xsl:when>
<xsl:when test= "$name = '#Entities'" >
<xsl:text > </xsl:text>
</xsl:when>
<xsl:when test= "$name = '#architecture'" >
2005-12-21 19:59:34 +03:00
<xsl:text > architecture.html</xsl:text>
2005-12-07 12:33:00 +03:00
</xsl:when>
<xsl:when test= "$name = '#Namespaces'" >
<xsl:text > namespaces.html</xsl:text>
</xsl:when>
<xsl:when test= "$name = '#DOM'" >
<xsl:text > </xsl:text>
</xsl:when>
<xsl:when test= "$name = '#Catalog'" >
<xsl:text > catalog.html</xsl:text>
</xsl:when>
<xsl:when test= "$name = '#Upgrading'" >
<xsl:text > </xsl:text>
</xsl:when>
<xsl:when test= "$name = '#Encodings'" >
<xsl:text > encoding.html</xsl:text>
</xsl:when>
<xsl:when test= "$name = '#IO'" >
<xsl:text > </xsl:text>
</xsl:when>
<xsl:when test= "$name = '#Memory'" >
<xsl:text > </xsl:text>
</xsl:when>
<xsl:when test= "$name = '#Thread'" >
<xsl:text > </xsl:text>
</xsl:when>
<xsl:when test= "$name = '#FAQ'" >
<xsl:text > FAQ.html</xsl:text>
</xsl:when>
<xsl:when test= "$name = '#Python'" >
<xsl:text > </xsl:text>
</xsl:when>
<xsl:when test= "$name = ''" >
<xsl:text > unknown.html</xsl:text>
</xsl:when>
<xsl:otherwise >
<xsl:value-of select= "$name" />
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template name= "filename" >
<xsl:param name= "name" select= "string(@href)" />
<xsl:choose >
<xsl:when test= "$name = '#Introducti'" >
<xsl:text > intro.html</xsl:text>
</xsl:when>
<xsl:when test= "$name = '#Documentat'" >
<xsl:text > docs.html</xsl:text>
</xsl:when>
<xsl:when test= "$name = '#Reporting'" >
<xsl:text > bugs.html</xsl:text>
</xsl:when>
<xsl:when test= "$name = '#help'" >
<xsl:text > help.html</xsl:text>
</xsl:when>
<xsl:when test= "$name = '#Help'" >
<xsl:text > help.html</xsl:text>
</xsl:when>
<xsl:when test= "$name = '#Downloads'" >
<xsl:text > downloads.html</xsl:text>
</xsl:when>
<xsl:when test= "$name = '#News'" >
<xsl:text > news.html</xsl:text>
</xsl:when>
<xsl:when test= "$name = '#Contributi'" >
<xsl:text > contribs.html</xsl:text>
</xsl:when>
<xsl:when test= "$name = '#xsltproc'" >
<xsl:text > xsltproc2.html</xsl:text>
</xsl:when>
<xsl:when test= "$name = '#API'" >
2006-01-20 18:49:04 +03:00
<xsl:text > </xsl:text>
2005-12-07 12:33:00 +03:00
</xsl:when>
<xsl:when test= "$name = '#XSLT'" >
<xsl:text > XSLT.html</xsl:text>
</xsl:when>
<xsl:when test= "$name = '#XML'" >
<xsl:text > XMLinfo.html</xsl:text>
</xsl:when>
<xsl:when test= "$name = '#Validation'" >
<xsl:text > xmldtd.html</xsl:text>
</xsl:when>
<xsl:when test= "$name = '#tree'" >
2006-01-20 18:49:04 +03:00
<xsl:text > </xsl:text>
2005-12-07 12:33:00 +03:00
</xsl:when>
<xsl:when test= "$name = '#library'" >
2006-01-20 18:49:04 +03:00
<xsl:text > </xsl:text>
2005-12-07 12:33:00 +03:00
</xsl:when>
<xsl:when test= "$name = '#interface'" >
2006-01-20 18:49:04 +03:00
<xsl:text > </xsl:text>
2005-12-07 12:33:00 +03:00
</xsl:when>
<xsl:when test= "$name = '#Example'" >
2006-01-20 18:49:04 +03:00
<xsl:text > </xsl:text>
2005-12-07 12:33:00 +03:00
</xsl:when>
<xsl:when test= "$name = '#Entities'" >
2006-01-20 18:49:04 +03:00
<xsl:text > </xsl:text>
2005-12-07 12:33:00 +03:00
</xsl:when>
<xsl:when test= "$name = '#architecture'" >
<xsl:text > architecture.html</xsl:text>
</xsl:when>
<xsl:when test= "$name = '#Namespaces'" >
<xsl:text > namespaces.html</xsl:text>
</xsl:when>
<xsl:when test= "$name = '#DOM'" >
2006-01-20 18:49:04 +03:00
<xsl:text > </xsl:text>
2005-12-07 12:33:00 +03:00
</xsl:when>
<xsl:when test= "$name = '#Catalog'" >
<xsl:text > catalog.html</xsl:text>
</xsl:when>
<xsl:when test= "$name = '#Upgrading'" >
2006-01-20 18:49:04 +03:00
<xsl:text > </xsl:text>
2005-12-07 12:33:00 +03:00
</xsl:when>
<xsl:when test= "$name = '#Encodings'" >
<xsl:text > encoding.html</xsl:text>
</xsl:when>
<xsl:when test= "$name = '#IO'" >
2006-01-20 18:49:04 +03:00
<xsl:text > </xsl:text>
2005-12-07 12:33:00 +03:00
</xsl:when>
<xsl:when test= "$name = '#Memory'" >
2006-01-20 18:49:04 +03:00
<xsl:text > </xsl:text>
2005-12-07 12:33:00 +03:00
</xsl:when>
<xsl:when test= "$name = '#Thread'" >
2006-01-20 18:49:04 +03:00
<xsl:text > </xsl:text>
2005-12-07 12:33:00 +03:00
</xsl:when>
<xsl:when test= "$name = '#FAQ'" >
<xsl:text > FAQ.html</xsl:text>
</xsl:when>
<xsl:when test= "$name = '#Python'" >
2006-01-20 18:49:04 +03:00
<xsl:text > </xsl:text>
2005-12-07 12:33:00 +03:00
</xsl:when>
<xsl:when test= "$name = ''" >
<xsl:text > unknown.html</xsl:text>
</xsl:when>
<xsl:otherwise >
<xsl:value-of select= "$name" />
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<!--
- The global title
-->
<xsl:variable name= "globaltitle" select= "string(/html/body/h1[1])" />
2006-01-20 18:49:04 +03:00
2005-12-07 12:33:00 +03:00
<!--
2006-01-20 18:49:04 +03:00
the main menu box
2005-12-07 12:33:00 +03:00
-->
2006-01-22 02:34:36 +03:00
<xsl:template name= "linkList" >
<div class= "linkList" >
<div class= "llinks" >
<h3 class= "links" > <span > main menu</span> </h3>
<ul >
2006-01-29 11:52:59 +03:00
<li > Home</li>
2006-01-22 02:34:36 +03:00
<xsl:for-each select= "/html/body/h2" >
<xsl:variable name= "filename" >
<xsl:call-template name= "tocfilename" >
<xsl:with-param name= "name" select= "concat('#', string(a[1]/@name))" />
</xsl:call-template>
</xsl:variable>
<xsl:if test= "$filename != ''" >
<li >
<xsl:element name= "a" >
<xsl:attribute name= "href" >
<xsl:value-of select= "$filename" />
</xsl:attribute>
<xsl:if test= "$filename = 'docs.html'" >
<xsl:attribute name= "style" > font-weight:bold</xsl:attribute>
</xsl:if>
<xsl:value-of select= "." />
</xsl:element>
</li>
</xsl:if>
</xsl:for-each>
<li > <a style= "font-weight:bold"
href="{$href_base}html/index.html">API Menu</a> </li>
<li > <a href= "{$href_base}ChangeLog.html" > Recent Changes</a> </li>
</ul>
</div>
<div class= "llinks" >
<h3 class= "links" > <span > related links</span> </h3>
<ul >
<li > <a href= "https://www.redhat.com/archives/libvir-list/" > Mail archive</a> </li>
<li > <a href= "http://www.cl.cam.ac.uk/Research/SRG/netos/xen/index.html" > Xen project</a> </li>
<li > <form action= "search.php" enctype= "application/x-www-form-urlencoded" method= "get" >
<input name= "query" type= "text" size= "12" value= "Search..." /> <input name= "submit" type= "submit" value= "Go" />
</form> </li>
<li > <a href= "http://xmlsoft.org/" > <img src= "{$href_base}Libxml2-Logo-90x34.gif" alt= "Made with Libxml2 Logo" /> </a> </li>
</ul>
2006-01-29 11:52:59 +03:00
<p class= 'credits' > Graphics and design by <a href= "mail:dfong@redhat.com" > Diana Fong</a> </p>
2006-01-20 18:49:04 +03:00
</div>
2006-01-22 02:34:36 +03:00
</div>
</xsl:template>
<xsl:template name= "linkList2" >
<div class= "linkList2" >
<div class= "llinks2" >
<h3 class= "links2" > <span > main menu</span> </h3>
<ul >
<li > <a href= "{$href_base}index.html" > Home</a> </li>
2006-01-20 18:49:04 +03:00
<xsl:for-each select= "/html/body/h2" >
<xsl:variable name= "filename" >
<xsl:call-template name= "tocfilename" >
<xsl:with-param name= "name" select= "concat('#', string(a[1]/@name))" />
</xsl:call-template>
</xsl:variable>
<xsl:if test= "$filename != ''" >
2006-01-22 02:34:36 +03:00
<li >
2006-01-20 18:49:04 +03:00
<xsl:element name= "a" >
<xsl:attribute name= "href" >
<xsl:value-of select= "$filename" />
</xsl:attribute>
<xsl:if test= "$filename = 'docs.html'" >
<xsl:attribute name= "style" > font-weight:bold</xsl:attribute>
</xsl:if>
<xsl:value-of select= "." />
</xsl:element>
2006-01-22 02:34:36 +03:00
</li>
2006-01-20 18:49:04 +03:00
</xsl:if>
</xsl:for-each>
2006-01-22 02:34:36 +03:00
<li > <a style= "font-weight:bold"
href="{$href_base}html/index.html">API Menu</a> </li>
<li > <a href= "{$href_base}ChangeLog.html" > Recent Changes</a> </li>
2006-01-20 18:49:04 +03:00
2006-01-22 02:34:36 +03:00
</ul>
2006-01-20 18:49:04 +03:00
</div>
2006-01-22 02:34:36 +03:00
<div class= "llinks2" >
<h3 class= "links2" > <span > related links</span> </h3>
<ul >
<li > <a href= "https://www.redhat.com/archives/libvir-list/" > Mail archive</a> </li>
<li > <a href= "http://www.cl.cam.ac.uk/Research/SRG/netos/xen/index.html" > Xen project</a> </li>
<li > <form action= "search.php" enctype= "application/x-www-form-urlencoded" method= "get" >
<input name= "query" type= "text" size= "12" value= "Search..." /> <input name= "submit" type= "submit" value= "Go" />
</form> </li>
<li > <a href= "http://xmlsoft.org/" > <img src= "{$href_base}Libxml2-Logo-90x34.gif" alt= "Made with Libxml2 Logo" /> </a> </li>
</ul>
2006-01-29 11:52:59 +03:00
<p class= 'credits' > Graphics and design by <a href= "mail:dfong@redhat.com" > Diana Fong</a> </p>
2006-01-22 02:34:36 +03:00
</div>
</div>
2006-01-20 18:49:04 +03:00
</xsl:template>
<!--
the main menu box
-->
<xsl:template name= "develtoc" >
<div class= "left" >
2005-12-07 12:33:00 +03:00
<form action= "search.php"
enctype="application/x-www-form-urlencoded" method="get">
<input name= "query" type= "text" size= "20" value= "" />
<input name= "submit" type= "submit" value= "Search ..." />
</form>
2006-01-20 18:49:04 +03:00
<div class= "box" >
<h2 class= "box_title" > API menu</h2>
</div>
<p > <a href= "{$href_base}index.html" > Main menu</a> </p>
<p > <a href= "{$href_base}/html/index.html" > API menu</a> </p>
<p > <a href= "{$href_base}ChangeLog.html" > ChangeLog</a> </p>
<div class= "box" >
<h2 class= "box_title" > API Indexes</h2>
</div>
<p > <a href= "{$href_base}APIchunk0.html" > Alphabetic</a> </p>
<p > <a href= "{$href_base}APIconstructors.html" > Constructors</a> </p>
<p > <a href= "{$href_base}APIfunctions.html" > Functions/Types</a> </p>
<p > <a href= "{$href_base}APIfiles.html" > Modules</a> </p>
<p > <a href= "{$href_base}APIsymbols.html" > Symbols</a> </p>
<div class= "box" >
<h2 class= "box_title" > related links</h2>
</div>
<p > <a href= "https://www.redhat.com/archives/libvir-list/" > Mail archive</a> </p>
<p > <a href= "http://www.cl.cam.ac.uk/Research/SRG/netos/xen/index.html" > Xen project</a> </p>
2005-12-07 12:33:00 +03:00
<a href= "http://xmlsoft.org/" > <img src= "{$href_base}Libxml2-Logo-90x34.gif" alt= "Made with Libxml2 Logo" /> </a>
2006-01-20 18:49:04 +03:00
</div>
2006-01-22 02:34:36 +03:00
<div class= "linkList2" >
<div class= "llinks2" >
<h3 class= "links2" > <span > API menu</span> </h3>
<ul >
<li > <a href= "{$href_base}index.html" > Main menu</a> </li>
<li > <a href= "{$href_base}/html/index.html" > API menu</a> </li>
<li > <a href= "{$href_base}ChangeLog.html" > ChangeLog</a> </li>
</ul>
</div>
<div class= "llinks2" >
<h3 class= "links2" > <span > API indexes</span> </h3>
<ul >
<li > <a href= "{$href_base}APIchunk0.html" > Alphabetic</a> </li>
<li > <a href= "{$href_base}APIconstructors.html" > Constructors</a> </li>
<li > <a href= "{$href_base}APIfunctions.html" > Functions/Types</a> </li>
<li > <a href= "{$href_base}APIfiles.html" > Modules</a> </li>
<li > <a href= "{$href_base}APIsymbols.html" > Symbols</a> </li>
</ul>
</div>
<div class= "llinks2" >
<h3 class= "links2" > <span > related links</span> </h3>
<ul >
<li > <a href= "https://www.redhat.com/archives/libvir-list/" > Mail archive</a> </li>
<li > <a href= "http://www.cl.cam.ac.uk/Research/SRG/netos/xen/index.html" > Xen project</a> </li>
<li > <form action= "search.php" enctype= "application/x-www-form-urlencoded" method= "get" >
<input name= "query" type= "text" size= "12" value= "Search..." /> <input name= "submit" type= "submit" value= "Go" />
</form> </li>
<li > <a href= "http://xmlsoft.org/" > <img src= "Libxml2-Logo-90x34.gif" alt= "Made with Libxml2 Logo" /> </a> </li>
</ul>
</div>
</div>
2005-12-07 12:33:00 +03:00
</xsl:template>
2006-01-20 18:49:04 +03:00
<!--
the menu box for developper's pages
-->
<!--
the page title
-->
<xsl:template name= "titlebox" >
<xsl:param name= "title" />
2006-01-22 02:34:36 +03:00
<h1 class= "style1" > <xsl:value-of select= "$title" /> </h1>
2005-12-07 12:33:00 +03:00
</xsl:template>
2006-01-20 18:49:04 +03:00
2005-12-07 12:33:00 +03:00
<!--
- Write the styles in the head
-->
<xsl:template name= "style" >
2006-02-09 20:45:11 +03:00
<link rel= "stylesheet" type= "text/css" href= "{$href_base}libvirt.css" />
2006-01-24 01:55:41 +03:00
<link rel= "SHORTCUT ICON" href= "/32favicon.png" />
2005-12-07 12:33:00 +03:00
</xsl:template>
2006-01-20 18:49:04 +03:00
2005-12-07 12:33:00 +03:00
<!--
2006-01-20 18:49:04 +03:00
- The top section
2005-12-07 12:33:00 +03:00
-->
2006-01-20 18:49:04 +03:00
<xsl:template name= "top" >
<div id= "top" >
2006-02-09 20:45:11 +03:00
<img src= "{$href_base}libvirtHeader.png" alt= "Libvirt the virtualization API" />
2006-01-20 18:49:04 +03:00
</div>
2005-12-07 12:33:00 +03:00
</xsl:template>
2006-01-20 18:49:04 +03:00
2005-12-07 12:33:00 +03:00
<!--
2006-01-20 18:49:04 +03:00
- The top section for the main page
2005-12-07 12:33:00 +03:00
-->
2006-01-20 18:49:04 +03:00
<xsl:template name= "topmain" >
<div id= "topmain" >
2006-02-09 20:45:11 +03:00
<img src= "{$href_base}libvirtLogo.png" alt= "Libvirt the virtualization API" />
2006-01-20 18:49:04 +03:00
</div>
2005-12-07 12:33:00 +03:00
</xsl:template>
2006-01-20 18:49:04 +03:00
<!--
- The bottom section
-->
<xsl:template name= "bottom" >
2006-01-22 02:34:36 +03:00
<div id= "bottom" >
<p class= "p1" > </p>
</div>
2005-12-07 12:33:00 +03:00
</xsl:template>
2006-01-20 18:49:04 +03:00
2005-12-07 12:33:00 +03:00
<!--
- Handling of nodes in the body after an H2
- Open a new file and dump all the siblings up to the next H2
-->
<xsl:template name= "subfile" >
<xsl:param name= "header" select= "following-sibling::h2[1]" />
<xsl:variable name= "filename" >
<xsl:call-template name= "filename" >
<xsl:with-param name= "name" select= "concat('#', string($header/a[1]/@name))" />
</xsl:call-template>
</xsl:variable>
<xsl:variable name= "title" >
<xsl:value-of select= "$header" />
</xsl:variable>
<xsl:document href= "{$filename}" method= "xml" encoding= "ISO-8859-1"
doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html >
<head >
<xsl:call-template name= "style" />
<xsl:element name= "title" >
<xsl:value-of select= "$title" />
</xsl:element>
</head>
2006-01-22 02:34:36 +03:00
<body >
<div id= "container" >
<div id= "intro" >
<div id= "adjustments" />
<div id= "pageHeader" />
<div id= "content2" >
2006-01-20 18:49:04 +03:00
<xsl:call-template name= "titlebox" >
<xsl:with-param name= "title" select= "$title" />
</xsl:call-template>
<xsl:apply-templates mode= "subfile" select= "$header/following-sibling::*[preceding-sibling::h2[1] = $header and name() != 'h2' ]" />
</div>
</div>
2006-01-22 02:34:36 +03:00
<xsl:call-template name= "linkList2" />
<xsl:call-template name= "bottom" />
</div>
</body>
2005-12-07 12:33:00 +03:00
</html>
</xsl:document>
</xsl:template>
2006-01-20 18:49:04 +03:00
<xsl:template mode= "subcontent" match= "@*|node()" >
<xsl:copy >
<xsl:apply-templates mode= "subcontent" select= "@*|node()" />
</xsl:copy>
</xsl:template>
<xsl:template mode= "content" match= "@*|node()" >
<xsl:if test= "name() != 'h1' and name() != 'h2'" >
<xsl:copy >
<xsl:apply-templates mode= "subcontent" select= "@*|node()" />
</xsl:copy>
</xsl:if>
</xsl:template>
2005-12-07 12:33:00 +03:00
<xsl:template mode= "subfile" match= "@*|node()" >
<xsl:copy >
<xsl:apply-templates mode= "content" select= "@*|node()" />
</xsl:copy>
</xsl:template>
2006-01-20 18:49:04 +03:00
2005-12-07 12:33:00 +03:00
<!--
- Handling of the initial body and head HTML document
-->
<xsl:template match= "body" >
<xsl:variable name= "firsth2" select= "./h2[1]" />
2006-01-20 18:49:04 +03:00
<body >
2006-01-22 02:34:36 +03:00
<div id= "container" >
<div id= "intro" >
<div id= "adjustments" >
<p class= "p1" > </p>
</div>
<div id= "content" >
2006-01-20 18:49:04 +03:00
<xsl:apply-templates mode= "content" select= "($firsth2/preceding-sibling::*)" />
<xsl:for-each select= "./h2" >
<xsl:call-template name= "subfile" >
<xsl:with-param name= "header" select= "." />
</xsl:call-template>
</xsl:for-each>
2006-01-22 02:34:36 +03:00
</div>
2006-01-20 18:49:04 +03:00
</div>
2006-01-22 02:34:36 +03:00
<xsl:call-template name= "linkList" />
<xsl:call-template name= "bottom" />
</div>
2005-12-07 12:33:00 +03:00
</body>
</xsl:template>
<xsl:template match= "head" >
</xsl:template>
<xsl:template match= "html" >
<xsl:message > Generating the Web pages</xsl:message>
<html >
2006-01-20 18:49:04 +03:00
<head >
<xsl:call-template name= "style" />
<title > the virtualization API</title>
</head>
2005-12-07 12:33:00 +03:00
<xsl:apply-templates />
</html>
</xsl:template>
</xsl:stylesheet>