You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by cr...@apache.org on 2002/06/16 09:10:28 UTC

cvs commit: xml-cocoon2/src/webapp/samples/misc/catalog article.xml catalog-demo.xml sdocbook-demo.html sdocbook2body.xsl style.xsl testovr.xml

crossley    2002/06/16 00:10:27

  Modified:    src/webapp/samples samples.xml
  Added:       src/webapp/samples/misc samples.xml sitemap.xmap
               src/webapp/samples/misc/catalog article.xml catalog-demo.xml
                        sdocbook-demo.html sdocbook2body.xsl style.xsl
                        testovr.xml
  Log:
  Refactored another sample. Set up a "miscellaneous" page to hold some
  samples that do not fit neatly into other categories of sample.
  Started with the Entity Resolution Using Catalogs sample.
  Added new sample for Simplified DocBook DTDs configuration.
  
  Revision  Changes    Path
  1.11      +11 -4     xml-cocoon2/src/webapp/samples/samples.xml
  
  Index: samples.xml
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/webapp/samples/samples.xml,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- samples.xml	13 Jun 2002 10:31:23 -0000	1.10
  +++ samples.xml	16 Jun 2002 07:10:27 -0000	1.11
  @@ -13,7 +13,7 @@
       is transformed into an HTML page.
      </sample>
      <sample name="XHTML" href="hello-world/hello.xhtml">
  -    Here it's outputted as XHTML.
  +    Here it is output as XHTML.
      </sample>
      <sample name="TEXT" href="hello-world/hello.txt">
       The XML page is transformed into a plain text page.  
  @@ -90,7 +90,7 @@
     
     <group name="Internationalization &amp; Localization">
      <sample name="i18n samples" href="i18n/">
  -    Interenationalization with Cocoon
  +    Internationalization with Cocoon
      </sample>
     </group>
   
  @@ -110,6 +110,9 @@
      <sample name="Search the docs" href="../search/welcome">
       Search into the cocoon documentation using Apache Lucene.
      </sample>
  +   <sample name="Check links" href="linkstatus/">
  +    Verify that there are no broken hyperlinks in the Cocoon documentation.
  +   </sample>
     </group>
     
     <group name="JSP with Cocoon">
  @@ -149,9 +152,13 @@
       and simple web-application with login and protected resources.
      </sample>
      
  -   <sample name="Legacy file formats" href="../poi/">
  +   <sample name="Legacy file formats" href="poi/">
       Samples showing how to use Apache POI to use common office file formats
       with Cocoon.
  +   </sample>
  +
  +   <sample name="Miscellaneous" href="misc/">
  +    Other samples: Catalog entity resolver, ...
      </sample>
      
     </group>
  
  
  
  1.1                  xml-cocoon2/src/webapp/samples/misc/samples.xml
  
  Index: samples.xml
  ===================================================================
  <?xml version="1.0" encoding="iso-8859-1"?>
  <samples xmlns:xlink="http://www.w3.org/1999/xlink">
  
   <group name="Main examples page">
    <sample name="Back" href="../..">to Cocoon examples main page</sample>
   </group>
  
   <group name="XML Entity Catalogs">
    <sample name="Entity Resolution Using Catalogs" href="catalog-demo">
     Catalog entity resolver. External entities (e.g. DTDs, symbols,
     character entity sets, images) are resolved to local copies of the
     resources. The catalog manager facilitates the mapping between public
     identifiers or system identifiers and other system identifiers.
    </sample>
    <sample name="Simplified DocBook" href="sdocbook-demo.html">
     You will need the DocBook DTDs installed locally and the catalog
     properly configured.
    </sample>
   </group>
  
   <group name="Other samples">
    <sample name="S1" href="">FIXME: need a default third group, or this page
     will not render.
    </sample>
   </group>
  
  </samples>
  
  
  
  1.1                  xml-cocoon2/src/webapp/samples/misc/sitemap.xmap
  
  Index: sitemap.xmap
  ===================================================================
  <?xml version="1.0"?>
  <map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
  
   <map:components>
    <map:generators default="file"/>
    <map:transformers default="xslt"/>
    <map:readers default="resource"/>
    <map:serializers default="html"/>
    <map:matchers default="wildcard"/>
    <map:selectors default="browser"/>
   </map:components>
  
   <map:pipelines>
    <map:pipeline>
   
     <map:match pattern="">
      <map:redirect-to uri="welcome"/>
     </map:match>
  
     <map:match pattern="welcome">
      <map:generate src="samples.xml"/>
      <map:transform src="context://stylesheets/simple-samples2html.xsl"/>
      <map:serialize/>
     </map:match>
  
     <!-- Catalog entity resolver =========================== -->
  
     <map:match pattern="catalog-demo">
      <map:generate src="catalog/catalog-demo.xml"/>
      <map:transform src="catalog/style.xsl"/>
      <map:serialize type="html"/>
     </map:match>
  
     <map:match pattern="sdocbook-demo.html">
      <map:read src="catalog/sdocbook-demo.html"/>
      <map:serialize type="html"/>
     </map:match>
  
     <map:match pattern="sdocbook-demo">
      <map:generate src="catalog/article.xml"/>
      <map:transform src="catalog/sdocbook2body.xsl"/>
      <map:serialize type="html"/>
     </map:match>
  
     <!-- ========================= Resources ================================ -->
  
     <map:match pattern="sites/styles/**.css">
      <map:read src="context://resources/styles/{1}.css" mime-type="text/css"/>
     </map:match>
  
     <map:match pattern="images/**.gif">
      <map:read src="context://resources/images/{1}.gif" mime-type="image/gif"/>
     </map:match>
  
     <map:match pattern="images/**.jpg">
      <map:read src="context://resources/images/{1}.jpg" mime-type="image/jpg"/>
     </map:match>
  
     <map:match pattern="images/**.png">
      <map:read src="context://resources/images/{1}.png" mime-type="image/png"/>
     </map:match>
      
     <!-- delegate to parent sitemap 
     <map:handle-errors/> -->
  
    </map:pipeline>
  
   </map:pipelines>
  
  </map:sitemap>
  
  
  
  <!-- end of file -->
  
  
  
  
  1.1                  xml-cocoon2/src/webapp/samples/misc/catalog/article.xml
  
  Index: article.xml
  ===================================================================
  <?xml version="1.0"?>
  
  <!DOCTYPE article PUBLIC "-//OASIS//DTD Simplified DocBook XML V4.1.2.5//EN"
                           "sdocbook.dtd">
  
  <!-- See the Apache Cocoon documentation userdocs/concepts/catalog.html
    for explanation about configuring the Catalog Entity Resolver
    to use your local copy of the Simplified DocBook DTD.
  -->
  
  <article>
   <title>Catalog demonstration - Simplified DocBook DTD</title>
   <subtitle>
    Here is a subtitle
   </subtitle>
   <para>
    This is an introduction paragraph.
   </para>
  
   <section>
    <title>This is the first top-level section</title>
    <para>
     Another paragraph.
    </para>
    <section>
     <title>This is a second-level section</title>
     <para>
      with its own paragraph.
     </para>
    </section>
   </section>
  
   <section>
    <title>This is the second top-level section</title>
     <para>
      The logo below is included using a <emphasis>mediaobject</emphasis>
      element containing an <emphasis>imageobject</emphasis> element.
     </para>
     <mediaobject>
      <imageobject>
       <imagedata srccredit="Powered by Apache Cocoon"
                  fileref="images/cocoon.gif"
                  width="300" depth="45" format="GIF"/>
      </imageobject>
     </mediaobject>
   </section>
  
  </article>
  
  
  
  1.1                  xml-cocoon2/src/webapp/samples/misc/catalog/catalog-demo.xml
  
  Index: catalog-demo.xml
  ===================================================================
  <?xml version="1.0"?>
  <!DOCTYPE catalog-demo PUBLIC "-//Indexgeo//DTD Catalog Demo v1.0//EN"
    "http://www.indexgeo.com.au/dtd/catalog-demo-v10.dtd"
  [
   <!ENTITY testpub PUBLIC "-//Arbortext//TEXT Test Public Identifier//EN"
     "bogus-system-identifier.xml">
   <!ENTITY testsys SYSTEM "urn:x-arbortext:test-system-identifier">
   <!ENTITY testovr PUBLIC "-//Arbortext//TEXT Test Override//EN"
     "testovr.xml">
   <!ENTITY % ISOnum PUBLIC
     "ISO 8879:1986//ENTITIES Numeric and Special Graphic//EN//XML"
     "ISOnum.pen">
   %ISOnum;
   <!ENTITY note "Note:">
  ]>
  
  <catalog-demo>
   <section>
    <para>This sample application demonstrates the use of catalogs for
     entity resolution. &note; see the Apache Cocoon documentation
     <link href="../../documents/userdocs/concepts/catalog.html">Entity resolution with
     catalogs</link> for the full background and explanation, and the XML
     source of this document (catalog-demo.xml).
    </para>
  
    <para>This top-level XML instance document is catalog-demo.xml - it declares
     three other XML sub-documents as external entities and then includes
     them in the sections below. The real system identifiers will be looked
     up in the catalog, to resolve the actual location of the resource.
    </para>
  
    <para>The Document Type Definition (DTD) is declared using both a public
     identifier and a system identifier. The system identifier for the DTD is
     a network-based resource (which is deliberately non-existent). However,
     the catalog overrides that remote DTD to instead use a copy from the
     local filesystem at the location defined by the catalog entry. Note that
     it is via the use of a public identifier that we gain this power.
    </para>
  
    <para>The internal DTD subset of the top-level document instance goes on
     to declare the three external sub-document entities using various means.
     It also declares and includes the ISOnum set of character entities,
     so that we can use entities like &amp;frac12; (to represent &frac12;).
     Finally the internal DTD subset declares an internal general entity
     for &quot;note&quot;.
    </para>
   </section>
  
   <section>
    <para>testpub ... this entity is declared with a PUBLIC identifier and a
     bogus system identifier (which will be overridden by the catalog)
    </para>
    &testpub;
   </section>
  
   <section>
    <para>testsys ... this entity is declared with a SYSTEM identifier
     (which will be resolved by the catalog)
    </para>
    &testsys;
   </section>
  
   <section>
    <para>testovr ... is declared with a PUBLIC identifier and a system
     identifier (the catalog is set to not override this one, so the
     declared system identifier is used)
    </para>
    &testovr;
   </section>
  
  </catalog-demo>
  
  
  
  1.1                  xml-cocoon2/src/webapp/samples/misc/catalog/sdocbook-demo.html
  
  Index: sdocbook-demo.html
  ===================================================================
  <html>
  <head>
   <title>Demonstration of Catalog Entity Resolver and Simplified DocBook</title>
  </head>
  <body bgcolor="#FFFFFF">
  <h1>Demonstration of Catalog Entity Resolver and Simplified DocBook</h1>
  <p>
  The Apache Cocoon documentation
  <a href="../../documents/userdocs/concepts/catalog.html#config">Entity
  resolution with catalogs</a> has a section &quot;Example local configuration
  for Simplified DocBook&quot;. Do that and then ...
  </p>
  
  <p>
  See the <a href="sdocbook-demo">sdocbook-demo</a>
  </p>
  
  <p>
  If you get a FileNotFoundException, then you have not configured the OASIS
  catalog properly.
  </p>
  </body>
  </html>
  
  
  
  1.1                  xml-cocoon2/src/webapp/samples/misc/catalog/sdocbook2body.xsl
  
  Index: sdocbook2body.xsl
  ===================================================================
  <?xml version="1.0"?>
  
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                  version="1.0">
  
  <!-- DC: hacked from Avalon docbook2body.xsl -->
  
    <xsl:template match="article">
      <html>
       <head>
        <title><xsl:value-of select="article/title"/></title>
       </head>
      <body>
        <center>
          <table width="80%">
            <tr>
              <td bgcolor="#F3DD61">
                <br/><center><b><font color="#000000" face="arial,helvetica,sanserif"><xsl:value-of select="title"/></font></b></center>
                <br/>
              </td>
            </tr>
          </table>
        </center><br/>
        <xsl:if test="subtitle">
          <font face="arial,helvetica,sanserif" color="#525D76"><i><xsl:value-of select="subtitle"/></i></font><br/>
        </xsl:if>
  
        <font color="#000000" face="arial,helvetica,sanserif">
          <xsl:apply-templates select="para"/>
        </font><br/>
  
        <xsl:apply-templates select="section">
          <xsl:with-param name="level" select="1"/>
        </xsl:apply-templates>
  
        <xsl:apply-templates select="//footnote" mode="base"/>
      </body>
     </html>
    </xsl:template>
  
    <xsl:template match="title|subtitle"/>
  
    <xsl:template match="author">
      <body>
        <title>
          <xsl:value-of select="honorific"/><xsl:text>. </xsl:text>
          <xsl:value-of select="firstname"/><xsl:text> </xsl:text>
          <xsl:value-of select="surname"/>
        </title>
        <center>
          <table width="80%">
            <tr>
              <td bgcolor="#F3DD61">
                <br/><center><b><font color="#000000" face="arial,helvetica,sanserif"><xsl:text>Author: </xsl:text><xsl:value-of select="honorific"/><xsl:text>. </xsl:text><xsl:value-of select="firstname"/><xsl:text> </xsl:text><xsl:value-of select="surname"/></font></b></center>
                <br/>
              </td>
            </tr>
          </table>
        </center><br/>
        <div align="right">
          <table border="0" cellpadding="2" cellspacing="0" width="100%">
            <tr>
              <td bgcolor="#525D76">
                <font color="#ffffff" face="arial,helvetica,sanserif" size="+1"><b>Affiliations</b></font>
              </td>
            </tr>
            <tr>
              <td>
                <font color="#000000" face="arial,helvetica,sanserif"><br/>
                  <ul>
                    <xsl:apply-templates select="affiliation"/>
                  </ul>
                </font>
              </td>
            </tr>
          </table>
        </div><br/>
        <xsl:apply-templates select="authorblurb"/>
      </body>
    </xsl:template>
  
    <xsl:template match="affiliation">
      <li>
        <xsl:text>[</xsl:text><xsl:value-of select="shortaffil"/><xsl:text>] </xsl:text>
        <b><xsl:value-of select="jobtitle"/></b>
        <i><xsl:value-of select="orgname"/><xsl:if test="orgdiv"><xsl:text>/</xsl:text><xsl:value-of select="orgdiv"/></xsl:if></i>
      </li>
    </xsl:template>
  
    <xsl:template match="authorblurb">
      <div align="right">
        <table border="0" cellpadding="2" cellspacing="0" width="100%">
          <tr>
            <td bgcolor="#525D76">
              <font color="#ffffff" face="arial,helvetica,sanserif" size="+1"><b>Bio</b></font>
            </td>
          </tr>
          <tr>
            <td>
              <font color="#000000" face="arial,helvetica,sanserif"><br/>
                <ul>
                  <xsl:apply-templates/>
                </ul>
              </font>
            </td>
          </tr>
        </table>
      </div>
    </xsl:template>
  
    <xsl:template match="honorific|firstname|surname|orgdiv|orgname|shortaffil|jobtitle"/>
  
    <xsl:template match="revhistory">
      <body>
        <title>Revision History</title>
        <center>
          <table width="80%">
            <tr>
              <td bgcolor="#F3DD61">
                <br/><center><b><font color="#000000" face="arial,helvetica,sanserif">Revision History</font></b></center>
                <br/>
              </td>
            </tr>
          </table>
        </center><br/>
        <div align="right">
          <table border="0" cellpadding="2" cellspacing="0" width="100%">
            <xsl:variable name="unique-revisions" 
              select="revision[not(revnumber=preceding-sibling::revision/revnumber)]/revnumber"/>
            <xsl:variable name="base" select="."/>
            <xsl:for-each select="$unique-revisions">
            <tr>
              <td bgcolor="#525D76">
                <font color="#ffffff" face="arial,helvetica,sanserif">
                  <b>Revision <xsl:value-of select="."/> 
                     (<xsl:value-of select="$base/revision[revnumber=current()]/date"/>)
                  </b>
                </font>
              </td>
            </tr>
            <tr>
              <td>
                <font color="#000000" face="arial,helvetica,sanserif"><br/>
                  <ul>
                    <xsl:apply-templates select="$base/revision[revnumber=current()]"/>
                  </ul>
                </font>
              </td>
            </tr>
            </xsl:for-each>
          </table>
        </div>
      </body>
    </xsl:template>
  
    <xsl:template match="para">
      <p align="justify"><xsl:apply-templates/></p>
    </xsl:template>
  
    <xsl:template match="emphasis"><em><xsl:apply-templates/></em></xsl:template>
  
    <xsl:template match="revision">
      <li>
        <xsl:choose>
          <xsl:when test="@revisionflag='added'">
            <img align="absmiddle" alt="added" border="0" src="images/add.jpg"/>
          </xsl:when>
          <xsl:when test="@revisionflag='changed'">
            <img align="absmiddle" alt="changed" border="0" src="images/update.jpg"/>
          </xsl:when>
          <xsl:when test="@revisionflag='deleted'">
            <img align="absmiddle" alt="deleted" border="0" src="images/remove.jpg"/>
          </xsl:when>
          <xsl:when test="@revisionflag='off'">
            <img align="absmiddle" alt="off" border="0" src="images/fix.jpg"/>
          </xsl:when>
          <xsl:otherwise>
            <img align="absmiddle" alt="changed" border="0" src="images/update.jpg"/>
          </xsl:otherwise>
        </xsl:choose>
        <xsl:value-of select="revremark"/>
        <xsl:text> (</xsl:text><xsl:value-of select="authorinitials"/><xsl:text>)</xsl:text>
      </li>
    </xsl:template>
  
    <xsl:template match="revnumber|revremark|authorinitials|date"/>
  
    <xsl:template match="section">
      <xsl:param name="level"/>
  
      <div align="right">
        <table border="0" cellpadding="2" cellspacing="0">
          <xsl:attribute name="width"><xsl:value-of select="number(100)-(1*(number($level)-1))"/>%</xsl:attribute>
          <tr>
            <td bgcolor="#0086b2">
              <font color="#ffffff" face="arial,helvetica,sanserif">
                <xsl:attribute name="size">
                  <xsl:choose>
                    <xsl:when test="number($level)=1">+1</xsl:when>
                    <xsl:when test="number($level)=2">+0</xsl:when>
                    <xsl:otherwise>-<xsl:value-of select="number($level)-2"/></xsl:otherwise>
                  </xsl:choose>
                </xsl:attribute>
                <b><xsl:value-of select="title"/></b>
              </font>
            </td>
          </tr>
          <tr>
            <td>
              <font color="#000000" face="arial,helvetica,sanserif">
                <br/>
                <xsl:apply-templates>
                  <xsl:with-param name="level" select="number($level)+1"/>
                </xsl:apply-templates>
              </font>
            </td>
          </tr>
        </table>
      </div><br/>
    </xsl:template>
  
    <xsl:template match="bookinfo">
      <div align="right">
        <table border="0" cellpadding="2" cellspacing="0" width="100%">
          <tr>
            <td bgcolor="#525D76">
              <font color="#ffffff" face="arial,helvetica,sanserif" size="+1">
                <b><xsl:value-of select="edition"/></b><xsl:text> </xsl:text>
                <i><font size="0">pub. <xsl:value-of select="pubdate"/></font></i>
              </font>
            </td>
          </tr>
          <tr>
            <td>
              <font color="#000000" face="arial,helvetica,sanserif">
                <br/>
                <xsl:apply-templates/>
              </font>
            </td>
          </tr>
        </table>
      </div><br/>
    </xsl:template>
  
    <xsl:template match="dedication">
      <div align="right">
        <table border="0" cellpadding="2" cellspacing="0" width="100%">
          <tr>
            <td bgcolor="#525D76">
              <font color="#ffffff" face="arial,helvetica,sanserif" size="+1">
                <b>Dedication</b>
              </font>
            </td>
          </tr>
          <tr>
            <td>
              <font color="#000000" face="arial,helvetica,sanserif">
                <br/>
                <xsl:apply-templates/>
              </font>
            </td>
          </tr>
        </table>
      </div><br/>
    </xsl:template>
  
    <xsl:template match="edition|pubdate|year|holder"/>
  
    <xsl:template match="copyright">
      <p>Copyright &#x00A9;<xsl:value-of select="year"/> by <xsl:value-of select="holder"/>.<br/>
        <i>All rights reserved.</i>
      </p>
    </xsl:template>
  
    <xsl:template match="legalnotice">
      <div align="center">
        <table border="1" cellpadding="2" cellspacing="2">
          <tr>
            <td><xsl:apply-templates/></td>
          </tr>
        </table>
      </div>
    </xsl:template>
  
    <xsl:template match="programlisting">
      <div align="center">
        <table border="1" cellpadding="2" cellspacing="2">
          <tr>
            <td>
              <pre>
                <xsl:apply-templates/>
              </pre>
            </td>
          </tr>
        </table>
      </div>
    </xsl:template>
  
    <xsl:template match="orderedlist"><ol><xsl:apply-templates/></ol></xsl:template>
  
    <xsl:template match="listitem"><li><xsl:apply-templates/></li></xsl:template>
  
    <xsl:template match="itemizedlist"><ul><xsl:apply-templates/></ul></xsl:template>
  
    <xsl:template match="classname|function|parameter"><code><xsl:apply-templates/><xsl:if test="name(.)='function'"><xsl:text>()</xsl:text></xsl:if></code></xsl:template>
  
    <xsl:template match="blockquote">
      <div align="center">
        <table border="1" cellpadding="2" cellspacing="2">
          <xsl:if test="title">
            <tr>
              <td bgcolor="#525D76">
                <font color="#ffffff"><xsl:value-of select="title"/></font>
              </td>
            </tr>
          </xsl:if>
          <tr>
            <td bgcolor="#c0c0c0">
              <font color="#023264" size="-1"><xsl:apply-templates/></font>
            </td>
          </tr>
        </table>
      </div>
    </xsl:template>
  
    <xsl:template match="warning">
      <div align="center">
        <table border="1" cellpadding="2" cellspacing="2">
          <xsl:if test="title">
            <tr>
              <td bgcolor="#800000">
                <font color="#ffffff"><xsl:value-of select="title"/></font>
              </td>
            </tr>
          </xsl:if>
          <tr>
            <td bgcolor="#c0c0c0">
              <font color="#023264" size="-1"><xsl:apply-templates/></font>
            </td>
          </tr>
        </table>
      </div>
    </xsl:template>
  
    <xsl:template match="ulink"><a href="{@uri}"><xsl:apply-templates/></a></xsl:template>
  
    <xsl:template match="footnote"><sup><a href="#{generate-id(.)}"><xsl:value-of select="generate-id(.)"/></a></sup></xsl:template>
  
    <xsl:template match="footnote" mode="base">
      <div align="left">
        <a name="{generate-id(.)}"/><font size="-2"><xsl:value-of select="generate-id(.)"/><xsl:text>) </xsl:text><i><xsl:value-of select="."/></i></font>
      </div>
    </xsl:template>
  
    <xsl:template match="mediaobject">
      <div align="center">
        <table border="0" cellpadding="2" cellspacing="2">
          <tr>
            <td bgcolor="#525D76"><font color="#ffffff" size="0"><xsl:value-of select="title"/></font></td>
          </tr>
          <xsl:apply-templates/>
        </table>
      </div>
    </xsl:template>
  
    <xsl:template match="imageobject">
     <xsl:apply-templates/>
    </xsl:template>
  
    <xsl:template match="imagedata">
      <tr>
        <td><img border="0" alt="{@srccredit}"
                 width="{@width}" height="{@depth}"
                 src="{@fileref}"/></td>
      </tr>
      <xsl:if test="@srccredit">
        <tr>
          <td><font size="-1"><ul><li><xsl:value-of select="@srccredit"/></li></ul></font></td>
        </tr>
      </xsl:if>
    </xsl:template>
  
    <xsl:template match="table">
      <table border="0" cellpadding="2" cellspacing="2" width="100%">
        <xsl:apply-templates/>
      </table>
    </xsl:template>
  
    <xsl:template match="tgroup">
      <xsl:apply-templates/>
    </xsl:template>
  
    <xsl:template match="thead">
      <xsl:apply-templates select="row" mode="head"/>
      <xsl:for-each select="row">
        <th><xsl:apply-templates/></th>
      </xsl:for-each>
    </xsl:template>
  
    <xsl:template match="row" mode="head">
      <th><xsl:apply-templates/></th>
    </xsl:template>
  
    <xsl:template match="row">
      <tr><xsl:apply-templates/></tr>
    </xsl:template>
  
    <xsl:template match="tbody|tfoot">
      <xsl:apply-templates/>
    </xsl:template>
  
    <xsl:template match="entry">
      <td align="left" bgcolor="#a0ddf0" valign="top">
        <font color="#000000" face="arial,helvetica,sanserif" size="-1"><xsl:apply-templates/></font>
      </td>
    </xsl:template>
  
    <xsl:template match="trademark"><xsl:apply-templates/><sup>TM</sup></xsl:template>
  
    <xsl:template match="node()|@*" priority="-1">
      <xsl:copy>
        <xsl:apply-templates select="node()|@*"/>
      </xsl:copy>
    </xsl:template>
  </xsl:stylesheet>
  
  
  
  
  1.1                  xml-cocoon2/src/webapp/samples/misc/catalog/style.xsl
  
  Index: style.xsl
  ===================================================================
  <?xml version='1.0'?>
  <!DOCTYPE xsl:stylesheet [
   <!ENTITY % ISOnum PUBLIC
     "ISO 8879:1986//ENTITIES Numeric and Special Graphic//EN//XML"
     "ISOnum.pen">
   %ISOnum;
  ]>
  
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                  version='1.0'>
  
  <xsl:output method="html"/>
  
  <xsl:template match="catalog-demo">
  <html>
   <head>
    <title>Demonstration of entity resolution using catalogs</title>
   </head>
   <body>
    <xsl:apply-templates/>
    <p>
     This footer is applied by the stylesheet. The following entity is resolved
     by the parser when it interprets the stylesheet
     <br/>Use &amp;frac14; to represent &frac14; (one-quarter symbol)
     <br/>The ISOnum entity set was declared in the header of the stylesheet.
    </p>
   </body>
  </html>
  </xsl:template>
  
  <xsl:template match="section">
   <xsl:apply-templates/>
  <hr/>
  </xsl:template>
  
  <xsl:template match="para">
  <p>
   <xsl:apply-templates/>
  </p>
  </xsl:template>
  
  <xsl:template match="link">
  <a href="{@href}"><xsl:apply-templates/></a>
  </xsl:template>
  
  </xsl:stylesheet>
  
  
  
  1.1                  xml-cocoon2/src/webapp/samples/misc/catalog/testovr.xml
  
  Index: testovr.xml
  ===================================================================
  <para>&note; This paragraph is automatically included from the
   testovr.xml external file.
   The location of this entity was not resolved by the catalog, because
   there is no matching catalog entry for its public identifier or its
   system identifier. So the declared system identifier is used,
   i.e. the file is retrieved relative to the top-level document.
  </para>
  
  
  

----------------------------------------------------------------------
In case of troubles, e-mail:     webmaster@xml.apache.org
To unsubscribe, e-mail:          cocoon-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-cvs-help@xml.apache.org