last_transformer.xsl 783 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
<?xml version="1.0" encoding="UTF-8"?>

<xsl:stylesheet
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0"
    xmlns:xs="http://www.w3.org/2001/XMLSchema"
	xpath-default-namespace="http://www.w3.org/1999/xhtml">

    <xsl:output method="xml" indent="yes"/>

    <xsl:template match="node()|@*">
        <xsl:copy>
            <xsl:apply-templates select="node()|@*"/>
        </xsl:copy>
    </xsl:template>

16
17
18
19
20
21
22
23
    <xsl:template match="body">
      <body>
        <h1><xsl:value-of select="/html/head/title"/></h1>
        <p class="authors"><xsl:value-of select="/html/head/meta[@name='author']/@content"/></p>

        <xsl:apply-templates select="node()|@*"/>
      </body>
    </xsl:template>
24

Baptiste Perraud's avatar
Baptiste Perraud committed
25
26
    <xsl:template match="footer[not(node())]"/>

27
28

</xsl:stylesheet>