From a678fd53e16b7cb7eb2dbef218e89c649bdaabc7 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 24 Feb 2012 17:31:51 +1000 Subject: [PATCH] Generate the docbook description for the protocol from wayland.xml Convert the wayland.xml protocol description to a docbook-compatible format and hook it up to the publican sources. Signed-off-by: Peter Hutterer --- doc/Wayland/.gitignore | 1 + doc/Wayland/Makefile.am | 9 ++- doc/Wayland/en-US/Wayland.xml | 1 + doc/Wayland/protocol-to-docbook.xsl | 113 ++++++++++++++++++++++++++++++++++++ 4 files changed, 122 insertions(+), 2 deletions(-) create mode 100644 doc/Wayland/protocol-to-docbook.xsl diff --git a/doc/Wayland/.gitignore b/doc/Wayland/.gitignore index 33b78ca..cf78754 100644 --- a/doc/Wayland/.gitignore +++ b/doc/Wayland/.gitignore @@ -1 +1,2 @@ Wayland +en-US/Protocol.xml diff --git a/doc/Wayland/Makefile.am b/doc/Wayland/Makefile.am index 854da79..099efb2 100644 --- a/doc/Wayland/Makefile.am +++ b/doc/Wayland/Makefile.am @@ -17,9 +17,13 @@ publican_sources = \ $(srcdir)/en-US/images/x-architecture.png -Wayland: publican.cfg $(publican_sources) +Wayland: docbook-xsl publican.cfg $(publican_sources) publican build --lang en-US --format html,pdf +# This must be run befor the publican run +docbook-xsl: $(top_srcdir)/protocol/wayland.xml protocol-to-docbook.xsl + $(AM_V_GEN)$(XSLTPROC) protocol-to-docbook.xsl $(top_srcdir)/protocol/wayland.xml > $(srcdir)/en-US/Protocol.xml + clean-local: -rm -rf Wayland @@ -31,5 +35,6 @@ uninstall-local: -rm -rf $(DESTDIR)$(docdir)/Wayland/* -rmdir $(DESTDIR)$(docdir)/Wayland -EXTRA_DIST = $(publican_sources) publican.cfg +EXTRA_DIST = $(publican_sources) publican.cfg protocol-to-docbook.xsl + endif diff --git a/doc/Wayland/en-US/Wayland.xml b/doc/Wayland/en-US/Wayland.xml index acec682..829d362 100644 --- a/doc/Wayland/en-US/Wayland.xml +++ b/doc/Wayland/en-US/Wayland.xml @@ -10,6 +10,7 @@ --> + diff --git a/doc/Wayland/protocol-to-docbook.xsl b/doc/Wayland/protocol-to-docbook.xsl new file mode 100644 index 0000000..e50d80d --- /dev/null +++ b/doc/Wayland/protocol-to-docbook.xsl @@ -0,0 +1,113 @@ + + + + + + + + +%BOOK_ENTITIES; +]> +]]> + + + Wayland Protocol Specification + + + + + + + + + + + + + + + + + +
+ protocol-- + + + <xsl:value-of select="@name" /> + <!-- only show summary if it exists --> + <xsl:if test="description/@summary"> + - <xsl:value-of select="description/@summary" /> + </xsl:if> + + + + + +
+ Requests provided by <xsl:value-of select="@name" /> + +
+
+ +
+ Events provided by <xsl:value-of select="@name" /> events + +
+
+ +
+ Enums provided by <xsl:value-of select="@name" /> enums + +
+
+
+
+ + + + + + + + Type: + + + Value: + + + + + + + + + + +
+ protocol-interface--- + + <xsl:value-of select="../@name"/>::<xsl:value-of select="@name" /> + <xsl:if test="description/@summary"> + - <xsl:value-of select="description/@summary" /> + </xsl:if> + + + + + <xsl:value-of select="../@name"/>::<xsl:value-of select="@name" /> arguments + + + + + + <xsl:value-of select="../@name"/>::<xsl:value-of select="@name" /> values + + + +
+
+
+ + -- 2.7.4