struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From craig...@locus.apache.org
Subject cvs commit: jakarta-struts/src/doc/stylesheets tld.xsl struts.xsl
Date Tue, 29 Aug 2000 00:28:55 GMT
craigmcc    00/08/28 17:28:54

  Modified:    .        build.xml
               src/doc  index.xml installation.xml project.xml
               src/doc/stylesheets struts.xsl
  Added:       src/doc  tags-bean.xml
               src/doc/stylesheets tld.xsl
  Log:
  Improve the factoring of the stylesheet used to produce the new format
  Struts documentation.  Add a stylesheet that takes the same source code
  and produces a TLD file.
  
  Add a new-format page for a set of tags focused on creating new beans
  (available to the rest of the page) from a variety of sources.  The tags
  themselves do not exist yet, but they will shortly.
  
  The new-format documentation will shortly be posted on the Jakarta web
  site page for Struts, at <http://jakarta.apache.org/struts>.  Be sure to
  check it out and make suggestions for improving the usability of these
  documents.
  
  Revision  Changes    Path
  1.11      +2 -0      jakarta-struts/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-struts/build.xml,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- build.xml	2000/08/28 02:14:36	1.10
  +++ build.xml	2000/08/29 00:28:53	1.11
  @@ -53,6 +53,8 @@
         <include name="**/*.properties" />
       </copydir>
       <copydir src="src/conf" dest="${build.home}/library"/>
  +    <style basedir="src/doc" destdir="${build.home}/library"
  +         extension=".tld" style="stylesheets/tld.xsl" includes="tags-*.xml"/>
     </target>
   
     <!-- BUILD:  Compile documentation application components -->
  
  
  
  1.2       +10 -8     jakarta-struts/src/doc/index.xml
  
  Index: index.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-struts/src/doc/index.xml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- index.xml	2000/08/28 02:14:36	1.1
  +++ index.xml	2000/08/29 00:28:53	1.2
  @@ -9,10 +9,8 @@
     <body>
   
   
  -  <section name="Welcome to Struts">
  +  <section name="Welcome to Struts" href="Welcome">
   
  -  <a name="Welcome"></a>
  -
     <p>Welcome to the Struts Framework!  The goal of this project
     is to provide an open source framework useful in building web applications
     with Java <a href="http://java.sun.com/products/servlet">Servlet</a> and
  @@ -44,10 +42,8 @@
   
     </section>
   
  -
  -  <section name="Acquiring Struts">
   
  -  <a name="Acquiring"></a>
  +  <section name="Acquiring Struts" href="Acquiring">
   
     <p>You can acquire binary and source distributions of Struts from the
     following locations:</p>
  @@ -63,18 +59,24 @@
         here</a>.</li>
     </ul>
   
  +  <p>Access to the CVS source repository for Struts is available through both
  +  <a href="http://jakarta.apache.org/cvsweb/index.cgi/jakarta-struts/">web
  +  browser</a> and
  +  <a href="http://jakarta.apache.org/getinvolved/cvsindex.html">CVS client</a>
  +  interfaces.</p>
  +
     <p>In addition to the Struts distribution, you will need to ensure that
     you have downloaded and installed all of the
     <a href="installation.html#Prerequisites">prerequisite</a> software
     applications.  Then, follow the appropriate instructions to
     <a href="installation.html#Building">build Struts from the source
  -  distribution</a>, or <a href="@installation.html#Installing">install and
  +  distribution</a>, or <a href="installation.html#Installing">install and
     use a Struts binary distribution</a> in your web application.</p>
   
     </section>
   
   
  -  <section name="Getting Involved">
  +  <section name="Getting Involved" href="Involved">
   
     <p>There are a number of ways to get more involved in the Struts
     community, including contributing to the future development of Struts.
  
  
  
  1.2       +4 -9      jakarta-struts/src/doc/installation.xml
  
  Index: installation.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-struts/src/doc/installation.xml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- installation.xml	2000/08/28 02:14:36	1.1
  +++ installation.xml	2000/08/29 00:28:53	1.2
  @@ -1,5 +1,5 @@
   <?xml version="1.0"?>
  -<document url="./index.xml">
  +<document url="./installation.xml">
   
     <properties>
       <author>Craig R. McClanahan</author>
  @@ -8,10 +8,8 @@
   
     <body>
   
  -  <section name="Prerequisite Software">
  +  <section name="Prerequisite Software" href="Prerequisites">
   
  -  <a name="Prerequisites"></a>
  -
     <p>In order to build a Struts source distribution, or install and use a
     Struts binary distribution, you will need to acquire and install several
     other software packages, as follows:</p>
  @@ -63,10 +61,8 @@
   
     </section>
   
  -
  -  <section name="Building Struts From Source">
   
  -    <a name="Building"></a>
  +  <section name="Building Struts From Source" href="Building">
   
       <p>First, download a source distribution of Struts by following the
       instructions <a href="index.html#Acquiring">here</a>.  Then, make sure
  @@ -104,8 +100,7 @@
   
     </section>
   
  -  <section name="Install A Struts Binary Distribution">
  -    <a name="Installing"></a>
  +  <section name="Install A Struts Binary Distribution" href="Installing">
   
       <p>First, download a binary distribution of Struts by following the
       instructions <a href="index.html#Acquiring">here</a>.  Then, make sure
  
  
  
  1.2       +13 -13    jakarta-struts/src/doc/project.xml
  
  Index: project.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-struts/src/doc/project.xml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- project.xml	2000/08/28 02:14:36	1.1
  +++ project.xml	2000/08/29 00:28:53	1.2
  @@ -6,24 +6,24 @@
       <title>Struts Framework</title>
   
       <menu name="Overview">
  -        <item name="Home"              href="index.html"/>
  -        <item name="Installation"      href="installation.html"/>
  -        <item name="TODO"              href="todo.txt"/>
  +        <item name="Home"               href="index.html"/>
  +        <item name="Installation"       href="installation.html"/>
       </menu>
   
       <menu name="Old Documents">
  -        <item name="User's Guide"      href="users_guide.html"/>
  -        <item name="Tag Library (Old)" href="tags.html"/>
  -        <item name="API Javadoc"       href="api/index.html"/>
  +        <item name="TODO"               href="todo.txt"/>
  +        <item name="User's Guide"       href="users_guide.html"/>
  +        <item name="Tag Library (Old)"  href="tags.html"/>
  +        <item name="API Javadoc"        href="api/index.html"/>
       </menu>
  -<!--
       <menu name="New Documents">
  -        <item name="Bean Tags"         href="tags-bean.html"/>
  -        <item name="Form Tags"         href="tags-form.html"/>
  -        <item name="Logic Tags"        href="tags-logic.html"/>
  -        <item name="Message Tags"      href="tags-message.html"/>
  -        <item name="Template Tags"     href="tags-template.html"/>
  -    </menu>
  +        <item name="Bean/Property Tags" href="tags-bean.html"/>
  +<!--
  +        <item name="Form Tags"          href="tags-form.html"/>
  +        <item name="Logic Tags"         href="tags-logic.html"/>
  +        <item name="Message Tags"       href="tags-message.html"/>
  +        <item name="Template Tags"      href="tags-template.html"/>
   -->
  +    </menu>
   
   </project>
  
  
  
  1.1                  jakarta-struts/src/doc/tags-bean.xml
  
  Index: tags-bean.xml
  ===================================================================
  <?xml version="1.0"?>
  <document url="./installation.xml">
  
  <properties>
    <author>Craig R. McClanahan</author>
    <title>The Struts Framework Project - Bean/Property Tags</title>
  </properties>
  
  <body>
  
  
  <taglib>
  
    <tlibversion>1.0</tlibversion>
    <jspversion>1.1</jspversion>
    <shortname>Struts Bean/Property Tags</shortname>
    <display-name>Bean and Property Definition Tags</display-name>
    <uri>http://jakarta.apache.org/struts/tags-bean-1.0</uri>
    <info>
    <p>This tag library contains tags useful in accessing beans and their
    properties, as well as defining new beans (based on these accesses)
    that are accessible to the remainder of the page via scripting variables
    and page scope attributes.  Convenient mechanisms to create new beans
    based on the value of request cookies, headers, and parameters are also
    provided.</p>
    </info>
  
  
    <tag>
  
      <name>cookie</name>
      <summary>
      Define a scripting variable based on the value(s) of the specified
      request cookie.
      </summary>
      <tagclass>org.apache.struts.taglib.bean.CookieTag</tagclass>
      <teiclass>org.apache.struts.taglib.bean.CookieTei</teiclass>
      <bodycontent>empty</bodycontent>
      <info>
      <p>Retrieve the value of the specified request cookie (as a single
      value or multiple values, depending on the <code>values</code> attribute),
      and define the result as a page scope attribute of type <code>Cookie</code>
      (if <code>values</code> is not specified) or <code>Cookie[]</code>
      (if <code>values</code> is specified).</p>
  
      <p>If no cookie with the specified name can be located, a request time
      exception will be thrown.</p>
      </info>
  
      <attribute>
        <name>id</name>
        <required>true</required>
        <rtexprvalue>false</rtexprvalue>
        <info>
        <p>Specifies the name of the scripting variable (and associated page
        scope attribute) that will be made available with the value of the
        specified request cookie.</p>
        </info>
      </attribute>
  
      <attribute>
        <name>name</name>
        <required>true</required>
        <rtexprvalue>false</rtexprvalue>
        <info>
        <p>Specifies the name of the request cookie whose value, or values,
        is to be retrieved.</p>
        </info>
      </attribute>
  
      <attribute>
        <name>values</name>
        <required>false</required>
        <rtexprvalue>false</rtexprvalue>
        <info>
        <p>If any arbitrary value for this attribute is specified, causes all
        matching cookies to be accumulated and stored into a bean of type
        <code>Cookie[]</code>.  If not specified, the first value for the
        specified cookie will be retrieved as a value of type
        <code>Cookie</code>.</p>
        </info>
      </attribute>
  
    </tag>
  
  
    <tag>
  
      <name>define</name>
      <summary>
      Define a scripting variable based on the value(s) of the specified
      bean property.
      </summary>
      <tagclass>org.apache.struts.taglib.bean.DefineTag</tagclass>
      <teiclass>org.apache.struts.taglib.bean.DefineTei</teiclass>
      <bodycontent>empty</bodycontent>
      <info>
      <p>Retrieve the value of a specified bean property, and define it
      as a page scope attribute accessible to the remainder of the current
      page.  No type conversion is performed on the returned property value,
      unless it is a Java primitive type, in which case it is wrapped in the
      appropriate wrapper class (i.e. int is wrapped by java.lang.Integer).</p>
  
      <p>If a problem occurs while retrieving the specified bean property, a
      request time exception will be thrown.</p>
      </info>
  
      <attribute>
        <name>id</name>
        <required>true</required>
        <rtexprvalue>false</rtexprvalue>
        <info>
        <p>Specifies the name of the scripting variable (and associated page
        scope attribute) that will be made available with the value of the
        specified property.</p>
        </info>
      </attribute>
  
      <attribute>
        <name>name</name>
        <required>true</required>
        <rtexprvalue>false</rtexprvalue>
        <info>
        <p>Specifies the attribute name of the bean whose property is accessed
        to define a new page scope attribute (if <code>property</code> is also
        specified) or the attribute name of the bean that is duplicated with
        the new reference created by this tag (if <code>property</code> is not
        also specified).</p>
        </info>
      </attribute>
  
      <attribute>
        <name>property</name>
        <required>false</required>
        <rtexprvalue>true</rtexprvalue>
        <info>
        <p>Specifies the name of the property to be accessed on the bean
        specified by <code>name</code>.  This value may be a simple, indexed,
        or nested property reference expression.  If not specified, the bean
        identified by <code>name</code> is given a new reference identified by
        <code>id</code>.</p>
        </info>
      </attribute>
  
      <attribute>
        <name>scope</name>
        <required>false</required>
        <rtexprvalue>false</rtexprvalue>
        <info>
        <p>Specifies the variable scope searched to retrieve the bean specified
        by <code>name</code>.  If not specified, the default rules applied by
        <code>PageContext.findAttribute()</code> are applied.</p>
        </info>
      </attribute>
  
    </tag>
  
  
    <tag>
  
      <name>header</name>
      <summary>
      Define a scripting variable based on the value(s) of the specified
      request header.
      </summary>
      <tagclass>org.apache.struts.taglib.bean.HeaderTag</tagclass>
      <teiclass>org.apache.struts.taglib.bean.HeaderTei</teiclass>
      <bodycontent>empty</bodycontent>
      <info>
      <p>Retrieve the value of the specified request header (as a single
      value or multiple values, depending on the <code>values</code> attribute),
      and define the result as a page scope attribute of type <code>String</code>
      (if <code>values</code> is not specified) or <code>String[]</code>
      (if <code>values</code> is specified).</p>
  
      <p>If no header with the specified name can be located, a request time
      exception will be thrown.</p>
      </info>
  
      <attribute>
        <name>id</name>
        <required>true</required>
        <rtexprvalue>false</rtexprvalue>
        <info>
        <p>Specifies the name of the scripting variable (and associated page
        scope attribute) that will be made available with the value of the
        specified request header.</p>
        </info>
      </attribute>
  
      <attribute>
        <name>name</name>
        <required>true</required>
        <rtexprvalue>false</rtexprvalue>
        <info>
        <p>Specifies the name of the request header whose value, or values,
        is to be retrieved.</p>
        </info>
      </attribute>
  
      <attribute>
        <name>values</name>
        <required>false</required>
        <rtexprvalue>false</rtexprvalue>
        <info>
        <p>If any arbitrary value for this attribute is specified, causes a call
        to <code>HttpServletRequest.getHeaders()</code> and a definition of the
        result as a bean of type <code>String[]</code>.  Otherwise,
        <code>HttpServletRequest.getHeader()</code> will be called, and a
        definition of the result as a bean of type <code>String</code>
        will be performed.</p>
        </info>
      </attribute>
  
    </tag>
  
  
    <tag>
  
      <name>include</name>
      <summary>
      Load the response from a dynamic application request and make it available
      as a bean.
      </summary>
      <tagclass>org.apache.struts.taglib.bean.IncludeTag</tagclass>
      <teiclass>org.apache.struts.taglib.bean.IncludeTei</teiclass>
      <bodycontent>JSP</bodycontent>
      <info>
      <p>Perform an internal dispatch to the specified application component
      and make the response data from that request available as a bean of
      type <code>String</code>.  This tag has a function similar to that of
      the standard <code>&lt;jsp:include&gt;</code> tag, except that the
      response data is always buffered if this tag is nested inside another.</p>
      </info>
  
      <attribute>
        <name>id</name>
        <required>true</required>
        <rtexprvalue>false</rtexprvalue>
        <info>
        <p>Specifies the name of the scripting variable (and associated page
        scope attribute) that will be made available with the value of the
        specified web application resource.</p>
        </info>
      </attribute>
  
      <attribute>
        <name>name</name>
        <required>true</required>
        <rtexprvalue>true</rtexprvalue>
        <info>
        <p>Context-relative name (starting with a '/') of the web application
        request to be dispatched, and whose response data is to be made
        available as a bean.</p>
        </info>
      </attribute>
  
    </tag>
  
  
    <tag>
  
      <name>parameter</name>
      <summary>
      Define a scripting variable based on the value(s) of the specified
      request parameter.
      </summary>
      <tagclass>org.apache.struts.taglib.bean.ParameterTag</tagclass>
      <teiclass>org.apache.struts.taglib.bean.ParameterTei</teiclass>
      <bodycontent>empty</bodycontent>
      <info>
      <p>Retrieve the value of the specified request parameter (as a single
      value or multiple values, depending on the <code>values</code> attribute),
      and define the result as a page scope attribute of type <code>String</code>
      (if <code>values</code> is not specified) or <code>String[]</code>
      (if <code>values</code> is specified).</p>
  
      <p>If no request parameter with the specified name can be located, a
      request time exception will be thrown.</p>
      </info>
  
      <attribute>
        <name>id</name>
        <required>true</required>
        <rtexprvalue>false</rtexprvalue>
        <info>
        <p>Specifies the name of the scripting variable (and associated page
        scope attribute) that will be made available with the value of the
        specified request parameter.</p>
        </info>
      </attribute>
  
      <attribute>
        <name>name</name>
        <required>true</required>
        <rtexprvalue>false</rtexprvalue>
        <info>
        <p>Specifies the name of the request parameter whose value, or values,
        is to be retrieved.</p>
        </info>
      </attribute>
  
      <attribute>
        <name>values</name>
        <required>false</required>
        <rtexprvalue>false</rtexprvalue>
        <info>
        <p>If any arbitrary value for this attribute is specified, causes a call
        to <code>ServletRequest.getParameterValues()</code> and a definition of
        the result as a bean of type <code>String[]</code>.  Otherwise,
        <code>ServletRequest.getParameter()</code> will be called, and a
        definition of the result as a bean of type <code>String</code>
        will be performed.</p>
        </info>
      </attribute>
  
    </tag>
  
  
    <tag>
  
      <name>resource</name>
      <summary>
      Load a web application resource and make it available as a bean.
      </summary>
      <tagclass>org.apache.struts.taglib.bean.ResourceTag</tagclass>
      <teiclass>org.apache.struts.taglib.bean.ResourceTei</teiclass>
      <bodycontent>empty</bodycontent>
      <info>
      <p>Retrieve the value of the specified web application resource, and make
      it available as either a <code>InputStream</code> or a <code>String</code>,
      depending on the value of the <code>input</code> attribute.</p>
  
      <p>If a problem occurs while retrieving the specified resource, a
      request time exception will be thrown.</p>
      </info>
  
      <attribute>
        <name>id</name>
        <required>true</required>
        <rtexprvalue>false</rtexprvalue>
        <info>
        <p>Specifies the name of the scripting variable (and associated page
        scope attribute) that will be made available with the value of the
        specified web application resource.</p>
        </info>
      </attribute>
  
      <attribute>
        <name>input</name>
        <required>false</required>
        <rtexprvalue>false</rtexprvalue>
        <info>
        <p>If any arbitrary value for this attribute is specified, the resource
        will be made available as an <code>InputStream</code>.  If this
        attribute is not specified, the resource will be made available
        as a <code>String</code>.</p>
        </info>
      </attribute>
  
      <attribute>
        <name>name</name>
        <required>true</required>
        <rtexprvalue>true</rtexprvalue>
        <info>
        <p>Context-relative name (starting with a '/') of the web application
        resource to be loaded and made available.</p>
        </info>
      </attribute>
  
    </tag>
  
  
    <tag>
  
      <name>write</name>
      <summary>
      Render the value of the specified bean property to the current
      JspWriter.
      </summary>
      <tagclass>org.apache.struts.taglib.bean.WriteTag</tagclass>
      <bodycontent>empty</bodycontent>
      <info>
      <p>Retrieve the value of the specified bean property, and render it to the
      current JspWriter as a String.  If there is a PropertyEditor configured
      for the property value's class, the <code>getAsText()</code> method will
      be called.  Otherwise, the usual <code>toString()</code> conversions
      will be applied.</p>
  
      <p>If a problem occurs while retrieving the specified bean property, a
      request time exception will be thrown.</p>
      </info>
  
      <attribute>
        <name>filter</name>
        <required>false</required>
        <rtexprvalue>false</rtexprvalue>
        <info>
        <p>If any arbitrary value for this attribute is specified, the result
        of converting the specified bean property to a String will then be
        filtered for characters that are sensitive in HTML, and any such
        characters will be replaced by their entity equivalents.</p>
        </info>
      </attribute>
  
      <attribute>
        <name>name</name>
        <required>true</required>
        <rtexprvalue>false</rtexprvalue>
        <info>
        <p>Specifies the attribute name of the bean whose property is accessed
        to retrieve the value specified by <code>property</code> (if
        specified).  If <code>property</code> is not specified, the value of
        this bean itself will be rendered.</p>
        </info>
      </attribute>
  
      <attribute>
        <name>property</name>
        <required>false</required>
        <rtexprvalue>true</rtexprvalue>
        <info>
        <p>Specifies the name of the property to be accessed on the bean
        specified by <code>name</code>.  This value may be a simple, indexed,
        or nested property reference expression.  If not specified, the bean
        identified by <code>name</code> will itself be rendered.</p>
        </info>
      </attribute>
  
      <attribute>
        <name>scope</name>
        <required>false</required>
        <rtexprvalue>false</rtexprvalue>
        <info>
        <p>Specifies the variable scope searched to retrieve the bean specified
        by <code>name</code>.  If not specified, the default rules applied by
        <code>PageContext.findAttribute()</code> are applied.</p>
        </info>
      </attribute>
  
    </tag>
  
  
  </taglib>
  
  </body>
  
  </document>
  
  
  
  1.2       +175 -79   jakarta-struts/src/doc/stylesheets/struts.xsl
  
  Index: struts.xsl
  ===================================================================
  RCS file: /home/cvs/jakarta-struts/src/doc/stylesheets/struts.xsl,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- struts.xsl	2000/08/28 02:14:38	1.1
  +++ struts.xsl	2000/08/29 00:28:54	1.2
  @@ -1,36 +1,35 @@
   <?xml version="1.0" encoding="ISO-8859-1"?>
   <!-- Content Stylesheet for Struts Documentation -->
  -<!-- $Id: struts.xsl,v 1.1 2000/08/28 02:14:38 craigmcc Exp $ -->
  +<!-- $Id: struts.xsl,v 1.2 2000/08/29 00:28:54 craigmcc Exp $ -->
   
   <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
     version="1.0">
   
  -  <!-- Output Method -->
  +  <!-- Output method -->
     <xsl:output method="html" indent="no"/>
   
  -  <!-- Defined Variables -->
  -  <xsl:variable name="color-bg"   select="'#ffffff'"/>
  -  <xsl:variable name="color-fg"   select="'#000000'"/>
  -  <xsl:variable name="color-link" select="'#023264'"/>
  -  <xsl:variable name="color-text" select="'#000000'"/>
  -  <xsl:variable name="section-bg" select="'#023264'"/>
  -  <xsl:variable name="section-fg" select="'#ffffff'"/>
  +  <!-- Defined variables -->
  +  <xsl:variable name="body-bg"   select="'#ffffff'"/>
  +  <xsl:variable name="body-fg"   select="'#000000'"/>
  +  <xsl:variable name="body-link" select="'#023264'"/>
  +  <xsl:variable name="banner-bg" select="'#023264'"/>
  +  <xsl:variable name="banner-fg" select="'#ffffff'"/>
  +
  +  <!-- Process an entire document into an HTML page -->
  +  <xsl:template match="document">
  +    <xsl:variable name="project"
  +                select="document('../project.xml')/project"/>
   
  -  <!-- Match the entire document and process to a web page -->
  -  <xsl:template match="/">
  -
  -    <xsl:variable name="project" select="document('../project.xml')/project"/>
       <html>
  -
       <head>
  -    <meta name="author" content="{document/properties/author/.}"/>
  +    <meta name="author" content="{properties/author/.}"/>
       <!-- <link rel="stylesheet" type="text/css" href="default.css"/> -->
       <xsl:choose>
  -      <xsl:when test="/document/properties/title">
  -        <title><xsl:value-of select="/document/properties/title"/></title>
  +      <xsl:when test="properties/title">
  +        <title><xsl:value-of select="properties/title"/></title>
         </xsl:when>
  -      <xsl:when test="/document/body/title">
  -        <title><xsl:value-of select="/document/body/title"/></title>
  +      <xsl:when test="body/title">
  +        <title><xsl:value-of select="body/title"/></title>
         </xsl:when>
         <xsl:otherwise>
           <title><xsl:value-of select="$project/title"/></title>
  @@ -38,100 +37,197 @@
       </xsl:choose>
       </head>
   
  -    <body bgcolor="{$color-bg}" link="{$color-link}" vlink="{$color-link}"
  -          alink="{$color-link}" text="{$color-text}">
  +    <body bgcolor="{$body-bg}" text="{$body-fg}" link="{$body-link}"
  +          alink="{$body-link}" vlink="{$body-link}">
   
  -    <table border="0" cellpadding="0" cellspacing="0" width="100%">
  +    <table border="0" width="100%" cellspacing="5">
   
         <tr><td colspan="2">
  -          <a href="http://jakarta.apache.org">
  -          <img src="images/jakarta-logo.gif" align="left" border="0"/>
  -          </a>
  -          <img src="images/struts.gif" align="right" border="0"/>
  +        <a href="http://jakarta.apache.org">
  +        <img src="images/jakarta-logo.gif" align="left" border="0"/>
  +        </a>
  +        <img src="images/struts.gif" align="right" border="0"/>
         </td></tr>
   
         <tr><td colspan="2">
  -          <hr/>
  +        <hr/>
         </td></tr>
  -
  -      <tr><td width="120" valign="top" cellspacing="2" cellpadding="0">
  -
  -        <table border="0" cellspacing="2">
  -          <xsl:for-each select="$project/menu">
  -            <tr><td align="left" colspan="2">
  -              <font color="${color-link}"><b>
  -                <xsl:value-of select="@name"/>
  -              </b></font>
  -            </td></tr>
  -            <xsl:for-each select="item">
  -              <tr>
  -                <td width="20">*</td>
  -                <td>
  -                  <font size="-1">
  -                    <xsl:variable name="href">
  -                      <xsl:value-of select="@href"/>
  -                    </xsl:variable>
  -                    <a href="{$href}"><xsl:value-of select="@name"/></a>
  -                  </font>
  -                </td>
  -              </tr>
  -            </xsl:for-each>
  -          </xsl:for-each>
  -        </table>
  -
  -      </td>
  -      <td width="480" cellspacing="2" cellpadding="0" valign="top">
  -
  -        <xsl:apply-templates select="document/body"/>
   
  -      </td></tr>
  +      <tr>
  +        <td width="120" valign="top">
  +          <xsl:apply-templates select="$project"/>
  +        </td>
  +
  +        <td valign="top">
  +          <xsl:apply-templates select="body"/>
  +        </td>
  +      </tr>
   
         <tr><td colspan="2">
           <hr/>
         </td></tr>
   
         <tr><td colspan="2">
  -        <div align="center"><font size="-1">
  +        <div align="center"><font color="{$body-link}" size="-1"><em>
           Copyright &#169; 2000, Apache Software Foundation
  -        </font></div>
  +        </em></font></div>
           <img src="images/struts-power.gif" align="right" border="0"/>
         </td></tr>
   
       </table>
  -
  -
  -
       </body>
  -
       </html>
   
     </xsl:template>
   
  +  <!-- Process a menu for the navigation bar -->
  +  <xsl:template match="menu">
  +    <table border="0" cellspacing="5">
  +      <tr>
  +        <th colspan="2" align="left">
  +          <font color="{body-link}"><strong>
  +            <xsl:value-of select="@name"/>
  +          </strong></font>
  +        </th>
  +      </tr>
  +      <xsl:apply-templates/>
  +    </table>
  +  </xsl:template>
   
  -  <!-- Process the document body -->
  -  <xsl:template match="document/body">
   
  -    <table border="0" width="100%">
  -      <xsl:for-each select="section">
  -        <tr><td bgcolor="{$section-bg}" cellspacing="5" cellpadding="5">
  -          <font color="{$section-fg}" face="arial,helvetica,sanserif" size="+1"><b>
  -            <xsl:value-of select="@name"/>
  -          </b></font>
  -        </td></tr>
  -        <tr><td cellspacing="0" cellpadding="0">
  -          <blockquote>
  -            <xsl:apply-templates/>
  -          </blockquote>
  -        </td></tr>
  -      </xsl:for-each>
  +  <!-- Process a menu item for the navigation bar -->
  +  <xsl:template match="item">
  +    <tr>
  +      <td align="center" width="15"></td>
  +      <td>
  +        <font size="-1">
  +        <xsl:variable name="href">
  +          <xsl:value-of select="@href"/>
  +        </xsl:variable>
  +        <a href="{$href}"><xsl:value-of select="@name"/></a>
  +        </font>
  +      </td>
  +    </tr>
  +  </xsl:template>
  +
  +  <!-- Process a documentation section -->
  +  <xsl:template match="section">
  +    <xsl:when test="@href">
  +      <xsl:variable name="href">
  +        <xsl:value-of select="@href"/>
  +      </xsl:variable>
  +      <a name="{$href}"></a>
  +    </xsl:when>
  +    <table border="0" cellspacing="5" cellpadding="5" width="100%">
  +      <tr><td bgcolor="{$banner-bg}">
  +        <font color="{$banner-fg}" face="arial,helvetica,sanserif" size="+1">
  +          <strong><xsl:value-of select="@name"/></strong>
  +        </font>
  +      </td></tr>
  +      <tr><td>
  +        <blockquote>
  +          <xsl:apply-templates/>
  +        </blockquote>
  +      </td></tr>
  +    </table>
  +  </xsl:template>
  +
  +  <!-- Process a tag library section -->
  +  <xsl:template match="taglib">
  +    <table border="0" cellspacing="5" cellpadding="5" width="100%">
  +      <tr><td bgcolor="{$banner-bg}">
  +        <font color="{$banner-fg}" face="arial,helvetica,sanserif" size="+1">
  +          <strong><xsl:value-of select="display-name"/></strong>
  +        </font>
  +      </td></tr>
  +      <tr><td>
  +        <blockquote>
  +          <xsl:apply-templates select="info"/>
  +        </blockquote>
  +      </td></tr>
  +      <tr><td>
  +        <blockquote>
  +          <table border="1" cellspacing="2" cellpadding="2">
  +            <tr>
  +              <th width="15%">Tag Name</th>
  +              <th>Description</th>
  +            </tr>
  +            <xsl:for-each select="tag">
  +              <tr>
  +                <td align="center">
  +                  <xsl:variable name="name">
  +                    <xsl:value-of select="name"/>
  +                  </xsl:variable>
  +                  <a href="#{$name}"><xsl:value-of select="name"/></a>
  +                </td>
  +                <td>
  +                  <xsl:value-of select="summary"/>
  +                </td>
  +              </tr>
  +            </xsl:for-each>
  +          </table>
  +        </blockquote>
  +      </td></tr>
       </table>
  +    <xsl:apply-templates select="tag"/>
  +  </xsl:template>
   
  +  <!-- Process an individual tag -->
  +  <xsl:template match="tag">
  +    <xsl:variable name="name">
  +      <xsl:value-of select="name"/>
  +    </xsl:variable>
  +    <a name="{$name}"></a>
  +    <table border="0" cellspacing="2" cellpadding="2">
  +      <tr><td bgcolor="{$banner-bg}">
  +        <font color="{$banner-fg}" face="arial,helvetica,sanserif">
  +          <strong><xsl:value-of select="name"/></strong> -
  +          <xsl:value-of select="summary"/>
  +        </font>
  +      </td></tr>
  +      <tr><td>
  +        <blockquote>
  +          <xsl:apply-templates select="info"/>
  +        </blockquote>
  +      </td></tr>
  +      <tr><td>
  +        <blockquote>
  +          <table border="1" cellspacing="2" cellpadding="2">
  +            <tr>
  +              <th width="15%">Attribute Name</th>
  +              <th>Description</th>
  +            </tr>
  +            <xsl:for-each select="attribute">
  +              <tr>
  +                <td align="center">
  +                  <xsl:value-of select="name"/>
  +                </td>
  +                <td>
  +                  <xsl:apply-templates select="info"/>
  +                  <xsl:variable name="required">
  +                    <xsl:value-of select="required"/>
  +                  </xsl:variable>
  +                  <xsl:if test="required='true'">
  +                    [Required]
  +                  </xsl:if>
  +                  <xsl:if test="rtexprvalue='true'">
  +                    [RT Expr]
  +                  </xsl:if>
  +                </td>
  +              </tr>
  +            </xsl:for-each>
  +          </table>
  +        </blockquote>
  +      </td></tr>
  +    </table>
     </xsl:template>
   
  +
     <!-- Process an individual paragraph -->
     <xsl:template match="p">
       <p><xsl:apply-templates/><br/></p>
     </xsl:template>
  +
   
     <!-- Process everything else by just passing it through -->
     <xsl:template match="*|@*">
  
  
  
  1.1                  jakarta-struts/src/doc/stylesheets/tld.xsl
  
  Index: tld.xsl
  ===================================================================
  <?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 Librayr 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>
  
  </xsl:stylesheet>
  
  
  

Mime
View raw message