]> git.meshlink.io Git - catta/commitdiff
Add introspection XSL stylesheet
authorLennart Poettering <lennart@poettering.net>
Thu, 4 Aug 2005 19:22:31 +0000 (19:22 +0000)
committerLennart Poettering <lennart@poettering.net>
Thu, 4 Aug 2005 19:22:31 +0000 (19:22 +0000)
git-svn-id: file:///home/lennart/svn/public/avahi/trunk@233 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe

avahi-daemon/DomainBrowser.introspect
avahi-daemon/EntryGroup.introspect
avahi-daemon/Server.introspect
avahi-daemon/ServiceBrowser.introspect
avahi-daemon/ServiceTypeBrowser.introspect
avahi-daemon/introspect.xsl [new file with mode: 0644]

index dda85d07073c8e15fcb5cd80e7f3bd0f101eb034..68e08847e6425c472576b81d0c96bd70e7c34f32 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" standalone='no'?><!--*-nxml-*-->
+<?xml-stylesheet type="text/xsl" href="introspect.xsl"?>
 <!DOCTYPE node SYSTEM "introspect.dtd">
 <node>
   
index fa21b04869253e941a16e3435ed63a85222c9575..a33f338724a7d3dfb0a47468bb48238831dec8b7 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" standalone='no'?><!--*-nxml-*-->
+<?xml-stylesheet type="text/xsl" href="introspect.xsl"?>
 <!DOCTYPE node SYSTEM "introspect.dtd">
 <node>
   
index ecd25c89dc03a5c245dfb135187e1c11e1e9b6a5..4fa7d5e13eeeca06ba5b0c42b5411cb6ad2668b2 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" standalone='no'?><!--*-nxml-*-->
+<?xml-stylesheet type="text/xsl" href="introspect.xsl"?>
 <!DOCTYPE node SYSTEM "introspect.dtd">
 <node>
 
     </method>
 
   </interface>
-
 </node>
index e1790a1364879cd5348b2d0ca2f010364fbacc48..ddc66b3b4009cf3ab5330cc72450fa26b7d31cf4 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" standalone='no'?><!--*-nxml-*-->
+<?xml-stylesheet type="text/xsl" href="introspect.xsl"?>
 <!DOCTYPE node SYSTEM "introspect.dtd">
 <node>
   
index ebb93263d593c23cec4c1c0bdb7542175dfccc16..12b40e47b5050bc989bf475f46d074a31b652c05 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" standalone='no'?><!--*-nxml-*-->
+<?xml-stylesheet type="text/xsl" href="introspect.xsl"?>
 <!DOCTYPE node SYSTEM "introspect.dtd">
 <node>
   
diff --git a/avahi-daemon/introspect.xsl b/avahi-daemon/introspect.xsl
new file mode 100644 (file)
index 0000000..206de57
--- /dev/null
@@ -0,0 +1,87 @@
+<?xml version="1.0" encoding="iso-8859-15"?>
+
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+  <!-- $Id$ -->
+
+  <xsl:output method="xml" version="1.0" encoding="iso-8859-15" doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" indent="yes"/>
+
+  <xsl:template match="/">
+    <html xmlns="http://www.w3.org/1999/xhtml">
+      <head>
+        <title>DBUS Introspection data</title>
+        <style type="text/css">
+          body { color: black; background-color: white } 
+          h1 { font-family: sans-serif }
+          ul { list-style-type: none; margin-bottom: 10px }
+          li { font-family: sans-serif }
+          .keyword { font-style: italic }
+          .type { font-weight: bold }
+          .symbol { font-family: monospace }
+          .interface { background: #efefef; padding: 10px; margin: 10px }
+        </style>
+      </head>
+      <body>
+        <xsl:for-each select="node/interface">
+          <div class="interface">
+            <h1>
+              <span class="keyword">interface</span><xsl:text> </xsl:text>
+              <span class="symbol"><xsl:value-of select="@name"/></span>
+            </h1>   
+            
+            <ul>
+
+            <xsl:apply-templates select="annotation"/> 
+
+            <xsl:for-each select="method|signal|property">
+              <li>
+                <span class="keyword"><xsl:value-of select="name()"/></span>
+                <xsl:text> </xsl:text>
+                <span class="symbol"><xsl:value-of select="@name"/></span>
+                
+                <ul>
+                  <xsl:apply-templates select="annotation"/> 
+                  <xsl:for-each select="arg">
+                    <li>
+                      <span class="keyword">
+                        <xsl:choose>
+                          <xsl:when test="@direction != &quot;&quot;">
+                            <xsl:value-of select="@direction"/> 
+                          </xsl:when>
+                          <xsl:when test="name(..) = &quot;signal&quot;">
+                            out
+                          </xsl:when>
+                          <xsl:otherwise>
+                            in
+                          </xsl:otherwise>
+                        </xsl:choose>
+                      </span>
+
+                      <xsl:text> </xsl:text>
+                      
+                      <span class="type"><xsl:value-of select="@type"/></span><xsl:text> </xsl:text>
+                      <span class="symbol"><xsl:value-of select="@name"/></span><xsl:text> </xsl:text>
+                    </li>
+                  </xsl:for-each>
+                </ul>
+
+              </li>
+            </xsl:for-each>
+
+            </ul>
+          </div>
+        </xsl:for-each>
+      </body>
+    </html>
+  </xsl:template>
+
+
+  <xsl:template match="annotation"> 
+    <li xmlns="http://www.w3.org/1999/xhtml">
+      <span class="keyword">annotation</span>
+      <code><xsl:value-of select="@name"/></code><xsl:text> = </xsl:text>
+      <code><xsl:value-of select="@value"/></code>
+    </li>
+  </xsl:template>
+
+</xsl:stylesheet>