You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@forrest.apache.org by cr...@apache.org on 2003/11/09 12:48:00 UTC

cvs commit: xml-forrest/src/documentation/content/xdocs sitemap-ref.xml

crossley    2003/11/09 03:48:00

  Modified:    src/documentation/content/xdocs sitemap-ref.xml
  Log:
  Hand edit some nasty wide <source>
  
  Revision  Changes    Path
  1.5       +75 -73    xml-forrest/src/documentation/content/xdocs/sitemap-ref.xml
  
  Index: sitemap-ref.xml
  ===================================================================
  RCS file: /home/cvs/xml-forrest/src/documentation/content/xdocs/sitemap-ref.xml,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- sitemap-ref.xml	17 Sep 2003 04:59:49 -0000	1.4
  +++ sitemap-ref.xml	9 Nov 2003 11:48:00 -0000	1.5
  @@ -205,7 +205,7 @@
             </map:when>
             ]]></source>
           <p>
  -          The result is visible at the URL <link
  +          The intermediate result is visible at the URL <link
               href="community/howto/multi/step1.xml">community/howto/multi/step1.xml</link>.
           </p>
         </section>
  @@ -250,9 +250,9 @@
               specific about which URLs it handles, and relies on the caller (the
               section listed above) to only pass relevant requests to it.  We term
               this "binding a URL" to a pipeline.</p>
  -          <p>For instance, <code>faq.xmap</code>'s main pipeline matches
  -            <code>**.xml</code>, but only <code>**faq.xml</code> requests are sent
  -            to it.</p>
  +          <p>For instance, the main pipeline in <code>faq.xmap</code> matches
  +            <code>**.xml</code>, but only <code>**faq.xml</code> requests are
  +            sent to it.</p>
             <p>This "late binding" is useful, because the whole URL space is
               managed in <code>sitemap.xmap</code>, and not spread over lots of
               *.xmap files.  For instance, say you wish all <code>*.xml</code>
  @@ -287,16 +287,16 @@
             <code>sitemap.xmap</code>:
           </p>
           <source><![CDATA[
  -1         <map:match type="regexp" pattern="^(.*?)([^/]*).pdf$">
  -2           <map:generate src="cocoon:/{1}{2}.xml"/>
  -3           <map:transform type="xinclude"/>
  -4           <map:transform type="]]>&linkrewriter;<![CDATA[" src="cocoon://{1}linkmap-{2}.pdf"/>
  -5           <map:transform src="skins/{forrest:skin}/xslt/fo/document2fo.xsl">
  -6             <map:parameter name="ctxbasedir" value="{realpath:.}/"/>
  -7             <map:parameter name="xmlbasedir" value="content/xdocs/{1}"/>
  -8           </map:transform>
  -9           <map:serialize type="fo2pdf"/>
  -10        </map:match>
  +1   <map:match type="regexp" pattern="^(.*?)([^/]*).pdf$">
  +2     <map:generate src="cocoon:/{1}{2}.xml"/>
  +3     <map:transform type="xinclude"/>
  +4     <map:transform type="]]>&linkrewriter;<![CDATA[" src="cocoon://{1}linkmap-{2}.pdf"/>
  +5     <map:transform src="skins/{forrest:skin}/xslt/fo/document2fo.xsl">
  +6       <map:parameter name="ctxbasedir" value="{realpath:.}/"/>
  +7       <map:parameter name="xmlbasedir" value="content/xdocs/{1}"/>
  +8     </map:transform>
  +9     <map:serialize type="fo2pdf"/>
  +10  </map:match>
           ]]></source>
           <ol>
             <li>The first line uses a matching regexp to break the URL into
  @@ -366,17 +366,17 @@
           <title>Page body</title>
           <p>Here is the matcher which generates the page body:</p>
           <source><![CDATA[
  -          1       <map:match pattern="**body-*.html">
  -            2         <map:generate src="cocoon:/{1}{2}.xml"/>
  -            3         <map:transform type="idgen"/>
  -            4         <map:transform type="xinclude"/>
  -            5         <map:transform type="]]>&linkrewriter;<![CDATA[" src="cocoon:/{1}linkmap-{2}.html"/>
  -            6         <map:call resource="skinit">
  -              7           <map:parameter name="type" value="document2html"/>
  -              8           <map:parameter name="path" value="{1}{2}.html"/>
  -              9           <map:parameter name="notoc" value="false"/>
  -              10        </map:call>
  -            11      </map:match>
  +1   <map:match pattern="**body-*.html">
  +2     <map:generate src="cocoon:/{1}{2}.xml"/>
  +3     <map:transform type="idgen"/>
  +4     <map:transform type="xinclude"/>
  +5     <map:transform type="]]>&linkrewriter;<![CDATA[" src="cocoon:/{1}linkmap-{2}.html"/>
  +6     <map:call resource="skinit">
  +7       <map:parameter name="type" value="document2html"/>
  +8       <map:parameter name="path" value="{1}{2}.html"/>
  +9       <map:parameter name="notoc" value="false"/>
  +10    </map:call>
  +11  </map:match>
             ]]></source>
           <ol>
             <li>In our matcher pattern, {1} will be the directory (if any) and {2}
  @@ -435,14 +435,14 @@
           <title>Page tabs</title>
           <p>Tab generation is quite tame compared to menus:</p>
           <source><![CDATA[
  -           <map:match pattern="**tab-*.html">
  -             <map:generate src="content/xdocs/tabs.xml" />
  -             <map:transform type="]]>&linkrewriter;<![CDATA[" src="cocoon:/{1}linkmap-{2}.html"/>
  -             <map:call resource="skinit">
  -               <map:parameter name="type" value="tab2menu"/>
  -               <map:parameter name="path" value="{1}{2}.html"/>
  -             </map:call>
  -           </map:match>
  +     <map:match pattern="**tab-*.html">
  +       <map:generate src="content/xdocs/tabs.xml" />
  +       <map:transform type="]]>&linkrewriter;<![CDATA[" src="cocoon:/{1}linkmap-{2}.html"/>
  +       <map:call resource="skinit">
  +         <map:parameter name="type" value="tab2menu"/>
  +         <map:parameter name="path" value="{1}{2}.html"/>
  +       </map:call>
  +     </map:match>
              ]]></source>
           <p>All the smarts are in the <code>tab2menu.xsl</code> stylesheet, which
             needs to choose the correct tab based on the current path.  Currently,
  @@ -493,10 +493,10 @@
                   reveal this complexity:
                 </p>
                 <source><![CDATA[
  -                <map:transform src="resources/stylesheets/site2site-normalizetabs.xsl" />
  -                <map:transform src="resources/stylesheets/site2site-selectnode.xsl">
  -                  <map:parameter name="path" value="{1}{2}"/>
  -                </map:transform>
  +<map:transform src="resources/stylesheets/site2site-normalizetabs.xsl" />
  +<map:transform src="resources/stylesheets/site2site-selectnode.xsl">
  +  <map:parameter name="path" value="{1}{2}"/>
  +</map:transform>
                   ]]></source>
               </li>
               <li>
  @@ -504,9 +504,9 @@
                   <code>XPathTransformer</code> to include only pages in the
                   current page's directory, or below:</p>
                 <source><![CDATA[
  -                <map:transform type="xpath">
  -                  <map:parameter name="include" value="//*[@href='{1}']" />
  -                </map:transform>
  +<map:transform type="xpath">
  +  <map:parameter name="include" value="//*[@href='{1}']" />
  +</map:transform>
                   ]]></source>
                 <p>
                   Here, <code>{1}</code> is the directory part of the current
  @@ -580,21 +580,21 @@
             <title>cocoon.xconf</title>
             <p>First, we declare all the input modules we will be needing:</p>
             <source><![CDATA[
  -    <!-- For the site: scheme -->
  -    <component-instance
  -      class="org.apache.cocoon.components.modules.input.XMLFileModule"
  -      logger="core.modules.xml" name="linkmap"/>
  -
  -    <!-- Links to URIs within the site -->
  -    <component-instance
  -      class="org.apache.cocoon.components.modules.input.SimpleMappingMetaModule"
  -      logger="core.modules.mapper" name="site"/>
  -
  -    <!-- Links to external URIs, as distinct from 'site' URIs -->
  -    <component-instance
  -      class="org.apache.cocoon.components.modules.input.SimpleMappingMetaModule"
  -      logger="core.modules.mapper" name="ext"/>
  -    ]]></source>
  +<!-- For the site: scheme -->
  +<component-instance
  +  class="org.apache.cocoon.components.modules.input.XMLFileModule"
  +  logger="core.modules.xml" name="linkmap"/>
  +
  +<!-- Links to URIs within the site -->
  +<component-instance
  +  class="org.apache.cocoon.components.modules.input.SimpleMappingMetaModule"
  +  logger="core.modules.mapper" name="site"/>
  +
  +<!-- Links to external URIs, as distinct from 'site' URIs -->
  +<component-instance
  +  class="org.apache.cocoon.components.modules.input.SimpleMappingMetaModule"
  +  logger="core.modules.mapper" name="ext"/>
  +]]></source>
             <ul>
               <li><strong>linkmap</strong> will provide access to the contents of
                 &s;; for example, <code>linkmap:/site/about/index/@href</code>
  @@ -622,7 +622,9 @@
             </p>
             <source><![CDATA[
   ....
  -<!-- Rewrites links, e.g. transforming href="site:index" to href="../index.html" -->
  +<!-- Rewrites links, e.g. transforming
  +     href="site:index" to href="../index.html"
  +-->
   <map:transformer name="linkrewriter"
     logger="sitemap.transformer.linkrewriter"
     src="org.apache.cocoon.transformation.LinkRewriterTransformer">
  @@ -708,22 +710,22 @@
               pipelines in <code>linkmap.xmap</code>:
             </p>
             <source><![CDATA[
  -            <!-- site.xml with @href's appended to be context-relative. -->
  -            <map:match pattern="abs-linkmap">
  -              <map:generate src="content/xdocs/site.xml" />
  -              <map:transform src="resources/stylesheets/absolutize-linkmap.xsl" />
  -              <map:serialize type="xml" />
  -            </map:match>
  -
  -            <!-- Linkmap for regular pages -->
  -            <map:match pattern="**linkmap-*">
  -              <map:generate src="cocoon://abs-linkmap" />
  -              <map:transform src="resources/stylesheets/relativize-linkmap.xsl">
  -                <map:parameter name="path" value="{1}{2}" />
  -                <map:parameter name="site-root" value="{conf:project-url}" />
  -              </map:transform>
  -              <map:serialize type="xml" />
  -            </map:match>
  +<!-- site.xml with @href's appended to be context-relative. -->
  +<map:match pattern="abs-linkmap">
  +  <map:generate src="content/xdocs/site.xml" />
  +  <map:transform src="resources/stylesheets/absolutize-linkmap.xsl" />
  +  <map:serialize type="xml" />
  +</map:match>
  +
  +<!-- Linkmap for regular pages -->
  +<map:match pattern="**linkmap-*">
  +  <map:generate src="cocoon://abs-linkmap" />
  +  <map:transform src="resources/stylesheets/relativize-linkmap.xsl">
  +    <map:parameter name="path" value="{1}{2}" />
  +    <map:parameter name="site-root" value="{conf:project-url}" />
  +  </map:transform>
  +  <map:serialize type="xml" />
  +</map:match>
               ]]></source>
             <p>You can try these URIs out directly on a live Forrest to see what
               is going on (for example, Forrest's own <link