File: tld.xsl

package info (click to toggle)
libstruts1.2-java 1.2.9-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 47,516 kB
  • ctags: 29,430
  • sloc: xml: 90,344; java: 71,078; jsp: 31,692; makefile: 10; sh: 2
file content (71 lines) | stat: -rw-r--r-- 2,334 bytes parent folder | download | duplicates (14)
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
<?xml version="1.0" encoding="ISO-8859-1"?>
<!-- Convert Tag Library Documentation into Tag Library Descriptor -->

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

  <!-- Output method and formatting -->
  <xsl:output
             method="xml"
             indent="yes"
     doctype-public="-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.1//EN"
     doctype-system="http://java.sun.com/j2ee/dtds/web-jsptaglibrary_1_1.dtd"/>
   <xsl:strip-space elements="taglib tag attribute"/>

  <!-- Process an entire tag library -->
  <xsl:template match="taglib">
    <taglib>
      <xsl:if test="tlibversion">
        <tlibversion><xsl:value-of select="tlibversion"/></tlibversion>
      </xsl:if>
      <xsl:if test="jspversion">
        <jspversion><xsl:value-of select="jspversion"/></jspversion>
      </xsl:if>
      <xsl:if test="shortname">
        <shortname><xsl:value-of select="shortname"/></shortname>
      </xsl:if>
      <xsl:if test="uri">
        <uri><xsl:value-of select="uri"/></uri>
      </xsl:if>
      <xsl:apply-templates select="tag"/>
    </taglib>
  </xsl:template>

  <!-- Process an individual tag -->
  <xsl:template match="tag">
    <tag>
      <xsl:if test="name">
        <name><xsl:value-of select="name"/></name>
      </xsl:if>
      <xsl:if test="tagclass">
        <tagclass><xsl:value-of select="tagclass"/></tagclass>
      </xsl:if>
      <xsl:if test="teiclass">
        <teiclass><xsl:value-of select="teiclass"/></teiclass>
      </xsl:if>
      <xsl:if test="bodycontent">
        <bodycontent><xsl:value-of select="bodycontent"/></bodycontent>
      </xsl:if>
      <xsl:apply-templates select="attribute"/>
    </tag>
  </xsl:template>

  <!-- Process an individual tag attribute -->
  <xsl:template match="attribute">
    <attribute>
      <xsl:if test="name">
        <name><xsl:value-of select="name"/></name>
      </xsl:if>
      <xsl:if test="required">
        <required><xsl:value-of select="required"/></required>
      </xsl:if>
      <xsl:if test="rtexprvalue">
        <rtexprvalue><xsl:value-of select="rtexprvalue"/></rtexprvalue>
      </xsl:if>
    </attribute>
  </xsl:template>

  <!-- Skip irrelevant details -->
  <xsl:template match="properties"/>

</xsl:stylesheet>