Project

Profile

Help

How to connect?
Download (717 Bytes) Statistics
| Branch: | Tag: | Revision:

he / tags / 9.8.0.2 / samples / styles / rename-to-lowercase.xsl @ 02f8308b

1
<xsl:transform
2
 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
3
 version="2.0">
4
  
5
  <!-- This stylesheet copies the input XML file, but converts names of elements and attributes to 
6
    lower-case -->
7
  
8
  <xsl:output method="xml" indent="yes"/>
9
  
10
  <xsl:template match="BOOKLIST">
11
    <xsl:element name="{lower-case(name(.))}">
12
      <xsl:apply-templates/>
13
    </xsl:element>
14
  </xsl:template>
15

    
16
  <xsl:template match="*">
17
    <xsl:element name="{lower-case(name(.))}">
18
      <xsl:apply-templates select="@*"/>
19
      <xsl:apply-templates/>
20
    </xsl:element>
21
  </xsl:template>
22
  
23
  <xsl:template match="@*">
24
    <xsl:attribute name="{lower-case(name(.))}" select="string(.)"/>
25
  </xsl:template>
26

    
27
</xsl:transform>	
(9-9/12)