summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorSimon McVittie <simon.mcvittie@collabora.co.uk>2008-06-24 14:29:54 +0000
committerMarc-André Lureau <marcandre.lureau@gmail.com>2009-02-13 00:01:42 +0200
commit58ef0a16f5e45a2ff53dae56e4ccf3c633995d0a (patch)
tree5383b18322c47ddfe3d9eb4b46c87b50de139a54 /tools
parent01a780202ff98ff2ffad100dbbc130806660346c (diff)
doc-generator.xsl: add support for tp:dbus-ref and tp:member-ref markup.
Usage is e.g.: <tp:dbus-ref namespace="org.freedesktop.Telepathy">Connection</tp:dbus-ref> <tp:member-ref>NameOwnerChanged</tp:member-ref> Only the part in the tp:dbus-ref element's content will appear in text-only versions of the spec. 20080624142954-53eee-e81e5320ba5a8d003e8e196d9b166dd64384f39f.gz
Diffstat (limited to 'tools')
-rw-r--r--tools/doc-generator.xsl23
1 files changed, 23 insertions, 0 deletions
diff --git a/tools/doc-generator.xsl b/tools/doc-generator.xsl
index 2d91ed5..c7f5ef2 100644
--- a/tools/doc-generator.xsl
+++ b/tools/doc-generator.xsl
@@ -39,6 +39,29 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
</xsl:call-template>
</xsl:template>
+ <xsl:template match="tp:dbus-ref" mode="html">
+ <xsl:variable name="prefix">
+ <xsl:choose>
+ <xsl:when test="@namespace">
+ <xsl:value-of select="@namespace"/>
+ <xsl:text>.</xsl:text>
+ </xsl:when>
+ </xsl:choose>
+ </xsl:variable>
+ <a xmlns="http://www.w3.org/1999/xhtml" href="{$prefix}{string(.)}">
+ <xsl:value-of select="string(.)"/>
+ </a>
+ </xsl:template>
+
+ <xsl:template match="tp:member-ref" mode="html">
+ <xsl:variable name="prefix" select="concat(ancestor::interface/@name,
+ '.')"/>
+
+ <a xmlns="http://www.w3.org/1999/xhtml" href="{$prefix}{string(.)}">
+ <xsl:value-of select="string(.)"/>
+ </a>
+ </xsl:template>
+
<xsl:template match="*" mode="identity">
<xsl:copy>
<xsl:apply-templates mode="identity"/>