Home | History | Annotate | Download | only in doc
      1 <?xml version="1.0" encoding="ISO-8859-15"?>
      2 <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml">
      3 
      4 <!-- 
      5  Copyright (C) 2005 Lennart Poettering.
      6 
      7  Licensed under the Academic Free License version 2.1
      8 
      9  This program is free software; you can redistribute it and/or modify
     10  it under the terms of the GNU General Public License as published by
     11  the Free Software Foundation; either version 2 of the License, or
     12  (at your option) any later version.
     13 
     14  This program is distributed in the hope that it will be useful,
     15  but WITHOUT ANY WARRANTY; without even the implied warranty of
     16  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     17  GNU General Public License for more details.
     18 
     19  You should have received a copy of the GNU General Public License
     20  along with this program; if not, write to the Free Software
     21  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
     22 -->
     23 
     24 <!-- $Id$ -->
     25 
     26 <xsl:output method="xml" version="1.0" encoding="iso-8859-15" doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" indent="yes"/>
     27 
     28 <xsl:template match="/">
     29   <html>
     30     <head>
     31       <title>DBUS Introspection data</title>
     32       <style type="text/css">
     33         body { color: black; background-color: white } 
     34         h1 { font-family: sans-serif }
     35         ul { list-style-type: none; margin-bottom: 10px }
     36         li { font-family: sans-serif }
     37         .keyword { font-style: italic }
     38         .type { font-weight: bold }
     39         .symbol { font-family: monospace }
     40         .interface { padding: 10px; margin: 10px }
     41       </style>
     42     </head>
     43     <body>
     44       <xsl:for-each select="node/interface">
     45         <div class="interface">
     46           <h1>
     47             <span class="keyword">interface</span><xsl:text> </xsl:text>
     48             <span class="symbol"><xsl:value-of select="@name"/></span>
     49           </h1>   
     50           
     51           <ul>
     52 
     53             <xsl:apply-templates select="annotation"/> 
     54 
     55             <xsl:for-each select="method|signal|property">
     56               <li>
     57                 <span class="keyword"><xsl:value-of select="name()"/></span>
     58                 <xsl:text> </xsl:text>
     59                 <span class="symbol"><xsl:value-of select="@name"/></span>
     60                 
     61                 <ul>
     62                   <xsl:apply-templates select="annotation"/> 
     63                   <xsl:for-each select="arg">
     64                     <li>
     65                       <span class="keyword">
     66                         <xsl:choose>
     67                           <xsl:when test="@direction != &quot;&quot;">
     68                             <xsl:value-of select="@direction"/> 
     69                           </xsl:when>
     70                           <xsl:when test="name(..) = &quot;signal&quot;">
     71                             out
     72                           </xsl:when>
     73                           <xsl:otherwise>
     74                             in
     75                           </xsl:otherwise>
     76                         </xsl:choose>
     77                       </span>
     78 
     79                       <xsl:text> </xsl:text>
     80                       
     81                       <span class="type"><xsl:value-of select="@type"/></span><xsl:text> </xsl:text>
     82                       <span class="symbol"><xsl:value-of select="@name"/></span><xsl:text> </xsl:text>
     83                     </li>
     84                   </xsl:for-each>
     85                 </ul>
     86 
     87               </li>
     88             </xsl:for-each>
     89 
     90           </ul>
     91         </div>
     92       </xsl:for-each>
     93     </body>
     94   </html>
     95 </xsl:template>
     96 
     97 
     98 <xsl:template match="annotation"> 
     99   <li>
    100     <span class="keyword">annotation</span>
    101     <code><xsl:value-of select="@name"/></code><xsl:text> = </xsl:text>
    102     <code><xsl:value-of select="@value"/></code>
    103   </li>
    104 </xsl:template>
    105 
    106 </xsl:stylesheet>
    107