xml-commons-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cross...@apache.org
Subject cvs commit: xml-commons/src/documentation sitemap.xmap
Date Wed, 22 Jan 2003 07:17:49 GMT
crossley    2003/01/21 23:17:49

  Modified:    src/documentation sitemap.xmap
  Log:
  Align with current Forrest default sitemap.xmap
  Use the Forrest site layout in xdocs/site.xml
  
  Revision  Changes    Path
  1.2       +185 -51   xml-commons/src/documentation/sitemap.xmap
  
  Index: sitemap.xmap
  ===================================================================
  RCS file: /home/cvs/xml-commons/src/documentation/sitemap.xmap,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- sitemap.xmap	20 Dec 2002 05:46:47 -0000	1.1
  +++ sitemap.xmap	22 Jan 2003 07:17:49 -0000	1.2
  @@ -17,12 +17,26 @@
     </map:generators>
   
     <map:transformers default="xslt">
  -  <!--
  -   <map:transformer     name="xslt"      src="org.apache.cocoon.transformation.TraxTransformer">
  -    <use-request-parameters>false</use-request-parameters>
  -    <use-browser-capabilities-db>false</use-browser-capabilities-db>
  -   </map:transformer>
  -  -->
  +    <map:transformer name="idgen" src="org.apache.cocoon.transformation.IdGeneratorTransformer">
  +      <element>//*[local-name() = 'section']</element>
  +      <id>title/text()</id>
  +    </map:transformer>
  +  
  +    <map:transformer name="linkrewriter"
  +      src="org.apache.cocoon.transformation.LinkRewriterTransformer">
  +      <input-module name="linkmap" src="{src}" reloadable="true"/>
  +      <input-module name="site">
  +        <input-module name="linkmap" src="{src}" reloadable="true"/>
  +        <prefix>/site//</prefix>
  +        <suffix>/@href</suffix>
  +      </input-module>
  +    </map:transformer>
  +    
  +    <map:transformer name="xpath"
  +       logger="sitemap.transformer.xpath"
  +       src="org.apache.cocoon.transformation.XPathTransformer"
  +     />
  + 
       <map:transformer name="xslt" src="org.apache.cocoon.transformation.TraxTransformer"
                           logger="sitemap.transformer.xsltc"
                           pool-max="32" pool-min="8" pool-grow="2">
  @@ -58,13 +72,14 @@
                   src="org.apache.cocoon.serialization.FOPSerializer"
                   mime-type="application/pdf"/>
   
  -
      <map:serializer name="links"                               src="org.apache.cocoon.serialization.LinkSerializer">
        <encoding>ISO-8859-1</encoding>
      </map:serializer>
  +   
      <map:serializer name="svg2jpeg" mime-type="image/jpeg"     src="org.apache.cocoon.serialization.SVGSerializer">
          <parameter name="quality" type="float" value="1.0"/>
      </map:serializer>
  +   
      <map:serializer name="svg2png" mime-type="image/png"       src="org.apache.cocoon.serialization.SVGSerializer"/>
     </map:serializers>
   
  @@ -103,6 +118,7 @@
   
     <!--
        The different pipeline implementations
  +     @todo use map:pipe and map:pipes with next cocoon CVS update
     -->
     <map:pipelines default="caching">
        <map:pipeline name="caching" src="org.apache.cocoon.components.pipeline.impl.CachingProcessingPipeline"/>
  @@ -142,7 +158,23 @@
     </map:resource>
   
     <map:resource name="book">
  -    <map:generate src="content/xdocs/{../1}book.xml"/>
  +    <map:act type="resource-exists">
  +      <!-- If a hand-created book.xml exists, use it -->
  +      <map:parameter name="url" value="content/xdocs/{dir}book.xml"/>
  +      <map:generate src="content/xdocs/{../dir}book.xml"/>
  +      <map:transform type="linkrewriter" src="cocoon:/linkmap"/>
  +      <map:call resource="skinit">
  +        <map:parameter name="type" value="book2menu"/>
  +        <map:parameter name="path" value="{../path}"/>
  +      </map:call>
  +    </map:act>
  +
  +    <!-- If no book.xml, generate it from the linkmap. -->
  +
  +    <map:generate src="cocoon:/{dir}linkmap/{dir}"/>
  +    <!-- The above generates the subset of the linkmap relevant to our
  +    directory. -->
  +    <map:transform src="library/xslt/site2book.xsl"/>
       <map:call resource="skinit">
         <map:parameter name="type" value="book2menu"/>
         <map:parameter name="path" value="{path}"/>
  @@ -175,10 +207,11 @@
     
     <!-- Pipeline that manages the internal URI space
          For the external URI space manager, see the next pipeline. -->
  -  <map:pipeline internal-only="true">
  +  <map:pipeline>
   
     <map:match pattern="**tab-**.xml">
       <map:generate src="content/xdocs/tabs.xml"/>
  +    <map:transform type="linkrewriter" src="cocoon:/linkmap"/>
       <map:call resource="skinit">
        <map:parameter name="type" value="tab2menu"/>
        <map:parameter name="path" value="{2}"/>
  @@ -187,18 +220,21 @@
   
     <map:match pattern="**book-**/*.xml">
       <map:call resource="book">
  -     <map:parameter name="path" value="{2}/{3}.xml"/>
  +      <map:parameter name="dir" value="{2}/"/>
  +      <map:parameter name="path" value="{2}/{3}.xml"/>
       </map:call>
     </map:match>
   
     <map:match pattern="**book-**.xml">
       <map:call resource="book">
  +      <map:parameter name="dir" value=""/>
         <map:parameter name="path" value="{2}.xml"/>
       </map:call>
     </map:match>
   
     <map:match pattern="body-todo.xml">
        <map:generate type="file-nolabel" src="status.xml"/>
  +     <map:transform type="linkrewriter" src="cocoon:/linkmap"/>
        <map:transform src="library/xslt/todo2document.xsl" label="content"/>
        <map:call resource="skinit">
         <map:parameter name="type" value="document2html"/>
  @@ -206,8 +242,19 @@
        </map:call>
      </map:match>
   
  +  <map:match pattern="body-forrest-issues.xml">
  +     <map:generate type="file-nolabel" src="http://issues.cocoondev.org/jira/secure/IssueNavigator.jspa?pid=10000&amp;resolutionIds=-1&amp;view=rss&amp;reset=true"/>
  +     <map:transform src="library/xslt/rssissues2document.xsl" label="content"/>
  +     <map:transform type="idgen"/>
  +     <map:call resource="skinit">
  +      <map:parameter name="type" value="document2html"/>
  +      <map:parameter name="path" value="/forrest-issues.xml"/>
  +     </map:call>
  +   </map:match>
  +
      <map:match pattern="body-changes.xml">
        <map:generate type="file-nolabel" src="status.xml"/>
  +     <map:transform type="linkrewriter" src="cocoon:/linkmap"/>
        <map:transform src="library/xslt/changes2document.xsl" label="content"/>
        <map:call resource="skinit">
         <map:parameter name="type" value="document2html"/>
  @@ -217,6 +264,7 @@
   
      <map:match pattern="body-**/faq.xml">
        <map:generate type="file-nolabel" src="content/xdocs/{1}/faq.xml"/>
  +     <map:transform type="linkrewriter" src="cocoon:/{1}/linkmap"/>
        <map:transform src="library/xslt/faq2document.xsl" label="content"/>
        <map:call resource="skinit">
         <map:parameter name="type" value="document2html"/>
  @@ -228,6 +276,7 @@
   
      <map:match pattern="body-faq.xml">
        <map:generate type="file-nolabel" src="content/xdocs/faq.xml"/>
  +     <map:transform type="linkrewriter" src="cocoon:/linkmap"/>
        <map:transform src="library/xslt/faq2document.xsl" label="content"/>
        <map:call resource="skinit">
         <map:parameter name="type" value="document2html"/>
  @@ -237,15 +286,11 @@
        </map:call>
      </map:match>
   
  -
  -   <!-- Redirect requests for community/ (eg in the trail) to the home page -->
  -   <map:match pattern="community/index.html">
  -     <map:redirect-to uri="../index.html"/>
  -   </map:match>
  -
      <!-- index pages for contribution categories -->
      <map:match pattern="body-community/*/index.xml">
        <map:generate src="content/xdocs/community/{1}/index.xml"/>
  +     <map:transform type="linkrewriter" src="cocoon:/community/{1}/linkmap"/>
  +     <map:transform type="idgen"/>
        <map:call resource="skinit">
         <map:parameter name="type" value="document2html"/>
         <map:parameter name="path" value="community/{1}/index"/>
  @@ -255,6 +300,8 @@
      <!-- no special transformation, yet, for revision pages -->
      <map:match pattern="body-community**revision-*.xml">
        <map:generate src="content/xdocs/community{1}revision-{2}.xml"/>
  +     <map:transform type="linkrewriter" src="cocoon:/community/{1}/linkmap"/>
  +     <map:transform type="idgen"/>
        <map:call resource="skinit">
         <map:parameter name="type" value="document2html"/>
         <map:parameter name="path" value="community/{1}/revision-{2}"/>
  @@ -267,6 +314,8 @@
          <map:part src="content/xdocs/community/{1}/{2}/{3}.xml"/>
          <map:part src="cocoon:/revisions-community/{1}/{2}/{3}" />
        </map:aggregate>
  +     <map:transform type="linkrewriter" src="cocoon:/community/{1}/{2}/linkmap"/>
  +     <map:transform type="idgen"/>
        <map:transform src="library/xslt/{1}2document.xsl" label="content"/>
        <map:call resource="skinit">
         <map:parameter name="type" value="document2html"/>
  @@ -286,34 +335,6 @@
      <map:serialize type="xml" />
    </map:match>
   
  -
  -
  -   <!-- Generate the "doclist" - list of all documentation
  -     The first match generates each book.xml and adds a new attribute "uri".
  -     The second match aggregates each book.xml into a doclist and
  -     then converts it to a document.
  -   -->
  -   <map:match pattern="doclist/content/xdocs/**book.xml">
  -     <map:generate src="content/xdocs/{1}book.xml"/>
  -     <map:transform src="library/xslt/doclist.xsl">
  -       <map:parameter name="uri" value="{1}"/>
  -     </map:transform>
  -     <map:serialize type="xml"/>
  -    </map:match>
  -
  -   <map:match pattern="body-doclist.xml">
  -     <map:aggregate element="doclist">
  -       <map:part src="cocoon:/doclist/content/xdocs/book.xml"/>
  -       <map:part src="cocoon:/doclist/content/xdocs/community/howto/book.xml"/>
  -     </map:aggregate>
  -     <map:transform src="library/xslt/doclist2document.xsl"/>
  -     <map:call resource="skinit">
  -      <map:parameter name="type" value="document2html"/>
  -      <map:parameter name="path" value="doclist.xml"/>
  -      <map:parameter name="nopdf" value="true"/>
  -     </map:call>
  -   </map:match>
  -
      <!-- HTML DTD Documentation generation pipeline, makes use of NekoDTD tool -->
   
      <map:match pattern="body-**.dtdx.xml">
  @@ -322,6 +343,7 @@
        </map:generate>
        <map:transform src="library/xslt/dtdx2flat.xsl"/>
        <map:transform src="library/xslt/flat2document.xsl"/>
  +     <map:transform type="idgen"/>
        <map:call resource="skinit">
         <map:parameter name="type" value="document2html"/>
         <map:parameter name="isfaq" value="true"/>
  @@ -331,7 +353,23 @@
   
      <!-- Generates body HTML for files in subdirs -->
      <map:match pattern="body-**/*.xml">
  +         
  +     <!-- if the file is present as ihtml, give that to the user... -->
  +     <map:act type="resource-exists">
  +       <map:parameter name="url" value="content/xdocs/{1}/{2}.ihtml"/>
  +       <map:generate src="content/xdocs/{../1}/{../2}.ihtml" type="html"/>
  +       <map:transform src="library/xslt/html2document.xsl"/>
  +       <map:transform type="linkrewriter" src="cocoon:/linkmap"/>
  +       <map:transform type="idgen"/>
  +       <map:call resource="skinit">
  +         <map:parameter name="type" value="document2html"/>
  +         <map:parameter name="path" value="{../1}/{../2}.xml"/>
  +       </map:call>
  +     </map:act> 
  +   
       <map:generate src="content/xdocs/{1}/{2}.xml"/>
  +    <map:transform type="linkrewriter" src="cocoon:/{1}/linkmap"/>
  +    <map:transform type="idgen"/>
       <map:call resource="transform-to-document">
        <map:parameter name="src" value="content/xdocs/{1}/{2}.xml"/>
       </map:call>
  @@ -343,7 +381,23 @@
   
      <!-- Generates body HTML for root-level files -->
      <map:match pattern="body-**.xml">
  +      
  +     <!-- if the file is present as ihtml, give that to the user... -->
  +     <map:act type="resource-exists">
  +       <map:parameter name="url" value="content/xdocs/{1}.ihtml"/>
  +       <map:generate src="content/xdocs/{../1}.ihtml" type="html"/>
  +       <map:transform src="library/xslt/html2document.xsl"/>
  +       <map:transform type="linkrewriter" src="cocoon:/linkmap"/>
  +       <map:transform type="idgen"/>
  +       <map:call resource="skinit">
  +         <map:parameter name="type" value="document2html"/>
  +         <map:parameter name="path" value="{../1}.xml"/>
  +       </map:call>
  +     </map:act> 
  +   
       <map:generate src="content/xdocs/{1}.xml"/>
  +    <map:transform type="linkrewriter" src="cocoon:/linkmap"/>
  +    <map:transform type="idgen"/>
       <map:call resource="transform-to-document">
        <map:parameter name="src" value="content/xdocs/{1}.xml"/>
       </map:call>
  @@ -352,6 +406,41 @@
        <map:parameter name="path" value="{1}.xml"/>
       </map:call>
      </map:match>
  + </map:pipeline>
  +
  + <map:pipeline>
  +   <map:match pattern="abs-linkmap">
  +     <map:generate src="content/xdocs/site.xml"/>
  +     <map:transform src="library/xslt/absolutize-linkmap.xsl"/>
  +     <map:serialize type="xml"/>
  +   </map:match>
  +
  +   <map:match pattern="abs-linkmap/**">
  +     <map:generate src="cocoon:/abs-linkmap"/>
  +     <map:transform type="xpath">
  +       <map:parameter name="include" value="//*[@href='{1}']"/>
  +     </map:transform>
  +     <map:serialize type="xml"/>
  +   </map:match>
  +
  +   <map:match pattern="**linkmap">
  +     <map:generate src="cocoon:/abs-linkmap"/>
  +     <map:transform src="library/xslt/relativize-linkmap.xsl">
  +       <map:parameter name="path" value="{0}"/>
  +     </map:transform>
  +     <map:serialize type="xml"/>
  +   </map:match>
  +
  +   <!-- This derivation of '**linkmap' is used when generating book.xml from a
  +   site.xml.  The /** suffix identifies a @href prefix which all nodes in the
  +   returned subtree must have. -->
  +   <map:match pattern="**linkmap/**">
  +     <map:generate src="cocoon:/abs-linkmap/{2}"/>
  +     <map:transform src="library/xslt/relativize-linkmap.xsl">
  +       <map:parameter name="path" value="{1}linkmap"/>
  +     </map:transform>
  +     <map:serialize type="xml"/>
  +   </map:match>
   
     </map:pipeline>
   
  @@ -362,12 +451,12 @@
      <map:match pattern="edit**">
        <map:mount uri-prefix="edit" src="editor.xmap" check-reload="yes"/>
      </map:match>
  -   
  +
      <!-- ==================   External URI-space    ========================= -->
  
   
   
      <map:match pattern="">
  -    <map:redirect-to uri="{context:context}/index.html"/>
  +    <map:redirect-to uri="{request:contextPath}/index.html"/>
      </map:match>
   
      <map:match pattern="**">
  @@ -375,9 +464,54 @@
       <!-- if the file is present verbatim as content, give that to the user... -->
       <map:act type="resource-exists">
        <map:parameter name="url" value="content/{1}"/>
  -     <map:read src="content/{../1}"/>
  +
  +     <map:match pattern="**.html">
  +       <!--
  +        Use this instead if you don't want JTidy to clean up your HTML
  +        <map:read src="content/{0}" mime-type="text/html"/>
  +        -->
  +        <map:generate type="html" src="content/{1}.html"/>      
  +        <map:serialize type="html"/>
  +      </map:match>
  +
  +      <map:match pattern="**.xml">
  +        <map:generate type="file" src="content/{1}.xml"/>      
  +        <map:serialize type="xml"/>
  +      </map:match>
  +
  +      <map:match pattern="skin/**.css">
  +        <map:read src="content/{1}.css" mime-type="text/css"/>
  +      </map:match>
  +      
  +      <map:match pattern="**.js">
  +        <map:read src="content/{1}.js" mime-type="application/javascript"/>
  +      </map:match>
  +      
  +      <map:match pattern="**.gif">
  +        <map:read src="content/{1}.gif" mime-type="image/gif"/>
  +      </map:match>
  +
  +      <map:match pattern="**.png">
  +        <map:read src="content/{1}.png" mime-type="image/png"/>
  +      </map:match>
  +      
  +      <map:match pattern="**.jpg">
  +        <map:read src="content/{1}.jpg" mime-type="image/jpeg"/>
  +      </map:match>
  +
  +      <map:match pattern="**.jpeg">
  +        <map:read src="content/{1}.jpeg" mime-type="image/jpeg"/>
  +      </map:match> 
  +           
  +      <map:match pattern="**.pdf">
  +        <map:read src="content/{1}.pdf" mime-type="application/pdf"/>
  +      </map:match>
  +      
  +      <map:match pattern="**">
  +        <map:read src="content/{1}" mime-type="application/unknown"/>
  +      </map:match>
       </map:act>
  -   
  +      
      <!-- ... otherwise try to generate it using these rules.  -->
     
     <map:match pattern="apachestats">
  @@ -389,7 +523,7 @@
       <map:serialize type="xml"/>
     </map:match>
   
  -<!-- 2002-12-14 copied default Forrest sitemap.xamp and added this match -->
  +<!-- 2003-01-21 copied default Forrest sitemap.xmap and added this match -->
   <!-- xml-commons start -->
     <map:match pattern="**/resolver-*.html">
       <map:generate src="content/xdocs/{1}/resolver-{2}.xml"/>
  @@ -483,7 +617,7 @@
      <!-- ================  Directory redirects   =========================== -->
      <!-- Redirect any request for a directory to the directory's index.html file  -->
      <map:match pattern="**/">
  -     <map:redirect-to uri="{context:context}/{1}/index.html"/>
  +    <map:redirect-to uri="{request:contextPath}/{1}/index.html"/>
      </map:match>
   
      <!-- ================  Libre   =========================== -->
  @@ -573,7 +707,7 @@
      </map:match>
   
      </map:match>
  -   
  +
     </map:pipeline>
    </map:pipelines>
   
  
  
  

Mime
View raw message