1 <?xml version=
"1.0" encoding=
"UTF-8"?>
2 <xsl:stylesheet xmlns=
"http://www.w3.org/1999/xhtml"
3 xmlns:
xsl=
"http://www.w3.org/1999/XSL/Transform"
4 xmlns:
zi=
"http://zero-install.sourceforge.net/2004/injector/interface"
7 <xsl:output method=
"xml" encoding=
"utf-8"
8 doctype-system=
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"
9 doctype-public=
"-//W3C//DTD XHTML 1.0 Strict//EN"/>
11 <xsl:template match=
"/zi:interface">
15 <xsl:value-of select=
"zi:name"/>
17 <style type='text/css'
>
18 body { margin:
2em; background: white; color: black;}
19 dt { font-weight: bold; text-transform:capitalize; }
20 dd { padding-bottom:
1em; }
21 dl.group { margin:
0.5em; padding:
0.5em; border:
1px dashed #
888;}
22 dl.impl { padding:
0.2em
1em
0.2em
1em; margin:
0.5em; border:
1px solid black; background: #ffa;}
23 pre { background: #ddd; color: black; padding:
0.2cm; }
27 <h1><xsl:value-of select=
"zi:name"/> -
<xsl:value-of select='zi:summary'
/></h1>
28 <p>This is a Zero Install feed. To run this program from the command-line, use this
30 <pre>$
0launch
<xsl:value-of select='/zi:interface/@uri'
/></pre>
32 The
<b>0alias
</b> command can be used to create a short-cut to run it again later.
35 Users of graphical environments can drag
<a href='{/zi:interface/@uri}'
>the feed's URL
</a> to
36 an installer such as
<a href='http://rox.sourceforge.net/desktop/AddApp'
>AddApp
</a>
37 or
<a href='http://rox.sourceforge.net/desktop/node/
269'
>the Xfce
4.4 panel
</a>.
40 If you don't have the
<b>0launch
</b> command, download it from
41 <a href='http://
0install.net/injector.html'
>the
0install.net web-site
</a>, which also contains
42 documentation about how the Zero Install system works.
</p>
45 <xsl:apply-templates mode='dl' select='*|@*'
/>
47 <h2>Available versions
</h2>
48 <p>The list below is just for information; Zero Install will automatically download one of
49 these versions for you.
51 <xsl:apply-templates select='zi:group|zi:requires|zi:implementation'
/>
56 <xsl:template mode='dl' match='/zi:interface/@uri'
>
57 <dt>Full name
</dt><dd><a href='{.}'
><xsl:value-of select=
"."/></a></dd>
60 <xsl:template mode='dl' match='zi:homepage'
>
61 <dt>Homepage
</dt><dd><a href='{.}'
><xsl:value-of select=
"."/></a></dd>
64 <xsl:template mode='dl' match='zi:description'
>
65 <dt>Description
</dt><dd><xsl:value-of select=
"."/></dd>
68 <xsl:template mode='dl' match='zi:icon'
>
69 <dt>Icon
</dt><dd><img src='{@href}'
/></dd>
72 <xsl:template mode='dl' match='*|@*'
/>
74 <xsl:template match='zi:group'
>
76 <xsl:apply-templates mode='attribs' select='@stability|@version|@id|@arch|@released'
/>
77 <xsl:apply-templates select='zi:group|zi:requires|zi:implementation'
/>
81 <xsl:template match='zi:requires'
>
83 <dd><a href='{@interface}'
><xsl:value-of select='@interface'
/></a></dd>
86 <xsl:template match='zi:implementation'
>
88 <xsl:apply-templates mode='attribs' select='@stability|@version|@id|@arch|@released'
/>
89 <xsl:apply-templates/>
93 <xsl:template mode='attribs' match='@*'
>
94 <dt><xsl:value-of select='name(.)'
/></dt>
95 <dd><xsl:value-of select='.'
/></dd>
98 <xsl:template match='zi:archive'
>
100 <dd><a href='{@href}'
><xsl:value-of select='@href'
/></a>
101 (
<xsl:value-of select='@size'
/> bytes)
</dd>