forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From je...@apache.org
Subject cvs commit: xml-forrest/src/resources/conf resources.xmap aggregate.xmap dtd.xmap faq.xmap forrest.xmap issues.xmap linkmap.xmap menu.xmap profiler.xmap raw.xmap revisions.xmap sitemap.xmap status.xmap static.xmap
Date Sat, 05 Jul 2003 13:01:03 GMT
jefft       2003/07/05 06:01:02

  Modified:    src/resources/conf aggregate.xmap dtd.xmap faq.xmap
                        forrest.xmap issues.xmap linkmap.xmap menu.xmap
                        profiler.xmap raw.xmap revisions.xmap sitemap.xmap
                        status.xmap
  Added:       src/resources/conf resources.xmap
  Removed:     src/resources/conf static.xmap
  Log:
  - Rename 'static.xmap' to 'resources.xmap'.  It's a much better name, because
    it's more descriptive, and not all resources are statically generated (SVG).
  - Add a block of documentation to the top of all sitemaps.
  - Seeing as issues.xmap is Forrest-specific, change the matcher from
    **issues.xml to forrest-issues.xml.  Prevents conflicts with user pipelines.
  - Fix up profiler pipeline
  
  Revision  Changes    Path
  1.5       +6 -2      xml-forrest/src/resources/conf/aggregate.xmap
  
  Index: aggregate.xmap
  ===================================================================
  RCS file: /home/cvs/xml-forrest/src/resources/conf/aggregate.xmap,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- aggregate.xmap	5 Jul 2003 11:06:05 -0000	1.4
  +++ aggregate.xmap	5 Jul 2003 13:01:02 -0000	1.5
  @@ -5,14 +5,18 @@
   This subsitemap defines both a source (*.xml) matcher, and a
   linkmap (linkmap-*) matcher to redefine the internal links.
   
  +It works by taking site.xml, transforming each page node into a
  +CInclude command, and using the CInclude transformer to create
  +the aggregated XML.  Some cleverness required to prevent
  +duplicate 'id' attributes.
  +
  +Generates  :  Source XML, Linkmap
   Example URL:  Typically http://localhost:8888/site.pdf
   Used by    :  sitemap.xmap, which binds the URL to this pipeline
   Uses       :  cocoon://abs-linkmap, in linkmap.xmap
   
   $Revision$
   ==================================================== -->
  -
  -
   
   <map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
     <map:components>
  
  
  
  1.6       +11 -0     xml-forrest/src/resources/conf/dtd.xmap
  
  Index: dtd.xmap
  ===================================================================
  RCS file: /home/cvs/xml-forrest/src/resources/conf/dtd.xmap,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- dtd.xmap	18 Apr 2003 06:46:08 -0000	1.5
  +++ dtd.xmap	5 Jul 2003 13:01:02 -0000	1.6
  @@ -1,4 +1,15 @@
   <?xml version="1.0"?>
  +<!-- ===============================================
  +*.dtd pipeline.  Generates XML from DTDs using the Neko parser.
  +Useful for documenting DTD-based XML schemas, of which Forrest has plenty.
  +
  +Generates  :  Source XML
  +Example URL:  http://localhost:8888/forrest-issues.xml       # Source XML for FAQ
  +Used by    :  sitemap.xmap
  +Uses       :  resources/schema/dtd/*.dtd
  +
  +$Revision$
  +==================================================== -->
   
   <map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
     <map:components>
  
  
  
  1.14      +33 -0     xml-forrest/src/resources/conf/faq.xmap
  
  Index: faq.xmap
  ===================================================================
  RCS file: /home/cvs/xml-forrest/src/resources/conf/faq.xmap,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- faq.xmap	5 Jul 2003 11:06:05 -0000	1.13
  +++ faq.xmap	5 Jul 2003 13:01:02 -0000	1.14
  @@ -1,4 +1,20 @@
   <?xml version="1.0"?>
  +<!-- ===============================================
  +'faq' pipelines.  Implements source XML, body HTML and output PDF pipelines.
  +
  +Handles different FAQ DTD versions by sniffing the DOCTYPE, and
  +applying an appropriate transformation.
  +
  +Generates  :  Source XML, body HTML, output PDF
  +Example URL:  http://localhost:8888/faq.xml       # Source XML for FAQ
  +Example URL:  http://localhost:8888/body-faq.html # Body HTML for FAQ
  +Example URL:  http://localhost:8888/faq.pdf       # PDF of FAQ
  +Used by    :  sitemap.xmap, which binds these generic pipelines to URLs.
  +Uses       :  content/xdocs/**.xml, depending on URL binding.
  +
  +$Revision$
  +==================================================== -->
  +
   
   <map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
     <map:components>
  @@ -73,6 +89,23 @@
     <map:pipelines>
   
       <map:pipeline>
  +
  +      <!-- ============================================================ -->
  +      <!-- OUTPUT FORMATS                                               -->
  +      <!-- ============================================================ -->
  +
  +      <!-- Special matcher for FAQ PDFs, so we can pass an extra
  +      'numbersections' param into document2fo.xsl -->
  +      <map:match pattern="**.pdf">
  +        <map:generate src="cocoon:/{1}.xml"/>
  +        <map:transform src="skins/{forrest:skin}/xslt/fo/document2fo.xsl">
  +          <map:parameter name="numbersections" value="false"/>
  +          <map:parameter name="ctxbasedir" value="{realpath:.}/"/>
  +          <map:parameter name="xmlbasedir" value="content/xdocs/{1}"/>
  +        </map:transform>
  +        <map:serialize type="fo2pdf"/>
  +      </map:match>
  +
   
         <!-- ============================================================ -->
         <!-- INTERMEDIATE FORMATS                                         -->
  
  
  
  1.20      +17 -0     xml-forrest/src/resources/conf/forrest.xmap
  
  Index: forrest.xmap
  ===================================================================
  RCS file: /home/cvs/xml-forrest/src/resources/conf/forrest.xmap,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- forrest.xmap	23 Jun 2003 10:14:26 -0000	1.19
  +++ forrest.xmap	5 Jul 2003 13:01:02 -0000	1.20
  @@ -1,4 +1,21 @@
   <?xml version="1.0"?>
  +<!-- ===============================================
  +Pipelines defining all Source XML types Forrest can handle.
  +Converts from arbitrary formats to standard Forrest doc-v12 XML.
  +
  +First, checks if *.cwiki or *.ihtml exists, and uses them if present.
  +Otherwise, the default *.xml handling is used.  The XML's DTD type is
  +discovered using the SourceTypeAction, and an appropriate transformation
  +applied.  Thus to add new XML types, just define a new <sourcetype>
  +and an appropriate <map:when> handler.
  +
  +Generates  :  Source XML, Body HTML for *.ehtml
  +Example URL:  http://localhost:8888/index.xml
  +Used by    :  *.html and *.pdf pipelines in sitemap.xmap
  +Uses       :  content/xdocs/**.xml
  +
  +$Revision$
  +==================================================== -->
   
   <map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
     <map:components>
  
  
  
  1.5       +12 -2     xml-forrest/src/resources/conf/issues.xmap
  
  Index: issues.xmap
  ===================================================================
  RCS file: /home/cvs/xml-forrest/src/resources/conf/issues.xmap,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- issues.xmap	27 Mar 2003 12:35:15 -0000	1.4
  +++ issues.xmap	5 Jul 2003 13:01:02 -0000	1.5
  @@ -1,4 +1,15 @@
   <?xml version="1.0"?>
  +<!-- ===============================================
  +'issues' pipeline.  Converts RSS to doc-v12 XML. 
  +Here using Forrest's JIRA feed
  +
  +Generates  :  Source XML
  +Example URL:  http://localhost:8888/forrest-issues.xml    # Source XML for FAQ
  +Used by    :  sitemap.xmap, which binds this generic pipeline to a URL.
  +Uses       :  An RSS feed.
  +
  +$Revision$
  +==================================================== -->
   
   <map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
     <map:components>
  @@ -16,7 +27,7 @@
     <map:pipelines>
       <map:pipeline>
   
  -      <map:match pattern="forrest-issues.xml">
  +      <map:match pattern="**.xml">
           <map:generate type="file" src="http://issues.cocoondev.org/jira/secure/IssueNavigator.jspa?pid=10000&amp;resolutionIds=-1&amp;view=rss&amp;reset=true"
/>
           <map:transform src="resources/stylesheets/rssissues2document.xsl" />
           <map:transform type="idgen" />
  @@ -26,4 +37,3 @@
       </map:pipeline>
     </map:pipelines>
   </map:sitemap>
  -
  
  
  
  1.13      +2 -0      xml-forrest/src/resources/conf/linkmap.xmap
  
  Index: linkmap.xmap
  ===================================================================
  RCS file: /home/cvs/xml-forrest/src/resources/conf/linkmap.xmap,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- linkmap.xmap	5 Jul 2003 11:06:05 -0000	1.12
  +++ linkmap.xmap	5 Jul 2003 13:01:02 -0000	1.13
  @@ -3,12 +3,14 @@
   'linkmap' pipeline.  A linkmap is a map from abstract ('site:index') to
   physical ('../index.html') links for the current page.
   
  +Generates  :  Variant of site.xml with each @href being the link to that page from the
current page.
   Example URL:  http://localhost:8888/community/linkmap-index.html (links for community/index.html)
   Used by    :  The linkrewriter transformer
   Uses       :  content/xdocs/site.xml
   
   $Revision$
   ==================================================== -->
  +
   
   <map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
     <map:components>
  
  
  
  1.4       +3 -0      xml-forrest/src/resources/conf/menu.xmap
  
  Index: menu.xmap
  ===================================================================
  RCS file: /home/cvs/xml-forrest/src/resources/conf/menu.xmap,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- menu.xmap	5 Jul 2003 11:06:05 -0000	1.3
  +++ menu.xmap	5 Jul 2003 13:01:02 -0000	1.4
  @@ -2,6 +2,9 @@
   <!-- ===============================================
   'book.xml' pipeline, which generates XML that becomes the menu.
   
  +Generates  :  Menulinks XML: Variant of site.xml that will become the menu for the current
page.
  +Generates  :  Book HTML: A HTML menu for the current page.
  +Example URL:  http://localhost:8888/community/menulinks-index.html (menu links for community/index.html)
   Example URL:  http://localhost:8888/community/book-index.html (menu for community/index.html)
   Used by    :  **/menu-*.html in sitemap.xmap, 
   Uses       :  content/xdocs/site.xml, or book.xml file if present.
  
  
  
  1.4       +17 -1     xml-forrest/src/resources/conf/profiler.xmap
  
  Index: profiler.xmap
  ===================================================================
  RCS file: /home/cvs/xml-forrest/src/resources/conf/profiler.xmap,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- profiler.xmap	27 Mar 2003 12:35:15 -0000	1.3
  +++ profiler.xmap	5 Jul 2003 13:01:02 -0000	1.4
  @@ -1,4 +1,17 @@
   <?xml version="1.0"?>
  +<!-- ===============================================
  +'profiler' pipeline.  Shows how long each pipeline in the Forrest sitemap takes.
  +
  +To enable this, uncomment the 'profile-caching' pipeline in sitemap.xmap, and set:
  +<map:pipes default="profile-caching">
  +
  +Example URL:  http://localhost:8888/profiler
  +Used by    :  Forrest hackers desperate for speed
  +Uses       :  Stats collected by the profile-caching pipeline.
  +
  +$Revision$
  +==================================================== -->
  +
   
   <map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
     <map:components>
  @@ -23,7 +36,10 @@
           <map:transform src="resources/stylesheets/profile2page.xsl">
             <map:parameter name="use-request-parameters" value="true"/>
           </map:transform>
  -        <map:transform src="resources/stylesheets/page2html.xsl"/>
  +        <map:transform src="resources/stylesheets/complex-page2html.xsl">
  +          <map:parameter name="contextPath" value="{request:contextPath}"/>
  +        </map:transform>
  +
           <map:serialize/>
         </map:match>
   
  
  
  
  1.7       +0 -0      xml-forrest/src/resources/conf/raw.xmap
  
  Index: raw.xmap
  ===================================================================
  RCS file: /home/cvs/xml-forrest/src/resources/conf/raw.xmap,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  
  
  
  1.6       +21 -0     xml-forrest/src/resources/conf/revisions.xmap
  
  Index: revisions.xmap
  ===================================================================
  RCS file: /home/cvs/xml-forrest/src/resources/conf/revisions.xmap,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- revisions.xmap	27 Mar 2003 12:35:15 -0000	1.5
  +++ revisions.xmap	5 Jul 2003 13:01:02 -0000	1.6
  @@ -1,4 +1,25 @@
   <?xml version="1.0"?>
  +<!-- ===============================================
  +Support for HOWTO documents that want 'revisions'.  Revisions are XML snippets containing
  +comments on the main XML file.  The main pipeline here automatically appends a page's
  +revisions to the bottom.
  +
  +For example, in content/xdocs/community/howto/xmlform we have:
  +
  +howto-xmlform.xml
  +revision-howto-xmlform-2002-05-20.xml
  +revision-howto-xmlform-2002-05-25.xml
  +
  +The **/*.xml pipeline would append the revision-*.xml snippets to howto-xmlform.xml before
  +serving it.
  +
  +Generates  :  Source XML
  +Example URL:  http://localhost:8888/community/howto/xmlform/howto-xmlform.xml
  +Used by    :  sitemap.xmap
  +Uses       :  content/xdocs/**.xml, and content/xdocs/**/revision-*.xml
  +
  +$Revision$
  +==================================================== -->
   
   <map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
     <map:components>
  
  
  
  1.109     +7 -18     xml-forrest/src/resources/conf/sitemap.xmap
  
  Index: sitemap.xmap
  ===================================================================
  RCS file: /home/cvs/xml-forrest/src/resources/conf/sitemap.xmap,v
  retrieving revision 1.108
  retrieving revision 1.109
  diff -u -r1.108 -r1.109
  --- sitemap.xmap	5 Jul 2003 11:06:05 -0000	1.108
  +++ sitemap.xmap	5 Jul 2003 13:01:02 -0000	1.109
  @@ -157,7 +157,7 @@
             <map:mount uri-prefix="" src="dtd.xmap" check-reload="yes" />
           </map:match>
   
  -        <map:match pattern="**issues.xml">
  +        <map:match pattern="forrest-issues.xml">
             <map:mount uri-prefix="" src="issues.xmap" check-reload="yes" />
           </map:match>
   
  @@ -305,24 +305,13 @@
           </map:call>
         </map:match>
   
  -
  -      <!-- Special matcher for FAQ PDFs, so we can pass an extra
  -      'numbersections' param into document2fo.xsl -->
         <map:match pattern="**faq.pdf">
  -        <map:generate src="cocoon:/{1}faq.xml"/>
  -        <map:transform src="skins/{forrest:skin}/xslt/fo/document2fo.xsl">
  -          <map:parameter name="numbersections" value="false"/>
  -          <map:parameter name="ctxbasedir" value="{realpath:.}/"/>
  -          <map:parameter name="xmlbasedir" value="content/xdocs/{1}"/>
  -        </map:transform>
  -        <map:serialize type="fo2pdf"/>
  +        <map:mount uri-prefix="" src="faq.xmap" check-reload="yes" />
         </map:match>
   
         <map:match type="regexp" pattern="^(.*?)([^/]*).pdf$">
           <map:generate src="cocoon:/{1}{2}.xml"/>
  -        <!--
  -        <map:transform type="idgen"/>
  -        -->
  +        <!-- <map:transform type="idgen"/> -->
           <map:transform type="xinclude"/>
           <map:transform type="linkrewriter" src="cocoon://{1}linkmap-{2}.pdf"/>
           <map:transform src="skins/{forrest:skin}/xslt/fo/document2fo.xsl">
  @@ -340,16 +329,16 @@
           <map:mount uri-prefix="" src="profiler.xmap" check-reload="yes" />
         </map:match>
         <map:match pattern="**.js">
  -        <map:mount uri-prefix="" src="static.xmap" check-reload="yes" />
  +        <map:mount uri-prefix="" src="resources.xmap" check-reload="yes" />
         </map:match>
         <map:match pattern="**.css">
  -        <map:mount uri-prefix="" src="static.xmap" check-reload="yes" />
  +        <map:mount uri-prefix="" src="resources.xmap" check-reload="yes" />
         </map:match>
         <map:match pattern="**images**">
  -        <map:mount uri-prefix="" src="static.xmap" check-reload="yes" />
  +        <map:mount uri-prefix="" src="resources.xmap" check-reload="yes" />
         </map:match>
        <map:match pattern="**favicon.ico">
  -        <map:mount uri-prefix="" src="static.xmap" check-reload="yes" />
  +        <map:mount uri-prefix="" src="resources.xmap" check-reload="yes" />
         </map:match>
       </map:pipeline>
   
  
  
  
  1.5       +14 -0     xml-forrest/src/resources/conf/status.xmap
  
  Index: status.xmap
  ===================================================================
  RCS file: /home/cvs/xml-forrest/src/resources/conf/status.xmap,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- status.xmap	27 Mar 2003 12:35:15 -0000	1.4
  +++ status.xmap	5 Jul 2003 13:01:02 -0000	1.5
  @@ -1,4 +1,18 @@
   <?xml version="1.0"?>
  +<!-- ===============================================
  +Todo and changes pipelines, and anything else reporting the 'status' of the project.
  +
  +Note that the regular (forrest.xmap) pipeline will handle Todo or Changes XML files, so
  +long as they have an appropriate DOCTYPE declaration.  This sitemap is purely for
  +generating stuff from status.xml.
  +
  +Generates  :  Source XML for todo.xml, changes.xml.  Output HTML for changes.rss
  +Example URL:  http://localhost:8888/changes.xml
  +Used by    :  sitemap.xmap
  +Uses       :  status.xml
  +
  +$Revision$
  +==================================================== -->
   
   <map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
     <map:components>
  
  
  
  1.1                  xml-forrest/src/resources/conf/resources.xmap
  
  Index: resources.xmap
  ===================================================================
  <?xml version="1.0"?>
  <!-- ===============================================
  Pipelines for resources (css, images, javascript etc).
  
  
  Generates  :  CSS, images (possibly from SVG), javascript.
  Example URL:  http://localhost:8888/images/project-logo.gif
  Used by    :  sitemap.xmap
  Uses       :  resources/*, skins/*/{css,images}
  
  $Revision: 1.1 $
  ==================================================== -->
  
  <map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
    <map:components>
      <map:generators default="file"/>
      <map:serializers default="html">
        <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 mime-type="image/png" name="svg2png" src="org.apache.cocoon.serialization.SVGSerializer"/>
      </map:serializers>
   
      <map:transformers default="xslt"/>
      <map:readers default="resource"/>
      <map:matchers default="wildcard"/>
      <map:selectors default="browser"/>
    </map:components>
  
    <map:resources>
      <map:resource name="skin-read">
        <map:read src="skins/{forrest:skin}/{path}" mime-type="{mime-type}" />
      </map:resource>
    </map:resources>
  
    <map:pipelines>
  
      <map:pipeline>
        <map:match pattern="skin/**.js">
          <map:call resource="skin-read">
            <map:parameter name="path" value="scripts/{1}.js" />
            <map:parameter name="mime-type" value="application/x-javascript" />
          </map:call>
        </map:match>
  
        <map:match pattern="**/skin/**.js">
          <map:call resource="skin-read">
            <map:parameter name="path" value="scripts/{2}.js" />
            <map:parameter name="mime-type" value="application/x-javascript" />
          </map:call>
        </map:match>
  
        <map:match pattern="**.js">
          <map:read src="resources/scripts/{1}.js" mime-type="application/x-javascript"
/>
        </map:match>
  
        <map:match pattern="skin/**.css">
          <map:call resource="skin-read">
            <map:parameter name="path" value="css/{1}.css" />
            <map:parameter name="mime-type" value="text/css" />
          </map:call>
        </map:match>
  
        <map:match pattern="**/skin/**.css">
          <map:call resource="skin-read">
            <map:parameter name="path" value="css/{2}.css" />
            <map:parameter name="mime-type" value="text/css" />
          </map:call>
        </map:match>
  
        <map:match pattern="**.css">
          <map:read src="resources/css/{1}.css" mime-type="text/css" />
        </map:match>
  
        <map:match pattern="skin/images/**.*">
          <map:call resource="skin-read">
            <map:parameter name="path" value="images/{1}.{2}" />
            <map:parameter name="mime-type" value="image/{2}" />
          </map:call>
        </map:match>
  
        <!-- DS: handles images local to a contributor directory -->
        <map:match pattern="**my-images/**.*">
          <map:read src="content/xdocs/{1}my-images/{2}.{3}" mime-type="image/{3}" />
        </map:match>
  
        <map:match pattern="images/**.png">
          <map:select type="exists">
            <map:when test="resources/images/{1}.svg">
              <map:generate src="resources/images/{1}.svg" />
              <map:serialize type="svg2png" />
            </map:when>
            <map:otherwise>
              <map:read src="resources/images/{1}.png" mime-type="image/png" />
            </map:otherwise>
          </map:select>
        </map:match>
  
        <map:match pattern="images/**.*">
          <map:read src="resources/images/{1}.{2}" mime-type="image/{2}" />
        </map:match>
  
        <map:match pattern="**/images/**.*">
          <map:read src="resources/images/{2}.{3}" mime-type="image/{3}" />
        </map:match>
  
        <map:match pattern="**favicon.ico">
          <map:call resource="skin-read">
            <map:parameter name="path" value="images/favicon.ico" />
            <map:parameter name="mime-type" value="image/x-icon" />
          </map:call>
        </map:match>
  
      </map:pipeline>
    </map:pipelines>
  </map:sitemap>
  
  
  

Mime
View raw message