File: email.xsl

package info (click to toggle)
wxwidgets3.0 3.0.5.1%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 120,464 kB
  • sloc: cpp: 896,633; makefile: 52,303; ansic: 21,971; sh: 5,713; python: 2,940; xml: 1,534; perl: 264; javascript: 33
file content (39 lines) | stat: -rw-r--r-- 1,063 bytes parent folder | download | duplicates (10)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<?xml version="1.0"?>

<!--
    Name:       email.xsl
    Purpose:    Create email address lookup.
    Author:     Mike Wetherell
    Copyright:  (c) 2007 Mike Wetherell
    Licence:    wxWindows licence

    Usage: xsltproc -html tools/email.xsl http://svn.wxwidgets.org/users.cgi \
            > config/include/wx-devs.xml
-->

<xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">

<xsl:param name="at"> -at- </xsl:param>

<xsl:output indent="yes"/>

<xsl:template match="/">
    <emaillookup>
        <xsl:apply-templates select="//table/tr">
            <xsl:sort select="normalize-space(td[1])"/>
        </xsl:apply-templates>
    </emaillookup>
</xsl:template>

<xsl:template match="tr">
    <xsl:variable name="id" select="normalize-space(td[1])"/>
    <xsl:variable name="email" select="normalize-space(td[3])"/>

    <xsl:if test="$id and not(contains($id, ' ')) and contains($email, $at)">
        <email id="{$id}">
            <xsl:value-of select="$email"/>
        </email>
    </xsl:if>
</xsl:template>

</xsl:transform>