summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilliam Jon McCann <jmccann@redhat.com>2009-07-16 17:15:14 -0400
committerWilliam Jon McCann <jmccann@redhat.com>2009-07-16 17:15:14 -0400
commitcbfd9578d73f93e47b282bdf4e298067c4a9bf79 (patch)
tree170a27b8b714760b5841d16a79f2ca572301c236
parent25145f35ab527a2219604e1710eb65e2178f6978 (diff)
fix a bunch of xml validation errors
https://bugs.freedesktop.org/show_bug.cgi?id=20232
-rw-r--r--configure.ac3
-rw-r--r--doc/dbus/Makefile.am5
-rw-r--r--doc/dbus/ck-design.xml58
-rw-r--r--doc/dbus/spec-to-docbook.xsl72
-rw-r--r--src/org.freedesktop.ConsoleKit.Manager.xml2
-rw-r--r--src/org.freedesktop.ConsoleKit.Seat.xml5
6 files changed, 82 insertions, 63 deletions
diff --git a/configure.ac b/configure.ac
index 6dbca0f..f7b62fc 100644
--- a/configure.ac
+++ b/configure.ac
@@ -277,6 +277,9 @@ fi
AM_CONDITIONAL(DOCBOOK_DOCS_ENABLED, test x$enable_docbook_docs = xyes)
AC_MSG_RESULT(yes)
+AC_ARG_VAR([XMLTO],[Define/override the `xmlto' location.])
+AC_ARG_VAR([XMLTO_FLAGS],[Define/override `xmlto' options, like `--skip-validation'.])
+
dnl ---------------------------------------------------------------------------
dnl Check for xsltproc
dnl ---------------------------------------------------------------------------
diff --git a/doc/dbus/Makefile.am b/doc/dbus/Makefile.am
index d8bb0ee..4f8f3e7 100644
--- a/doc/dbus/Makefile.am
+++ b/doc/dbus/Makefile.am
@@ -16,7 +16,7 @@ htmldocdir = $(docdir)/spec
htmldoc_DATA = ConsoleKit.html
ConsoleKit.html : $(SPEC_XML_FILES)
- $(XMLTO) xhtml-nochunks -m $(top_srcdir)/doc/dbus/config.xsl ConsoleKit.xml
+ $(XMLTO) $(XMLTO_FLAGS) xhtml-nochunks -m $(top_srcdir)/doc/dbus/config.xsl ConsoleKit.xml
endif # DOCBOOK_DOCS_ENABLED
@@ -44,3 +44,6 @@ MAINTAINERCLEANFILES = \
clean-local:
rm -f *~ *.ref.xml
rm -f ConsoleKit.html
+
+check-local:
+ xmllint --noout --noent --valid ConsoleKit.xml
diff --git a/doc/dbus/ck-design.xml b/doc/dbus/ck-design.xml
index 1148773..8aca968 100644
--- a/doc/dbus/ck-design.xml
+++ b/doc/dbus/ck-design.xml
@@ -38,16 +38,16 @@ The Session will remain open until the Session Leader disconnects from the D-Bus
</para>
<orderedlist>
<listitem>
- To open a new Session.
+ <simpara>To open a new Session.</simpara>
</listitem>
<listitem>
- To set properties for the Session.
+ <simpara>To set properties for the Session.</simpara>
</listitem>
<listitem>
- To maintain a connection to the D-Bus system bus.
+ <simpara>To maintain a connection to the D-Bus system bus.</simpara>
</listitem>
<listitem>
- To close the Session at logout.
+ <simpara>To close the Session at logout.</simpara>
</listitem>
</orderedlist>
</sect2>
@@ -58,25 +58,25 @@ The Session will remain open until the Session Leader disconnects from the D-Bus
</para>
<orderedlist>
<listitem>
- To determine which Seat it is running on.
+ <simpara>To determine which Seat it is running on.</simpara>
</listitem>
<listitem>
- To know if the current seat supports session switching.
+ <simpara>To know if the current seat supports session switching.</simpara>
</listitem>
<listitem>
- A list of all sessions on the current Seat.
+ <simpara>A list of all sessions on the current Seat.</simpara>
</listitem>
<listitem>
- To know which session is active for the current Seat.
+ <simpara>To know which session is active for the current Seat.</simpara>
</listitem>
<listitem>
- To know when the session active state changes.
+ <simpara>To know when the session active state changes.</simpara>
</listitem>
<listitem>
- To know when sessions are added or removed.
+ <simpara>To know when sessions are added or removed.</simpara>
</listitem>
<listitem>
- Access to the metadata for any open Session.
+ <simpara>Access to the metadata for any open Session.</simpara>
</listitem>
</orderedlist>
</sect2>
@@ -87,10 +87,10 @@ The Session will remain open until the Session Leader disconnects from the D-Bus
</para>
<orderedlist>
<listitem>
- To know if any user sessions are open.
+ <simpara>To know if any user sessions are open.</simpara>
</listitem>
<listitem>
- To know if the system is currently being used.
+ <simpara>To know if the system is currently being used.</simpara>
</listitem>
</orderedlist>
</sect2>
@@ -101,16 +101,16 @@ The Session will remain open until the Session Leader disconnects from the D-Bus
</para>
<orderedlist>
<listitem>
- To determine what hardware is associated with a Seat.
+ <simpara>To determine what hardware is associated with a Seat.</simpara>
</listitem>
<listitem>
- To determine what Session is active and inactive on a particular Seat.
+ <simpara>To determine what Session is active and inactive on a particular Seat.</simpara>
</listitem>
<listitem>
- To know when the session active state changes.
+ <simpara>To know when the session active state changes.</simpara>
</listitem>
<listitem>
- To determine what Session a process belongs to.
+ <simpara>To determine what Session a process belongs to.</simpara>
</listitem>
</orderedlist>
</sect2>
@@ -121,28 +121,28 @@ The Session will remain open until the Session Leader disconnects from the D-Bus
</para>
<orderedlist>
<listitem>
- To determine which session it is running in.
+ <simpara>To determine which session it is running in.</simpara>
</listitem>
<listitem>
- To determine which Seat it is running on.
+ <simpara>To determine which Seat it is running on.</simpara>
</listitem>
<listitem>
- To know if the current seat supports session switching.
+ <simpara>To know if the current seat supports session switching.</simpara>
</listitem>
<listitem>
- A list of all sessions on the current Seat.
+ <simpara>A list of all sessions on the current Seat.</simpara>
</listitem>
<listitem>
- Which session is active for the current Seat.
+ <simpara>Which session is active for the current Seat.</simpara>
</listitem>
<listitem>
- To know when the session active state changes.
+ <simpara>To know when the session active state changes.</simpara>
</listitem>
<listitem>
- Access to the metadata for any open Session.
+ <simpara>Access to the metadata for any open Session.</simpara>
</listitem>
<listitem>
- To know when sessions are added or removed.
+ <simpara>To know when sessions are added or removed.</simpara>
</listitem>
</orderedlist>
</sect2>
@@ -153,10 +153,10 @@ The Session will remain open until the Session Leader disconnects from the D-Bus
</para>
<orderedlist>
<listitem>
- To determine which session it is running in.
+ <simpara>To determine which session it is running in.</simpara>
</listitem>
<listitem>
- To know when the session active state changes.
+ <simpara>To know when the session active state changes.</simpara>
</listitem>
</orderedlist>
</sect2>
@@ -167,10 +167,10 @@ The Session will remain open until the Session Leader disconnects from the D-Bus
</para>
<orderedlist>
<listitem>
- To determine which session it is running in.
+ <simpara>To determine which session it is running in.</simpara>
</listitem>
<listitem>
- To know when the session active state changes.
+ <simpara>To know when the session active state changes.</simpara>
</listitem>
</orderedlist>
</sect2>
diff --git a/doc/dbus/spec-to-docbook.xsl b/doc/dbus/spec-to-docbook.xsl
index 1864414..f69bebd 100644
--- a/doc/dbus/spec-to-docbook.xsl
+++ b/doc/dbus/spec-to-docbook.xsl
@@ -74,9 +74,15 @@
<refsect1 role="desc">
<title role="desc.title">Description</title>
- <para>
- <xsl:apply-templates select="//interface/doc:doc"/>
- </para>
+ <xsl:choose>
+ <xsl:when test="count(//interface/doc:doc) > 0">
+ <xsl:apply-templates select="//interface/doc:doc"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <para>
+ </para>
+ </xsl:otherwise>
+ </xsl:choose>
</refsect1>
<refsect1 role="details">
@@ -115,13 +121,17 @@
<xsl:template name="property-doc">
<xsl:apply-templates select="doc:doc/doc:description"/>
- <variablelist role="params">
- <xsl:for-each select="arg">
+ <xsl:choose>
+ <xsl:when test="count(arg) > 0">
+ <variablelist role="params">
+ <xsl:for-each select="arg">
<varlistentry><term><parameter><xsl:value-of select="@name"/></parameter>:</term>
<listitem><simpara><xsl:value-of select="doc:doc/doc:summary"/></simpara></listitem>
</varlistentry>
- </xsl:for-each>
- </variablelist>
+ </xsl:for-each>
+ </variablelist>
+ </xsl:when>
+ </xsl:choose>
<xsl:apply-templates select="doc:doc/doc:since"/>
<xsl:apply-templates select="doc:doc/doc:deprecated"/>
@@ -143,23 +153,25 @@
<indexterm><primary><xsl:value-of select="@name"/></primary><secondary><xsl:value-of select="$basename"/></secondary></indexterm>
<programlisting>'<xsl:value-of select="@name"/>'<xsl:call-template name="pad-spaces"><xsl:with-param name="width" select="2"/></xsl:call-template>
<xsl:call-template name="property-args"><xsl:with-param name="indent" select="string-length(@name) + 2"/></xsl:call-template></programlisting>
- </refsect2>
-
<xsl:call-template name="property-doc"/>
-
+ </refsect2>
</xsl:for-each>
</xsl:template>
<xsl:template name="signal-doc">
<xsl:apply-templates select="doc:doc/doc:description"/>
- <variablelist role="params">
- <xsl:for-each select="arg">
+ <xsl:choose>
+ <xsl:when test="count(arg) > 0">
+ <variablelist role="params">
+ <xsl:for-each select="arg">
<varlistentry><term><parameter><xsl:value-of select="@name"/></parameter>:</term>
<listitem><simpara><xsl:value-of select="doc:doc/doc:summary"/></simpara></listitem>
</varlistentry>
- </xsl:for-each>
- </variablelist>
+ </xsl:for-each>
+ </variablelist>
+ </xsl:when>
+ </xsl:choose>
<xsl:apply-templates select="doc:doc/doc:since"/>
<xsl:apply-templates select="doc:doc/doc:deprecated"/>
@@ -179,10 +191,8 @@
<title><anchor role="function"><xsl:attribute name="id"><xsl:value-of select="$basename"/>::<xsl:value-of select="@name"/></xsl:attribute></anchor>The <xsl:value-of select="@name"/> signal</title>
<indexterm><primary><xsl:value-of select="@name"/></primary><secondary><xsl:value-of select="$basename"/></secondary></indexterm>
<programlisting><xsl:value-of select="@name"/> (<xsl:call-template name="signal-args"><xsl:with-param name="indent" select="string-length(@name) + 2"/><xsl:with-param name="prefix" select="."/></xsl:call-template>)</programlisting>
- </refsect2>
-
<xsl:call-template name="signal-doc"/>
-
+ </refsect2>
</xsl:for-each>
</xsl:template>
@@ -238,10 +248,10 @@
<xsl:template name="do-listitems">
<xsl:for-each select="doc:item">
- <listitem>
+ <listitem><para>
<xsl:call-template name="listitems-do-term"><xsl:with-param name="str" select="doc:term"/></xsl:call-template>
<xsl:apply-templates select="doc:definition"/>
- </listitem>
+ </para></listitem>
</xsl:for-each>
</xsl:template>
@@ -371,20 +381,24 @@ See also:
<xsl:template name="method-doc">
<xsl:apply-templates select="doc:doc/doc:description"/>
- <variablelist role="params">
- <xsl:for-each select="arg">
+ <xsl:choose>
+ <xsl:when test="count(arg) > 0">
+ <variablelist role="params">
+ <xsl:for-each select="arg">
<varlistentry><term><parameter><xsl:value-of select="@name"/></parameter>:</term>
<listitem><simpara><xsl:apply-templates select="doc:doc/doc:summary"/></simpara></listitem>
</varlistentry>
- </xsl:for-each>
- </variablelist>
+ </xsl:for-each>
+ </variablelist>
+ </xsl:when>
+ </xsl:choose>
<xsl:apply-templates select="doc:doc/doc:since"/>
<xsl:apply-templates select="doc:doc/doc:deprecated"/>
<xsl:choose>
<xsl:when test="count(doc:doc/doc:errors) > 0">
- <refsect3>
+ <note>
<title>Errors</title>
<variablelist role="errors">
<xsl:for-each select="doc:doc/doc:errors/doc:error">
@@ -394,16 +408,16 @@ See also:
</varlistentry>
</xsl:for-each>
</variablelist>
- </refsect3>
+ </note>
</xsl:when>
</xsl:choose>
<xsl:choose>
<xsl:when test="count(doc:doc/doc:permission) > 0">
- <refsect3>
+ <note>
<title>Permissions</title>
<xsl:apply-templates select="doc:doc/doc:permission"/>
- </refsect3>
+ </note>
</xsl:when>
</xsl:choose>
@@ -422,10 +436,8 @@ See also:
<title><anchor role="function"><xsl:attribute name="id"><xsl:value-of select="$basename"/>.<xsl:value-of select="@name"/></xsl:attribute></anchor><xsl:value-of select="@name"/> ()</title>
<indexterm><primary><xsl:value-of select="@name"/></primary><secondary><xsl:value-of select="$basename"/></secondary></indexterm>
<programlisting><xsl:value-of select="@name"/> (<xsl:call-template name="method-args"><xsl:with-param name="indent" select="string-length(@name) + 2"/><xsl:with-param name="prefix" select="."/></xsl:call-template>)</programlisting>
- </refsect2>
-
<xsl:call-template name="method-doc"/>
-
+ </refsect2>
</xsl:for-each>
</xsl:template>
diff --git a/src/org.freedesktop.ConsoleKit.Manager.xml b/src/org.freedesktop.ConsoleKit.Manager.xml
index f405c25..c4d3dd5 100644
--- a/src/org.freedesktop.ConsoleKit.Manager.xml
+++ b/src/org.freedesktop.ConsoleKit.Manager.xml
@@ -158,7 +158,7 @@
</arg>
<doc:doc>
<doc:description>
- <doc:para>This gets a list of all the <doc:ref type="interface" to="Sessions">Sessions</doc:ref>
+ <doc:para>This gets a list of all the <doc:ref type="interface" to="Session">Sessions</doc:ref>
that are currently present on the system.</doc:para>
<doc:para>Each Session ID is an D-Bus object path for the object that implements the
<doc:ref type="interface" to="Session">Session</doc:ref> interface.</doc:para>
diff --git a/src/org.freedesktop.ConsoleKit.Seat.xml b/src/org.freedesktop.ConsoleKit.Seat.xml
index 0e13a0f..d95990b 100644
--- a/src/org.freedesktop.ConsoleKit.Seat.xml
+++ b/src/org.freedesktop.ConsoleKit.Seat.xml
@@ -17,7 +17,8 @@ seat at a time.</doc:para>
</doc:doc>
</arg>
<doc:doc>
- <doc:description>Returns the ID for Seat.
+ <doc:description>
+ <doc:para>Returns the ID for Seat.</doc:para>
</doc:description>
</doc:doc>
</method>
@@ -76,7 +77,7 @@ seat at a time.</doc:para>
</doc:doc>
</arg>
<doc:doc>
- <doc:description>Used to determine whether the seat supports session activation.
+ <doc:description><doc:para>Used to determine whether the seat supports session activation.</doc:para>
</doc:description>
</doc:doc>
</method>