[vala/wip/manual: 15/21] manual: Add version information and copyright to manual
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/wip/manual: 15/21] manual: Add version information and copyright to manual
- Date: Sat, 11 Mar 2017 23:48:31 +0000 (UTC)
commit 7c0e02d6e917bff019c49fe40c134d84927cf7b5
Author: Alistair Thomas <astavale yahoo co uk>
Date: Fri Mar 3 19:11:24 2017 +0000
manual: Add version information and copyright to manual
The documentation is downloaded from the GNOME wiki. So the same copyright
notice is used. The wiki states (c) The GNOME Project at the bottom of each
page. The license for all new documentation is CC-BY-SA 4.0. See
https://wiki.gnome.org/DocumentationProject/Guide/Licensing
configure.ac | 1 +
doc/manual/.gitignore | 1 +
doc/manual/Makefile.am | 20 +++++++++++++-------
doc/manual/default.css | 8 ++++++++
doc/manual/manual.xml | 3 ++-
doc/manual/version.xml.in | 15 +++++++++++++++
doc/manual/xhtml.xsl | 22 +++++++++++++++++++++-
7 files changed, 61 insertions(+), 9 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 67d649c..030957e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -113,6 +113,7 @@ AC_CONFIG_FILES([Makefile
tests/Makefile
doc/Makefile
doc/manual/Makefile
+ doc/manual/version.xml
gobject-introspection/Makefile
vapigen/vapigen.pc
vapigen/Makefile
diff --git a/doc/manual/.gitignore b/doc/manual/.gitignore
index 34a65b6..944f5ee 100644
--- a/doc/manual/.gitignore
+++ b/doc/manual/.gitignore
@@ -1,2 +1,3 @@
+version.xml
html/
devhelp/
diff --git a/doc/manual/Makefile.am b/doc/manual/Makefile.am
index 7a26f26..ce29667 100644
--- a/doc/manual/Makefile.am
+++ b/doc/manual/Makefile.am
@@ -8,29 +8,31 @@ if HAVE_XSLTPROC
book_DATA = \
devhelp/* \
$(NULL)
+
+.PHONY: all
+all: devhelp html
endif
$(builddir)/devhelp/*: devhelp
-devhelp: manual.xml devhelp.xsl xhtml.xsl
+devhelp: manual.xml version.xml devhelp.xsl xhtml.xsl
@$(MKDIR_P) $@
$(AM_V_GEN)$(XSLTPROC) \
- --xinclude $(srcdir)/devhelp.xsl \
- $(srcdir)/manual.xml \
- > $(builddir)/devhelp/$(BOOK_NAME).devhelp2
+ --xinclude \
+ --output $@/$(BOOK_NAME).devhelp2 \
+ $(srcdir)/devhelp.xsl \
+ $(srcdir)/manual.xml
@$(XSLTPROC) \
--xinclude \
- --stringparam outdir $@ \
--output $@/index.html \
$(srcdir)/xhtml.xsl \
$(srcdir)/manual.xml
@cp $(srcdir)/default.css $@
@touch $@
-html: manual.xml xhtml.xsl
+html: manual.xml version.xml xhtml.xsl
@$(MKDIR_P) $@
$(AM_V_GEN)$(XSLTPROC) \
--xinclude \
- --stringparam outdir $@ \
--output $@/index.html \
$(srcdir)/xhtml.xsl \
$(srcdir)/manual.xml
@@ -41,6 +43,10 @@ mostlyclean-local:
rm -rf devhelp
rm -rf html
+CLEANFILES = \
+ version.xml \
+ $(NULL)
+
EXTRA_DIST = \
common.xsl \
default.css \
diff --git a/doc/manual/default.css b/doc/manual/default.css
index ee76427..3c432cc 100644
--- a/doc/manual/default.css
+++ b/doc/manual/default.css
@@ -120,6 +120,14 @@ pre {
white-space: pre-wrap;
}
+.c-document_version { border: solid 2px #ccc;
+ border-radius: 4px;
+ width: 100%;
+ font-sizde: 95%;
+}
+.c-document_version tr td:first-child { text-align: right; }
+.c-document_version tr:nth-child(odd) { background-color: #f0f0f0; }
+
blockquote span.literal {
font-family: monospace;
font-weight: bold;
diff --git a/doc/manual/manual.xml b/doc/manual/manual.xml
index 0a54b81..dc5c496 100644
--- a/doc/manual/manual.xml
+++ b/doc/manual/manual.xml
@@ -1,7 +1,8 @@
<?xml version="1.0" encoding="utf-8"?><!DOCTYPE article PUBLIC '-//OASIS//DTD DocBook XML V4.4//EN'
'http://www.docbook.org/xml/4.4/docbookx.dtd'><article>
<section>
-<title>Vala Reference Manual [Draft]</title>
+<title>Vala Reference Manual</title>
+<para>This is a draft version of the Vala Reference Manual, and so is not guaranteed to be correct. </para>
<para>Back to <ulink url="http://wiki.gnome.org/Projects/Vala/Manual/Export/Projects/Vala/Manual#">Vala
Reference Manual</ulink> </para>
<section>
diff --git a/doc/manual/version.xml.in b/doc/manual/version.xml.in
new file mode 100644
index 0000000..e896768
--- /dev/null
+++ b/doc/manual/version.xml.in
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE article PUBLIC '-//OASIS//DTD DocBook XML V4.4//EN'
'http://www.docbook.org/xml/4.4/docbookx.dtd'>
+<articleinfo>
+<abstract>
+<para>The Vala programming language is a high level language that produces binaries for the native platform.
The binaries maintain the C Application Binary Interface (ABI) and so can be built as either an application
or a library.</para>
+<para>The Vala Reference Manual gives details on Vala's syntax and type system, including polymorphism using
interfaces and type parameters (generics). Vala includes additional code generation routines, for example
D-Bus inter-process communication and GTK+3 composite templates, these are only referred to in the Attributes
section. The reference manual does not provide a tutorial for these features.</para>
+<para>Vala is developed in a collaborative and self-supporting way by its users. They provide bug reports,
documentation, patches, patch reviews and core development. Following this model of development the manual
has an editable version at <ulink
url="https://wiki.gnome.org/Projects/Vala/Manual">https://wiki.gnome.org/Projects/Vala/Manual</ulink> .</para>
+</abstract>
+<edition>@PACKAGE_SUFFIX@</edition>
+<releaseinfo>@VERSION@
+<remark>Draft, document contains omissions and might contain errors</remark>
+</releaseinfo>
+<copyright><holder>The GNOME Project</holder></copyright>
+<legalnotice><ulink url="http://creativecommons.org/licenses/by-sa/4.0/">Creative Commons
Attribution-ShareAlike 4.0 International</ulink></legalnotice>
+</articleinfo>
diff --git a/doc/manual/xhtml.xsl b/doc/manual/xhtml.xsl
index 43420bc..9733846 100644
--- a/doc/manual/xhtml.xsl
+++ b/doc/manual/xhtml.xsl
@@ -4,8 +4,9 @@
version="1.0"
xmlns:str="http://exslt.org/strings"
xmlns:exsl="http://exslt.org/common"
+ xmlns:date="http://exslt.org/dates-and-times"
extension-element-prefixes="exsl"
- exclude-result-prefixes="str"
+ exclude-result-prefixes="str date"
<xsl:import href="common.xsl"/>
@@ -104,6 +105,7 @@
<xsl:template match="article/section" mode="toc">
<xsl:apply-templates select="title"/>
+ <xsl:apply-templates select="document('version.xml')/articleinfo" mode="toc"/>
<ul class="toc">
<xsl:for-each select="section">
<li>
@@ -131,6 +133,24 @@
<xsl:apply-templates select="section"/>
</xsl:template>
+ <xsl:template match="articleinfo" mode="toc">
+ <xsl:apply-templates select="abstract"/>
+ <table class="c-document_version">
+ <tr><td>Vala version:</td><td><xsl:apply-templates select="str:replace(edition, '-', '')"/></td></tr>
+ <tr><td>Release:</td><td><xsl:apply-templates select="releaseinfo/text()"/></td></tr>
+ <tr><td>Status:</td><td><xsl:apply-templates select="releaseinfo/remark"/></td></tr>
+ <tr><td>Copyright:</td>
+ <td>
+ <xsl:text>© </xsl:text>
+ <xsl:apply-templates select="copyright/holder"/>
+ <xsl:text> </xsl:text>
+ <xsl:value-of select="date:year()"/>
+ </td>
+ </tr>
+ <tr><td>License:</td><td><xsl:apply-templates select="legalnotice"/></td></tr>
+ </table>
+ </xsl:template>
+
<xsl:template match="article/section/section/title">
<h2><xsl:value-of select="."/></h2>
</xsl:template>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]