~ubuntu-branches/ubuntu/wily/xubuntu-docs/wily-proposed

« back to all changes in this revision

Viewing changes to desktop-guide/libs/writeOwnerStatus.xsl

  • Committer: Package Import Robot
  • Author(s): Matthew East, Matthew East, Jeremy Bicha
  • Date: 2012-09-19 20:38:04 UTC
  • Revision ID: package-import@ubuntu.com-20120919203804-1t50gcb1xi8xbyzo
Tags: 12.10.1
[ Matthew East ]
* Complete rewrite of desktop-guide by Pasi Lallinaho
* Change to folder structure of desktop-guide to allow translations

[ Jeremy Bicha ]
* debian/control:
  - Bump Standards-Version to 3.9.3 and debhelper to 8
  - Don't build-depend on ubuntu-docs
* debian/preinst: Dropped, not needed after 12.04 LTS

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<?xml version="1.0" encoding="UTF-8"?>
2
 
<!--
3
 
   This stylesheet gathers information from the authorblurbs embedded in the documents and generates a Docbook Article.
4
 
   
5
 
   Author: Sean Wheller sean@inwords.co.za http://www.inwords.co.za
6
 
 -->
7
 
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
8
 
    <xsl:output doctype-public="-//OASIS//DTD DocBook XML V4.3//EN"
9
 
        doctype-system="http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" encoding="UTF-8"
10
 
        indent="yes" version="1.0"/>
11
 
    <xsl:template match="/">
12
 
        <article>
13
 
            <title>
14
 
                <xsl:value-of select="//title/."/>
15
 
            </title>
16
 
            <subtitle>Documentation Project Status Report</subtitle>
17
 
            <informaltable>
18
 
                <tgroup cols="2">
19
 
                    <thead>
20
 
                        <row>
21
 
                            <entry>TOC Entry</entry>
22
 
                            <entry>Author Remarks</entry>
23
 
                        </row>
24
 
                    </thead>
25
 
                    <tbody>
26
 
                        <xsl:call-template name="doItems"/>
27
 
                    </tbody>
28
 
                </tgroup>
29
 
            </informaltable>
30
 
        </article>
31
 
    </xsl:template>
32
 
    <xsl:template name="doItems">
33
 
<!--        <xsl:for-each select="//chapter|//sect1|//sect2|//sect3|//sect4|//sect5"> -->
34
 
        <xsl:for-each select="//chapter|//sect1">
35
 
            <row>
36
 
                <entry>
37
 
                    <xsl:value-of select="title"/>
38
 
                </entry>
39
 
                <entry>
40
 
                    <xsl:choose>
41
 
                        <xsl:when test="@status='help'">
42
 
                            <para>
43
 
                                <emphasis role="bold">
44
 
                                    <xsl:text>Help Wanted</xsl:text>
45
 
                                </emphasis>
46
 
                            </para>
47
 
                            <xsl:call-template name="doAuthor"/>
48
 
                        </xsl:when>
49
 
                        <xsl:when test="@status='writing'">
50
 
                            <para>
51
 
                                <xsl:text>In Progress</xsl:text>
52
 
                                <xsl:call-template name="doAuthor"/>
53
 
                            </para>
54
 
                        </xsl:when>
55
 
                        <xsl:when test="@status='review'">
56
 
                            <para>
57
 
                                <emphasis>
58
 
                                    <xsl:text>Awaiting Review</xsl:text>
59
 
                                </emphasis>
60
 
                            </para>
61
 
                            <xsl:call-template name="doAuthor"/>
62
 
                        </xsl:when>
63
 
                        <xsl:when test="@status='reviewing'">
64
 
                            <para>
65
 
                                <emphasis>
66
 
                                    <xsl:text>In Review</xsl:text>
67
 
                                </emphasis>
68
 
                            </para>
69
 
                            <xsl:call-template name="doAuthor"/>
70
 
                        </xsl:when>
71
 
                        <xsl:when test="@status='complete'">
72
 
                            <para>
73
 
                                <xsl:text>Finished</xsl:text>
74
 
                            </para>
75
 
                            <xsl:call-template name="doAuthor"/>
76
 
                        </xsl:when>
77
 
                        <xsl:otherwise>
78
 
                            <para>
79
 
                                <xsl:text>NO STATUS</xsl:text>
80
 
                            </para>
81
 
                        </xsl:otherwise>
82
 
                    </xsl:choose>
83
 
                </entry>
84
 
            </row>
85
 
        </xsl:for-each>
86
 
    </xsl:template>
87
 
    <xsl:template name="doAuthor">
88
 
        <xsl:if test="sect1info/authorblurb/para[text()]">
89
 
            <para>
90
 
                <xsl:value-of select="sect1info/authorblurb/para"/>
91
 
            </para>
92
 
        </xsl:if>
93
 
        <xsl:if test="chapterinfo/authorblurb/para[text()]">
94
 
            <para>
95
 
                <xsl:value-of select="chapterinfo/authorblurb/para"/>
96
 
            </para>
97
 
        </xsl:if>
98
 
    </xsl:template>
99
 
</xsl:stylesheet>