]> git.0d.be Git - empathy.git/blob - tools/spec-to-introspect.xsl
Update tools/.gitignore
[empathy.git] / tools / spec-to-introspect.xsl
1 <!-- Remove Telepathy extensions from a D-Bus interface, trying to leave only
2 DTD-compliant introspection XML. The output still needs to be subjected to the
3 following sed filter:
4 sed -e 's@xmlns:tp="http://telepathy\.freedesktop\.org/wiki/DbusSpec.extensions-v0"@@g'
5
6 The master copy of this stylesheet is in the Telepathy spec repository -
7 please make any changes there.
8
9 Copyright (C) 2006, 2007 Collabora Limited
10
11 This library is free software; you can redistribute it and/or
12 modify it under the terms of the GNU Lesser General Public
13 License as published by the Free Software Foundation; either
14 version 2.1 of the License, or (at your option) any later version.
15
16 This library is distributed in the hope that it will be useful,
17 but WITHOUT ANY WARRANTY; without even the implied warranty of
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
19 Lesser General Public License for more details.
20
21 You should have received a copy of the GNU Lesser General Public
22 License along with this library; if not, write to the Free Software
23 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
24 -->
25
26 <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
27   xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0"
28   exclude-result-prefixes="tp">
29
30   <xsl:template match="*">
31     <xsl:copy>
32       <xsl:for-each select="@*">
33         <xsl:if test="not(starts-with(name(), 'tp:'))">
34           <xsl:copy/>
35         </xsl:if>
36       </xsl:for-each>
37       <xsl:apply-templates/>
38     </xsl:copy>
39   </xsl:template>
40
41   <xsl:template match="tp:*"/>
42   <xsl:template match="text()"/>
43
44   <xsl:output method="xml" indent="yes" encoding="UTF-8"
45     omit-xml-declaration="no"
46     doctype-system="http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd"
47     doctype-public="-//freedesktop//DTD D-BUS Object Introspection 1.0//EN" />
48
49 </xsl:stylesheet>
50
51 <!-- vim:set sw=2 sts=2 et: -->