File: basic.xsl

package info (click to toggle)
caribou 0.4.15-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 3,948 kB
  • ctags: 2,905
  • sloc: ansic: 14,359; sh: 11,430; python: 1,264; xml: 713; makefile: 428
file content (32 lines) | stat: -rw-r--r-- 958 bytes parent folder | download | duplicates (4)
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
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0"
                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                xmlns:gen="dummy-namespace-for-the-generated-xslt">

  <xsl:namespace-alias stylesheet-prefix="gen" result-prefix="xsl"/>
  <xsl:output method="xml" indent="yes"/>
  <xsl:template match="/">
    <gen:stylesheet version="1.0">
      <gen:output method="xml" indent="yes"/>
      <gen:template match="@*|node()">
        <gen:copy>
          <gen:apply-templates select="@*|node()"/>
        </gen:copy>
      </gen:template>

      <gen:template match="//override"/>

      <xsl:apply-templates/>
    </gen:stylesheet>
  </xsl:template>

  <xsl:template match="text()"/>

  <xsl:template match="//override">
    <gen:template>
      <xsl:attribute name="match"><xsl:value-of select="@xpath"/></xsl:attribute>
      <xsl:copy-of select="node()/."/>
    </gen:template>
  </xsl:template>

</xsl:stylesheet>