commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ozeigerm...@apache.org
Subject cvs commit: jakarta-commons/transaction/xdocs/style basic.xsl
Date Fri, 19 Nov 2004 23:58:46 GMT
ozeigermann    2004/11/19 15:58:46

  Modified:    transaction/xdocs/file index.xml
               transaction/xdocs/maps wrappers-comparision.xml
               transaction/xdocs/locks tutorial.xml
  Added:       transaction/xdocs/style basic.xsl
  Log:
  Made links to api relative and added means to transform docs locally without Maven
  
  Revision  Changes    Path
  1.2       +12 -12    jakarta-commons/transaction/xdocs/file/index.xml
  
  Index: index.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/transaction/xdocs/file/index.xml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- index.xml	18 Nov 2004 23:27:19 -0000	1.1
  +++ index.xml	19 Nov 2004 23:58:46 -0000	1.2
  @@ -13,17 +13,17 @@
    <p>Sometimes it may be desirable to save a single file or even a
    number of related files to the file system atomically. This means if
    you write something and an error occurs or for any reason you change
  - you mind and rather want to cancel what you did. Consider your
  + your mind and rather want to cancel what you did. Consider your
    application fails in the middle of overwriting important data which
    neither gives you the old state nor the new one, but rather a
    corrupted one. Or only part of your data has been written leaving you
    with an inconsistent state.</p> 
   
   <p>The <a
  -href="http://jakarta.apache.org/commons/sandbox/transaction/apidocs/org/apache/commons/transaction/file/package-summary.html">transactional
  +href="../apidocs/org/apache/commons/transaction/file/package-summary.html">transactional
   file</a> package provides you with code that allows you to have atomic
   read and write operations on any file system. The <a
  -href="http://jakarta.apache.org/commons/sandbox/transaction/apidocs/org/apache/commons/transaction/file/FileResourceManager.html">file
  +href="../apidocs/org/apache/commons/transaction/file/FileResourceManager.html">file
   resource manager</a> offers you the possibility to isolate a number of
   operations on a set of files in a transaction. Using the <a
   href="../locks/index.html">locks package</a> it is able to offer you
  @@ -33,23 +33,23 @@
   monitored by the manager.</p>
   
   <p>When you <a
  -href="http://jakarta.apache.org/commons/sandbox/transaction/apidocs/org/apache/commons/transaction/file/FileResourceManager.html#startTransaction(java.lang.Object)">start</a>
  +href="../apidocs/org/apache/commons/transaction/file/FileResourceManager.html#startTransaction(java.lang.Object)">start</a>
   a transaction you need to provide an indentifier to later refer to
   this newly started transaction. You can also let an identifier be <a
  -href="http://jakarta.apache.org/commons/sandbox/transaction/apidocs/org/apache/commons/transaction/file/FileResourceManager.html#generatedUniqueTxId()">generated</a>
  +href="../apidocs/org/apache/commons/transaction/file/FileResourceManager.html#generatedUniqueTxId()">generated</a>
   for you. Calls to e.g. <a
  -href="http://jakarta.apache.org/commons/sandbox/transaction/apidocs/org/apache/commons/transaction/file/FileResourceManager.html#readResource(java.lang.Object,%20java.lang.Object)">read</a>,
  +href="../apidocs/org/apache/commons/transaction/file/FileResourceManager.html#readResource(java.lang.Object,%20java.lang.Object)">read</a>,
   <a
  -href="http://jakarta.apache.org/commons/sandbox/transaction/apidocs/org/apache/commons/transaction/file/FileResourceManager.html#createResource(java.lang.Object,%20java.lang.Object)">create</a>
  +href="../apidocs/org/apache/commons/transaction/file/FileResourceManager.html#createResource(java.lang.Object,%20java.lang.Object)">create</a>
   or <a
  -href="http://jakarta.apache.org/commons/sandbox/transaction/apidocs/org/apache/commons/transaction/file/FileResourceManager.html#writeResource(java.lang.Object,%20java.lang.Object)">write
  +href="../apidocs/org/apache/commons/transaction/file/FileResourceManager.html#writeResource(java.lang.Object,%20java.lang.Object)">write
   to</a> will need the identifier to know which transaction they belong to.</p>

   
   <p>Finally when you want to
   commit the transaction call <a
  -href="http://jakarta.apache.org/commons/sandbox/transaction/apidocs/org/apache/commons/transaction/file/FileResourceManager.html#commitTransaction(java.lang.Object)">commit</a>
  +href="../apidocs/org/apache/commons/transaction/file/FileResourceManager.html#commitTransaction(java.lang.Object)">commit</a>
   or <a
  -href="http://jakarta.apache.org/commons/sandbox/transaction/apidocs/org/apache/commons/transaction/file/FileResourceManager.html#rollbackTransaction(java.lang.Object)">rollback</a>
  +href="../apidocs/org/apache/commons/transaction/file/FileResourceManager.html#rollbackTransaction(java.lang.Object)">rollback</a>
   to undo all changes. The transactionality is achieved by first writing to
   temporary files and upon commit moving or copying them to the primary
   location. Locks and a delicate commit mechanism will assure that no
  @@ -57,11 +57,11 @@
   </p>
   
   <p>A fail safe <a
  -href="http://jakarta.apache.org/commons/sandbox/transaction/apidocs/org/apache/commons/transaction/file/FileSequence.html">file
  +href="../apidocs/org/apache/commons/transaction/file/FileSequence.html">file
   sequence</a> is the second main part of the file package. Just like
   sequences known from Oracle or other relational database systems it
   provides you with a unique ids. Each call to the <a
  -href="http://jakarta.apache.org/commons/sandbox/transaction/apidocs/org/apache/commons/transaction/file/FileSequence.html#nextSequenceValueBottom(java.lang.String,%20long)">next</a>
  +href="../apidocs/org/apache/commons/transaction/file/FileSequence.html#nextSequenceValueBottom(java.lang.String,%20long)">next</a>
   method will return a new unique long number and persists the current
   value of the sequence to disk. This means when you shut down your
   system and restart it you will still get no double
  
  
  
  1.2       +3 -3      jakarta-commons/transaction/xdocs/maps/wrappers-comparision.xml
  
  Index: wrappers-comparision.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/transaction/xdocs/maps/wrappers-comparision.xml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- wrappers-comparision.xml	18 Nov 2004 23:27:18 -0000	1.1
  +++ wrappers-comparision.xml	19 Nov 2004 23:58:46 -0000	1.2
  @@ -19,9 +19,9 @@
   <tr>
   <th align="left" valign="bottom" scope="col"></th>
   <th align="left" valign="bottom" scope="col"> <font face="Arial,
  -Helvetica, sans-serif"><strong><a href="http://jakarta.apache.org/commons/sandbox/transaction/apidocs/org/apache/commons/transaction/memory/TransactionalMapWrapper.html">TransactionalMapWrapper</a></strong></font></th>
  -<th align="left" valign="bottom" scope="col"> <font face="Arial, Helvetica, sans-serif"><strong><a
href="http://jakarta.apache.org/commons/sandbox/transaction/apidocs/org/apache/commons/transaction/memory/OptimisticMapWrapper.html">OptimisticMapWrapper</a></strong></font></th>
  -<th align="left" valign="bottom" scope="col"> <font face="Arial, Helvetica, sans-serif"><strong><a
href="http://jakarta.apache.org/commons/sandbox/transaction/apidocs/org/apache/commons/transaction/memory/PessimisticMapWrapper.html">PessimisticMapWrapper</a></strong></font></th>
  +Helvetica, sans-serif"><strong><a href="../apidocs/org/apache/commons/transaction/memory/TransactionalMapWrapper.html">TransactionalMapWrapper</a></strong></font></th>
  +<th align="left" valign="bottom" scope="col"> <font face="Arial, Helvetica, sans-serif"><strong><a
href="../apidocs/org/apache/commons/transaction/memory/OptimisticMapWrapper.html">OptimisticMapWrapper</a></strong></font></th>
  +<th align="left" valign="bottom" scope="col"> <font face="Arial, Helvetica, sans-serif"><strong><a
href="../apidocs/org/apache/commons/transaction/memory/PessimisticMapWrapper.html">PessimisticMapWrapper</a></strong></font></th>
   </tr>
   </thead>
   
  
  
  
  1.2       +12 -12    jakarta-commons/transaction/xdocs/locks/tutorial.xml
  
  Index: tutorial.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/transaction/xdocs/locks/tutorial.xml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- tutorial.xml	18 Nov 2004 23:27:19 -0000	1.1
  +++ tutorial.xml	19 Nov 2004 23:58:46 -0000	1.2
  @@ -12,31 +12,31 @@
   <section name="Locking tutorial">
   
   <p>The <a
  -href="http://jakarta.apache.org/commons/sandbox/transaction/apidocs/org/apache/commons/transaction/locking/package-summary.html">locking
  +href="../apidocs/org/apache/commons/transaction/locking/package-summary.html">locking
   package</a> merely consists of two interfaces for a <a
  -href="http://jakarta.apache.org/commons/sandbox/transaction/apidocs/org/apache/commons/transaction/locking/LockManager.html">lock
  +href="../apidocs/org/apache/commons/transaction/locking/LockManager.html">lock
   manager</a> and a <a
  -href="http://jakarta.apache.org/commons/sandbox/transaction/apidocs/org/apache/commons/transaction/locking/MultiLevelLock.html">multilevel
  +href="../apidocs/org/apache/commons/transaction/locking/MultiLevelLock.html">multilevel
   lock</a> and specific implementations. There is a <a
  -href="http://jakarta.apache.org/commons/sandbox/transaction/apidocs/org/apache/commons/transaction/locking/GenericLock.html">generic
  +href="../apidocs/org/apache/commons/transaction/locking/GenericLock.html">generic
   implementation</a> of a multi level lock with a subtle, yet simple
   compatibility mechanism. This mechanism allows to implement quite a
   number of different lock types such as a read write lock which is
   <a
  -href="http://jakarta.apache.org/commons/sandbox/transaction/apidocs/org/apache/commons/transaction/locking/ReadWriteLock.html">provided
  +href="../apidocs/org/apache/commons/transaction/locking/ReadWriteLock.html">provided
   for covenience</a>, although very easy to implement. As already
   <a href="index.html">exlained</a> in the locking agent can be any Java
   object. Have a look at the simple <a
  -href="http://jakarta.apache.org/commons/sandbox/transaction/apidocs/org/apache/commons/transaction/locking/ReadWriteLock.html#acquireRead(java.lang.Object,%20long)">
  +href="../apidocs/org/apache/commons/transaction/locking/ReadWriteLock.html#acquireRead(java.lang.Object,%20long)">
   method for acquiring a lock for read access</a> as a reference.</p>
   <p>If you
   need a single or pre-determined number of classes the generic or
   read/write lock is all you need. However, sometimes you may not know
   how many locks and which locks you will need in advance. In this case you can use the
   lock manager with its <a
  -href="http://jakarta.apache.org/commons/sandbox/transaction/apidocs/org/apache/commons/transaction/locking/GenericLockManager.html">default
  +href="../apidocs/org/apache/commons/transaction/locking/GenericLockManager.html">default
   implementation</a>. The most <a
  -href="http://jakarta.apache.org/commons/sandbox/transaction/apidocs/org/apache/commons/transaction/locking/LockManager.html#atomicGetOrCreateLock(java.lang.Object)">important
  +href="../apidocs/org/apache/commons/transaction/locking/LockManager.html#atomicGetOrCreateLock(java.lang.Object)">important
   method</a> is for either creating a non existing lock in a specified
   resource or retrieving it if it was created before. It is important to
   make this atomically so there is no chance of acciently creating more
  @@ -70,7 +70,7 @@
   <code>1</code> and a logger that simply writes to stdout. Different
   lock levels and their compatibility is a special feature of
   <a
  -href="http://jakarta.apache.org/commons/sandbox/transaction/apidocs/org/apache/commons/transaction/locking/GenericLock.html">GenericLock</a>
  +href="../apidocs/org/apache/commons/transaction/locking/GenericLock.html">GenericLock</a>
   and is explained there in detail. As we have one locking level, this
   also is the only level we can possibly acquire causing an exclusive lock:</p>  
   <source>
  @@ -78,7 +78,7 @@
   </source>
   <p>
   This tries to <a
  -href="http://jakarta.apache.org/commons/sandbox/transaction/apidocs/org/apache/commons/transaction/locking/GenericLock.html#acquire(java.lang.Object,%20int,%20boolean,%20boolean,%20long)">acquire
  +href="../apidocs/org/apache/commons/transaction/locking/GenericLock.html#acquire(java.lang.Object,%20int,%20boolean,%20boolean,%20long)">acquire
   a lock</a> of level one (=exclusive) for the agent 
   "Owner". Parameters three and four tells the lock that it should block
   the current thread if this lock level can not be acquired and that
  @@ -91,7 +91,7 @@
   
   <p>Now all requests to fine grained locks will be braced with the
   above statement and the <a
  -href="http://jakarta.apache.org/commons/sandbox/transaction/apidocs/org/apache/commons/transaction/locking/GenericLock.html#release(java.lang.Object)">release
  +href="../apidocs/org/apache/commons/transaction/locking/GenericLock.html#release(java.lang.Object)">release
   statement</a> after all fine grained locks are acquired:</p>    
   <source>
   exclusive.release("Owner");
  @@ -241,7 +241,7 @@
   </source>
   
   <p>As much for our short round trip. More information about this additional compatibility
can be found <a
  -href="http://jakarta.apache.org/commons/sandbox/transaction/apidocs/org/apache/commons/transaction/locking/GenericLock.html#acquire(java.lang.Object,%20int,%20boolean,%20int,%20long)">here</a>.
  +href="../apidocs/org/apache/commons/transaction/locking/GenericLock.html#acquire(java.lang.Object,%20int,%20boolean,%20int,%20long)">here</a>.
   If you still need more turn
   to the mailing list, get through the Javadocs and as the last resort through
   the sources ;) 
  
  
  
  1.1                  jakarta-commons/transaction/xdocs/style/basic.xsl
  
  Index: basic.xsl
  ===================================================================
  <?xml version="1.0" encoding="ISO-8859-1"?>
  <!-- Temporary Stylesheet for Catalina Developer Documentation -->
  <!-- $Id: basic.xsl,v 1.1 2004/11/19 23:58:46 ozeigermann Exp $ -->
  
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    version="1.0">
  
    <!-- Output method -->
    <xsl:output method="html" encoding="iso-8859-1" indent="yes"/>
  
    <!-- Defined parameters (overrideable) -->
    <xsl:param    name="relative-path"    select="'.'"/>
    <xsl:param    name="void-image"       select="'/images/void.gif'"/>
  
    <!-- Defined variables -->
    <xsl:variable name="body-bg"          select="'#ffffff'"/>
    <xsl:variable name="body-fg"          select="'#000000'"/>
    <xsl:variable name="body-link"        select="'#525D76'"/>
    <xsl:variable name="banner-bg"        select="'#525D76'"/>
    <xsl:variable name="banner-fg"        select="'#ffffff'"/>
    <xsl:variable name="sub-banner-bg"    select="'#828DA6'"/>
    <xsl:variable name="sub-banner-fg"    select="'#ffffff'"/>
    <xsl:variable name="source-color"     select="'#023264'"/>
    <xsl:variable name="attributes-color" select="'#023264'"/>
    <xsl:variable name="table-th-bg"      select="'#039acc'"/>
    <xsl:variable name="table-td-bg"      select="'#ffffff'"/>
  
    <!-- Process an entire document into an HTML page -->
    <xsl:template match="document">
      <xsl:variable name="project"
                  select="document('../project.xml')/project"/>
      <html>
      <head>
      <title><xsl:value-of select="$project/title"/> - <xsl:value-of select="properties/title"/></title>
      <xsl:for-each select="properties/author">
        <xsl:variable name="name">
          <xsl:value-of select="."/>
        </xsl:variable>
        <xsl:variable name="email">
          <xsl:value-of select="@email"/>
        </xsl:variable>
        <meta name="author" value="{$name}"/>
        <meta name="email" value="{$email}"/>
      </xsl:for-each>
      </head>
  
      <body bgcolor="{$body-bg}" text="{$body-fg}" link="{$body-link}"
            alink="{$body-link}" vlink="{$body-link}">
  
            <xsl:apply-templates select="body"/>
      </body>
      </html>
  
    </xsl:template>
  
  
    <!-- Process a menu for the navigation bar -->
    <xsl:template match="menu">
      <p><strong><xsl:value-of select="@name"/></strong></p>
      <ul>
        <xsl:apply-templates select="item"/>
      </ul>
    </xsl:template>
  
  
    <!-- Process a menu item for the navigation bar -->
    <xsl:template match="item">
      <xsl:variable name="href">
        <xsl:value-of select="@href"/>
      </xsl:variable>
      <li><a href="{$href}"><xsl:value-of select="@name"/></a></li>
    </xsl:template>
  
  
    <!-- Process a documentation section -->
    <xsl:template match="section">
      <xsl:variable name="name">
        <xsl:value-of select="@name"/>
      </xsl:variable>
      <table border="0" cellspacing="0" cellpadding="2" width="100%">
        <!-- Section heading -->
        <tr><td bgcolor="{$banner-bg}">
            <font color="{$banner-fg}" face="arial,helvetica.sanserif">
            <a name="{$name}">
            <strong><xsl:value-of select="@name"/></strong></a></font>
        </td></tr>
        <!-- Section body -->
        <tr><td><blockquote>
          <xsl:if test="not(@split-subsections)">
            <xsl:apply-templates/>
          </xsl:if>
          <xsl:if test="@split-subsections">
            <xsl:apply-templates select="p" />
            <xsl:call-template name="split-subsections" />
          </xsl:if>
        </blockquote></td></tr>
      </table>
    </xsl:template>
  
    <!-- display subsection in 2 columns -->
    <xsl:template name="split-subsections">
      <xsl:variable name="middle">
        <xsl:value-of select="ceiling((count(subsection) div 2))"/>
      </xsl:variable>
  
      <table width="100%"><tr><td valign="top" width="45%">
  
      <xsl:for-each select="subsection">
        <xsl:if test="position() &lt;= $middle">
          <xsl:apply-templates select="." />
        </xsl:if>
      </xsl:for-each>
  
      </td><td valign="top" width="10%">&#160;</td><td valign="top"
width="*">
  
      <xsl:for-each select="subsection">
        <xsl:if test="position() &gt; $middle">
          <xsl:apply-templates select="." />
        </xsl:if>
      </xsl:for-each>
  
      </td></tr></table>
  
    </xsl:template>
  
    <!-- Process a documentation subsection -->
    <xsl:template match="subsection">
      <xsl:variable name="name">
        <xsl:value-of select="@name"/>
      </xsl:variable>
      <table border="0" cellspacing="0" cellpadding="2" width="100%">
        <!-- Subsection heading -->
        <tr><td bgcolor="{$sub-banner-bg}">
            <font color="{$sub-banner-fg}" face="arial,helvetica.sanserif">
            <a name="{$name}">
            <strong><xsl:value-of select="@name"/></strong></a></font>
        </td></tr>
        <!-- Subsection body -->
        <tr><td><blockquote>
          <xsl:apply-templates/>
        </blockquote></td></tr>
      </table>
    </xsl:template>
  
    <!-- create an index of the subsections of the current section -->
    <xsl:template match="section/subsection-index">
      <table><th><td><xsl:value-of select="@title" /></td></th>
      <tr><td>
      <ul>
      <xsl:for-each select="../subsection">
        <li>
            <a><xsl:attribute name="href">#<xsl:value-of select="@name" /></xsl:attribute><xsl:value-of
select="@name" /></a>
        </li>  
      </xsl:for-each>
      </ul>
      </td></tr></table><br/>
    </xsl:template>
  
    <!-- process tables -->
    <xsl:template match="table">
      <table border="0" cellpadding="2" cellspacing="2">
        <xsl:apply-templates/>
      </table>
    </xsl:template>
  
    <!-- specially process td tags -->
    <xsl:template match="td">
      <td bgcolor="{$table-td-bg}" valign="top" align="left">
          <xsl:if test="@colspan"><xsl:attribute name="colspan"><xsl:value-of
select="@colspan"/></xsl:attribute></xsl:if>
          <xsl:if test="@rowspan"><xsl:attribute name="rowspan"><xsl:value-of
select="@rowspan"/></xsl:attribute></xsl:if>
          <xsl:if test="@width"><xsl:attribute name="width"><xsl:value-of select="@width"/></xsl:attribute></xsl:if>
          <font color="#000000" size="-1" face="arial,helvetica,sanserif">
              <xsl:apply-templates/>
          </font>
      </td>
    </xsl:template>
    
    <!-- handle th -->
    <xsl:template match="th">
      <td bgcolor="{$table-th-bg}" valign="top">
          <xsl:if test="@colspan"><xsl:attribute name="colspan"><xsl:value-of
select="@colspan"/></xsl:attribute></xsl:if>
          <xsl:if test="@rowspan"><xsl:attribute name="rowspan"><xsl:value-of
select="@rowspan"/></xsl:attribute></xsl:if>
          <font color="#ffffff" size="-1" face="arial,helvetica,sanserif">
            <b><xsl:apply-templates /></b>
          </font>
      </td>
    </xsl:template>
    
    <!-- Process a source code example -->
    <xsl:template match="source">
      <xsl:variable name="void">
        <xsl:value-of select="$relative-path"/><xsl:value-of select="$void-image"/>
      </xsl:variable>
      <div align="left">
        <table cellspacing="4" cellpadding="0" border="0">
          <tr>
            <td bgcolor="{$source-color}" width="1" height="1">
              <img src="{$void}" width="1" height="1" vspace="0" hspace="0" border="0"/>
            </td>
            <td bgcolor="{$source-color}" height="1">
              <img src="{$void}" width="1" height="1" vspace="0" hspace="0" border="0"/>
            </td>
            <td bgcolor="{$source-color}" width="1" height="1">
              <img src="{$void}" width="1" height="1" vspace="0" hspace="0" border="0"/>
            </td>
          </tr>
          <tr>
            <td bgcolor="{$source-color}" width="1">
              <img src="{$void}" width="1" height="1" vspace="0" hspace="0" border="0"/>
            </td>
            <td bgcolor="#ffffff" height="1"><pre>
              <xsl:value-of select="."/>
            </pre></td>
            <td bgcolor="{$source-color}" width="1">
              <img src="{$void}" width="1" height="1" vspace="0" hspace="0" border="0"/>
            </td>
          </tr>
          <tr>
            <td bgcolor="{$source-color}" width="1" height="1">
              <img src="{$void}" width="1" height="1" vspace="0" hspace="0" border="0"/>
            </td>
            <td bgcolor="{$source-color}" height="1">
              <img src="{$void}" width="1" height="1" vspace="0" hspace="0" border="0"/>
            </td>
            <td bgcolor="{$source-color}" width="1" height="1">
              <img src="{$void}" width="1" height="1" vspace="0" hspace="0" border="0"/>
            </td>
          </tr>
        </table>
      </div>
    </xsl:template>
  
  
    <!-- Process an attributes list with nested attribute elements -->
    <xsl:template match="attributes">
      <table border="1" cellpadding="5">
        <tr>
          <th width="15%" bgcolor="{$attributes-color}">
            <font color="#ffffff">Attribute</font>
          </th>
          <th width="85%" bgcolor="{$attributes-color}">
            <font color="#ffffff">Description</font>
          </th>
          <xsl:for-each select="attribute">
          <tr>
            <td align="left" valign="center">
              <xsl:if test="@required = 'true'">
                <strong><code><xsl:value-of select="@name"/></code></strong>
              </xsl:if>
              <xsl:if test="@required != 'true'">
                <code><xsl:value-of select="@name"/></code>
              </xsl:if>
            </td>
            <td align="left" valign="center">
              <xsl:apply-templates/>
            </td>
          </tr>
          </xsl:for-each>
        </tr>
      </table>
    </xsl:template>
  
  
    <!-- Process everything else by just passing it through -->
    <xsl:template match="*|@*">
      <xsl:copy>
        <xsl:apply-templates select="@*|*|text()"/>
      </xsl:copy>
    </xsl:template>
  
    <!-- Changelog related tags -->
    <xsl:template match="changelog">
      <table border="0" cellpadding="2" cellspacing="2">
        <xsl:apply-templates/>
      </table>
    </xsl:template>
  
    <xsl:template name="displayDate">
      <xsl:if test="@date"><xsl:value-of select="@date"/>: </xsl:if>
    </xsl:template>
  
    <xsl:template name="displayAuthor">
      <xsl:if test="@author">(<xsl:value-of select="@author"/>)</xsl:if>
    </xsl:template>
  
    <xsl:template match="changelog/add">
      <tr>
        <td style="vertical-align: top;"><img alt="add" class="icon" src="images/add.gif"/></td>
        <td><xsl:call-template name="displayDate"/><xsl:apply-templates/><xsl:call-template
name="displayAuthor"/></td>
      </tr>
    </xsl:template>
  
    <xsl:template match="changelog/update">
      <tr>
        <td style="vertical-align: top;"><img alt="update" class="icon" src="images/update.gif"/></td>
        <td><xsl:call-template name="displayDate"/><xsl:apply-templates/><xsl:call-template
name="displayAuthor"/></td>
      </tr>
    </xsl:template>
  
    <xsl:template match="changelog/design">
      <tr>
        <td style="vertical-align: top;"><img alt="design" class="icon" src="images/design.gif"/></td>
        <td><xsl:call-template name="displayDate"/><xsl:apply-templates/><xsl:call-template
name="displayAuthor"/></td>
      </tr>
    </xsl:template>
  
    <xsl:template match="changelog/docs">
      <tr>
        <td style="vertical-align: top;"><img alt="docs" class="icon" src="images/docs.gif"/></td>
        <td><xsl:call-template name="displayDate"/><xsl:apply-templates/><xsl:call-template
name="displayAuthor"/></td>
      </tr>
    </xsl:template>
  
    <xsl:template match="changelog/fix">
      <tr>
        <td style="vertical-align: top;"><img alt="fix" class="icon" src="images/fix.gif"/></td>
        <td>
      <xsl:if test="@bugzilla-id"> [
      <xsl:element name="a">
      <xsl:attribute name="href">http://nagoya.apache.org/bugzilla/show_bug.cgi?id=<xsl:value-of
select="@bugzilla-id"/></xsl:attribute>
      bug #<xsl:value-of select="@bugzilla-id"/>
      </xsl:element>
      ]</xsl:if>
     <xsl:call-template name="displayDate"/><xsl:apply-templates/><xsl:call-template
name="displayAuthor"/>
      </td>
      </tr>
    </xsl:template>
  
    <xsl:template match="changelog/scode">
      <tr>
        <td style="vertical-align: top;"><img alt="code" class="icon" src="images/code.gif"/></td>
        <td><xsl:call-template name="displayDate"/><xsl:apply-templates/><xsl:call-template
name="displayAuthor"/></td>
      </tr>
    </xsl:template>
  
    <!-- Process an attributes list with nested attribute elements -->
    <xsl:template match="status">
      <table border="1" cellpadding="5">
        <tr>
          <th width="15%" bgcolor="{$attributes-color}">
            <font color="#ffffff">Priority</font>
          </th>
          <th width="50%" bgcolor="{$attributes-color}">
            <font color="#ffffff">Action Item</font>
          </th>
          <th width="25%" bgcolor="{$attributes-color}">
            <font color="#ffffff">Volunteers</font>
          </th>
          <xsl:for-each select="item">
          <tr>
            <td align="left" valign="center">
              <xsl:value-of select="@priority"/>
            </td>
            <td align="left" valign="center">
              <xsl:apply-templates/>
            </td>
            <td align="left" valign="center">
              <xsl:value-of select="@owner"/>
            </td>
          </tr>
          </xsl:for-each>
        </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="0" cellpadding="2" cellspacing="2">
              <tr>
                <td bgcolor="{$table-th-bg}" width="15%" valign="top">
                  <font color="#ffffff" size="-1" face="arial,helvetica,sanserif"><b>Tag
Name</b></font>
                </td>
                <td bgcolor="{$table-th-bg}" valign="top">
                  <font color="#ffffff" size="-1" face="arial,helvetica,sanserif"><b>Description</b></font>
                </td>
              </tr>
              <xsl:for-each select="tag">
                <tr>
                  <td bgcolor="{$table-td-bg}" align="left" valign="top">
                    <font color="#000000" size="-1" face="arial,helvetica,sanserif">
                      <xsl:variable name="name">
                        <xsl:value-of select="name"/>
                      </xsl:variable>
                      <a href="#{$name}"><xsl:value-of select="name"/></a>
                    </font>
                  </td>
                  <td bgcolor="{$table-td-bg}" valign="top" align="left">
                    <font color="#000000" size="-1" face="arial,helvetica,sanserif">
                      <xsl:value-of select="summary"/>
                    </font>
                  </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="0" cellspacing="2" cellpadding="2">
              <tr>
                <td bgcolor="{$table-th-bg}" width="15%" valign="top">
                  <font color="#ffffff" size="-1" face="arial,helvetica,sanserif"><b>Attribute
Name</b></font>
                </td>
                <td bgcolor="{$table-th-bg}" valign="top">
                  <font color="#ffffff" size="-1" face="arial,helvetica,sanserif"><b>Description</b></font>
                </td>
              </tr>
              <xsl:for-each select="attribute">
                <tr>
                  <td bgcolor="{$table-td-bg}" align="left" valign="top">
                    <font color="#000000" size="-1" face="arial,helvetica,sanserif">
                      <xsl:value-of select="name"/>
                    </font>
                  </td>
                  <td bgcolor="{$table-td-bg}" align="left" valign="top">
                    <font color="#000000" size="-1" face="arial,helvetica,sanserif">
                      <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>
                    </font>
                  </td>
                </tr>
              </xsl:for-each>
            </table>
          </blockquote>
        </td></tr>
      </table>
    </xsl:template>
  
  </xsl:stylesheet>
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message