diff options
author | William Jon McCann <mccann@jhu.edu> | 2007-03-13 03:42:04 -0400 |
---|---|---|
committer | William Jon McCann <mccann@jhu.edu> | 2007-03-13 03:42:04 -0400 |
commit | 8b42a4928a0a266c3b3ae6bb13997764bc7f6405 (patch) | |
tree | b1b1f06fdd18da4475c0dd773df364be3a0c9be0 /doc/tools/spec-strip-docs.xsl | |
parent | 4595ab3d4953d6257a6fedfe5b294df67ff3581f (diff) |
add the last bits of spec framework
The spec is the introspection format extended with
docs. There are tools to build docbook and strip
the docs to make dbus introspect xml.
Diffstat (limited to 'doc/tools/spec-strip-docs.xsl')
-rw-r--r-- | doc/tools/spec-strip-docs.xsl | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/doc/tools/spec-strip-docs.xsl b/doc/tools/spec-strip-docs.xsl new file mode 100644 index 0000000..21ad558 --- /dev/null +++ b/doc/tools/spec-strip-docs.xsl @@ -0,0 +1,36 @@ +<?xml version='1.0'?> +<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + xmlns:doc="http://www.freedesktop.org/dbus/1.0/doc.dtd" + exclude-result-prefixes="doc"> + + <xsl:output method="xml" indent="yes" encoding="UTF-8" + omit-xml-declaration="no" + doctype-system="http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd" + doctype-public="-//freedesktop//DTD D-BUS Object Introspection 1.0//EN" /> + + <xsl:template match="*"> + <xsl:copy> + <xsl:for-each select="@*"> + <xsl:if test="not(starts-with(name(.), 'doc:'))"> + <xsl:copy/> + </xsl:if> + </xsl:for-each> + <xsl:apply-templates/> + </xsl:copy> + </xsl:template> + + <xsl:template match="node"> + <node> + <xsl:for-each select="@*"> + <xsl:if test="not(starts-with(name(.), 'xmlns'))"> + <xsl:copy/> + </xsl:if> + </xsl:for-each> + <xsl:apply-templates/> + </node> + </xsl:template> + + <xsl:template match="doc:*"/> + <xsl:template match="text()"/> + +</xsl:stylesheet> |