File: list-attribute-values.xsl

package info (click to toggle)
emacspeak 29.0-9
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 12,904 kB
  • sloc: xml: 55,354; lisp: 48,335; cpp: 2,321; tcl: 1,500; makefile: 936; python: 836; sh: 785; perl: 459; ansic: 241
file content (39 lines) | stat: -rwxr-xr-x 956 bytes parent folder | download | duplicates (5)
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"?>
<!--
Author: T. V. Raman <raman@cs.cornell.edu>
Copyright: (C) T. V. Raman, 2001 - 2002,   All Rights Reserved.
License: GPL
Description: Display all values of a specified attribute.
Hard-wired to display attribute class by default.
Param attr  specifies the attribute to list.

-->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
  <xsl:output method="text" indent="yes" encoding="UTF-8"/>
  <xsl:param name="attr"
  select="'class'"/>
  <xsl:param name="selector">
    //@<xsl:value-of select="$attr"/>
  </xsl:param>
  
  
  
  <xsl:template match="/">
    <xsl:apply-templates select="$selector"/>
  </xsl:template>
  <xsl:template match="@*">
    <xsl:value-of select="."/>
    <xsl:text>
    </xsl:text>
  </xsl:template>
</xsl:stylesheet>
<!--
Local Variables:
mode: xae
sgml-indent-step: 2
sgml-indent-data: t
sgml-set-face: nil
sgml-insert-missing-element-comment: nil
folded-file: t
End:
-->