提交 21df1e50 编写于 作者: D Daniel Veillard

* configure.in libvirt.spec.in docs/Makefile.am docs/devhelp/*:

  added devhelp docs support, based on libxml2 stylesheets
Daniel
上级 a3512b01
Wed Feb 22 11:53:45 CET 2006 Daniel Veillard <veillard@redhat.com>
* configure.in libvirt.spec.in docs/Makefile.am docs/devhelp/*:
added devhelp docs support, based on libxml2 stylesheets
Wed Feb 22 09:57:11 CET 2006 Daniel Veillard <veillard@redhat.com>
* TODO: updated
......
......@@ -236,6 +236,6 @@ rm -f COPYING
cp COPYING.LIB COPYING
AC_OUTPUT(Makefile src/Makefile include/Makefile docs/Makefile \
docs/examples/Makefile \
docs/examples/Makefile docs/devhelp/Makefile \
libvirt.pc libvirt.spec include/libvirt.h \
python/Makefile python/tests/Makefile)
## Process this file with automake to produce Makefile.in
SUBDIRS=examples
SUBDIRS= . examples devhelp
# The directory containing the source code (if it contains documentation).
DOC_SOURCE_DIR=../src
......
DEVHELP_DIR=$(datadir)/gtk-doc/html/libvirt
HTML_FILES=index.html general.html $(HTML_MODULES)
HTML_MODULES= \
libvirt-libvirt.html
EXTRA_FORMAT= \
home.png \
left.png \
right.png \
up.png \
style.css
EXTRA_DIST=devhelp.xsl html.xsl libvirt.devhelp $(HTML_FILES) $(EXTRA_FORMAT)
all: libvirt.devhelp $(HTML_FILES)
libvirt.devhelp $(HTML_FILES): devhelp.xsl html.xsl $(top_srcdir)/docs/libvirt-api.xml
-@(echo Rebuilding devhelp files)
-@(if [ -x $(XSLTPROC) ] ; then \
$(XSLTPROC) --nonet -o $(srcdir)/libvirt.devhelp devhelp.xsl $(top_srcdir)/docs/libvirt-api.xml ; fi );
install-data-local:
$(mkinstalldirs) $(DESTDIR)$(DEVHELP_DIR)
-@INSTALL@ -m 0644 libvirt.devhelp $(DESTDIR)$(DEVHELP_DIR)
-@INSTALL@ -m 0644 $(EXTRA_FORMAT) $(DESTDIR)$(DEVHELP_DIR)
-@INSTALL@ -m 0644 $(HTML_FILES) $(DESTDIR)$(DEVHELP_DIR)
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
xmlns="http://www.devhelp.net/book"
xmlns:exsl="http://exslt.org/common"
xmlns:str="http://exslt.org/strings"
extension-element-prefixes="exsl str"
exclude-result-prefixes="exsl str">
<!-- The stylesheet for the html pages -->
<xsl:import href="html.xsl"/>
<xsl:output method="xml" encoding="UTF-8" indent="yes"/>
<!-- Build keys for all symbols -->
<xsl:key name="symbols" match="/api/symbols/*" use="@name"/>
<xsl:template match="/api">
<book title="{@name} Reference Manual" link="index.html" author="" name="{@name}">
<xsl:apply-templates select="files"/>
<xsl:apply-templates select="symbols"/>
</book>
<xsl:call-template name="generate_index"/>
<xsl:call-template name="generate_general"/>
</xsl:template>
<xsl:template match="/api/files">
<chapters>
<sub name="API" link="general.html">
<xsl:apply-templates select="file"/>
</sub>
</chapters>
</xsl:template>
<xsl:template match="/api/files/file">
<xsl:variable name="module" select="@name"/>
<xsl:variable name="prev" select="string(preceding-sibling::file[position()=1]/@name)"/>
<xsl:variable name="next" select="string(following-sibling::file[position()=1]/@name)"/>
<sub name="{@name}" link="libvirt-{@name}.html"/>
<xsl:document xmlns="" href="libvirt-{@name}.html" method="xml" indent="yes" encoding="UTF-8">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<title><xsl:value-of select="concat(@name, ': ', summary)"/></title>
<meta name="generator" content="Libvirt devhelp stylesheet"/>
<link rel="start" href="index.html" title="libvirt Reference Manual"/>
<link rel="up" href="general.html" title="API"/>
<link rel="stylesheet" href="style.css" type="text/css"/>
<link rel="chapter" href="general.html" title="API"/>
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
<tr valign="middle">
<xsl:if test="$prev != ''">
<td><a accesskey="p" href="libvirt-{$prev}.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"/></a></td>
</xsl:if>
<td><a accesskey="u" href="general.html"><img src="up.png" width="24" height="24" border="0" alt="Up"/></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"/></a></td>
<xsl:if test="$next != ''">
<td><a accesskey="n" href="libvirt-{$next}.html"><img src="right.png" width="24" height="24" border="0" alt="Next"/></a></td>
</xsl:if>
<th width="100%" align="center">libvirt Reference Manual</th>
</tr>
</table>
<h2><span class="refentrytitle"><xsl:value-of select="@name"/></span></h2>
<p><xsl:value-of select="@name"/> - <xsl:value-of select="summary"/></p>
<p><xsl:value-of select="description"/></p>
<xsl:if test="deprecated">
<p> WARNING: this module is deprecated !</p>
</xsl:if>
<p>Author(s): <xsl:value-of select="author"/></p>
<div class="refsynopsisdiv">
<h2>Synopsis</h2>
<pre class="synopsis">
<xsl:apply-templates mode="synopsis" select="exports"/>
</pre>
</div>
<div class="refsect1" lang="en">
<h2>Description</h2>
</div>
<div class="refsect1" lang="en">
<h2>Details</h2>
<div class="refsect2" lang="en">
<xsl:apply-templates mode="details" select="/api/symbols/macro[@file=$module]"/>
<xsl:apply-templates mode="details" select="/api/symbols/typedef[@file=$module] | /api/symbols/struct[@file=$module]"/>
<xsl:apply-templates mode="details" select="/api/symbols/functype[@file=$module]"/>
<xsl:apply-templates mode="details" select="/api/symbols/variable[@file=$module]"/>
<xsl:apply-templates mode="details" select="/api/symbols/function[@file=$module]"/>
</div>
</div>
</body>
</html>
</xsl:document>
</xsl:template>
<xsl:template match="/api/symbols">
<functions>
<xsl:apply-templates select="macro"/>
<xsl:apply-templates select="enum"/>
<xsl:apply-templates select="typedef"/>
<xsl:apply-templates select="struct"/>
<xsl:apply-templates select="functype"/>
<xsl:apply-templates select="variable"/>
<xsl:apply-templates select="function"/>
</functions>
</xsl:template>
<xsl:template match="/api/symbols/functype">
<function name="{@name}" link="libvirt-{@file}.html#{@name}"/>
</xsl:template>
<xsl:template match="/api/symbols/function">
<function name="{@name} ()" link="libvirt-{@file}.html#{@name}"/>
</xsl:template>
<xsl:template match="/api/symbols/typedef">
<function name="{@name}" link="libvirt-{@file}.html#{@name}"/>
</xsl:template>
<xsl:template match="/api/symbols/enum">
<function name="{@name}" link="libvirt-{@file}.html#{@name}"/>
</xsl:template>
<xsl:template match="/api/symbols/struct">
<function name="{@name}" link="libvirt-{@file}.html#{@name}"/>
</xsl:template>
<xsl:template match="/api/symbols/macro">
<function name="{@name}" link="libvirt-{@file}.html#{@name}"/>
</xsl:template>
<xsl:template match="/api/symbols/variable">
<function name="{@name}" link="libvirt-{@file}.html#{@name}"/>
</xsl:template>
</xsl:stylesheet>
此差异已折叠。
.synopsis, .classsynopsis
{
background: #eeeeee;
border: solid 1px #aaaaaa;
padding: 0.5em;
}
.programlisting
{
background: #eeeeff;
border: solid 1px #aaaaff;
padding: 0.5em;
}
.variablelist
{
padding: 4px;
margin-left: 3em;
}
.variablelist td:first-child
{
vertical-align: top;
}
table.navigation
{
background: #ffeeee;
border: solid 1px #ffaaaa;
margin-top: 0.5em;
margin-bottom: 0.5em;
}
.navigation a
{
color: #770000;
}
.navigation a:visited
{
color: #550000;
}
.navigation .title
{
font-size: 200%;
}
div.refnamediv
{
margin-top: 2em;
}
div.gallery-float
{
float: left;
padding: 10px;
}
div.gallery-float img
{
border-style: none;
}
div.gallery-spacer
{
clear: both;
}
a
{
text-decoration: none;
}
a:hover
{
text-decoration: underline;
color: #FF0000;
}
......@@ -77,6 +77,10 @@ rm -fr %{buildroot}
%{_libdir}/lib*.so
%{_includedir}/libvirt/*.h
%{_libdir}/pkgconfig/libvirt.pc
%doc %{_datadir}/gtk-doc/html/libvirt/*.devhelp
%doc %{_datadir}/gtk-doc/html/libvirt/*.html
%doc %{_datadir}/gtk-doc/html/libvirt/*.png
%doc %{_datadir}/gtk-doc/html/libvirt/*.css
%doc docs/*.html docs/html docs/*.gif
%doc docs/examples
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册