cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bdelacre...@apache.org
Subject cvs commit: cocoon-2.1/src/blocks/jfor/samples/misc minimal.fo.xml samples.xml
Date Thu, 27 Mar 2003 09:28:10 GMT
bdelacretaz    2003/03/27 01:28:10

  Added:       src/blocks/jfor/samples sitemap.xmap
               src/blocks/jfor/samples/misc minimal.fo.xml samples.xml
  Log:
  samples added for jfor block
  
  Revision  Changes    Path
  1.1                  cocoon-2.1/src/blocks/jfor/samples/sitemap.xmap
  
  Index: sitemap.xmap
  ===================================================================
  <?xml version="1.0"?>
  
  <!-- jfor block samples sitemap -->
  
  <map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
  
  <!-- =========================== Components ================================ -->
  
   <map:components>
  
  <!-- =========================== Generators ================================= -->
  
    <map:generators default="file">
  
     <map:generator label="content,data" logger="sitemap.generator.file" name="file"
                    src="org.apache.cocoon.generation.FileGenerator"/>
  
    </map:generators>
  
  <!-- =========================== Transformers ================================= -->
  
    <map:transformers default="xslt">
     <map:transformer name="xslt" src="org.apache.cocoon.transformation.TraxTransformer"
                      logger="sitemap.transformer.xsltc">
      <use-request-parameters>true</use-request-parameters>
      <use-browser-capabilities-db>false</use-browser-capabilities-db>
      <transformer-factory>org.apache.xalan.xsltc.trax.TransformerFactoryImpl</transformer-factory>
     </map:transformer>
  
     </map:transformers>
  
  <!-- =========================== Serializers ================================= -->
  
    <map:serializers default="html">
     <map:serializer 
     			name="fo2rtf" src="org.apache.cocoon.serialization.RTFSerializer"
              logger="sitemap.serializer.rtf">
     </map:serializer>
     
     <map:serializer logger="sitemap.serializer.xml" mime-type="text/xml" name="xml"
                     src="org.apache.cocoon.serialization.XMLSerializer">
      <indent>yes</indent>
     </map:serializer>
  
     <map:serializer logger="sitemap.serializer.html" mime-type="text/html" name="html"

                     src="org.apache.cocoon.serialization.HTMLSerializer">
      <buffer-size>1024</buffer-size>
     </map:serializer>
  
     <map:serializer logger="sitemap.serializer.links" name="links"
                     src="org.apache.cocoon.serialization.LinkSerializer"/>
  
    </map:serializers>
  
  <!-- =========================== Readers ================================= -->
  
    <map:readers default="resource">
     <map:reader logger="sitemap.reader.resource" name="resource" 
                  src="org.apache.cocoon.reading.ResourceReader"/>
    </map:readers>
  
  <!-- =========================== Matchers ================================= -->
  
    <map:matchers default="wildcard">
     <map:matcher logger="sitemap.matcher.wildcard" name="wildcard"
                  src="org.apache.cocoon.matching.WildcardURIMatcher"/>
    </map:matchers>
  
  <!-- ====================== Pipelines defintions ============================= -->
  
    <map:pipes default="caching">
     <map:pipe name="caching"    src="org.apache.cocoon.components.pipeline.impl.CachingProcessingPipeline"/>
     <map:pipe name="noncaching" src="org.apache.cocoon.components.pipeline.impl.NonCachingProcessingPipeline"/>
     
    </map:pipes>
  
   </map:components>
  
  <!-- =========================== Views =================================== -->
  
   <map:views>
    <map:view from-label="content" name="content">
     <map:serialize type="xml"/>
    </map:view>
  
    <map:view from-position="last" name="links">
     <map:serialize type="links"/>
    </map:view>
  
   </map:views>
  
  <!-- =========================== Pipelines ================================= -->
  
   <map:pipelines>
  
    <map:pipeline type="caching">  
     <map:match pattern="">
      <map:redirect-to uri="welcome"/>
     </map:match>
     
     <map:match pattern="welcome">
      <map:generate src="misc/samples.xml"/>
      <map:transform src="context://samples/common/style/xsl/html/simple-samples2html.xsl">
         <map:parameter name="contextPath" value="{request:contextPath}"/>
      </map:transform>
      <map:serialize/>
     </map:match>
  
     <!-- ========================= jfor ================================ -->
  
     <map:match pattern="*.fo.xml">
      <map:generate src="misc/{1}.fo.xml"/>
      <map:serialize type="xml"/>
     </map:match>
  
     <map:match pattern="*.rtf">
      <map:generate src="cocoon:/{1}.fo.xml"/>
      <map:serialize type="fo2rtf"/>
     </map:match>
  
     <map:match pattern="*.css">
      <map:read src="misc/{1}.css"/>
     </map:match>
  
     <map:match pattern="**/*.css">
      <map:read src="misc/{2}.css"/>
     </map:match>
  
    </map:pipeline>
  
   </map:pipelines>
  
  </map:sitemap>
  
  
  
  1.1                  cocoon-2.1/src/blocks/jfor/samples/misc/minimal.fo.xml
  
  Index: minimal.fo.xml
  ===================================================================
  <?xml version="1.0" encoding="utf-8"?>
  
  <!-- example for a simple fo file. At the beginning the page layout is set. 
    Below fo:root there is always 
  - a single fo:layout-master-set which defines one or more page layouts
  - an optional fo:declarations 
  - and a sequence of one or more fo:page-sequences containing the text and formatting instructions

  -->
  
  <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
      <fo:layout-master-set>
          <fo:simple-page-master master-name="simple"
                    page-height="29.7cm" 
                    page-width="21cm"
                    margin-top="1cm" 
                    margin-bottom="2cm" 
                    margin-left="2.5cm" 
                    margin-right="2.5cm">
              <fo:region-body margin-top="3cm"/>
              <fo:region-before extent="3cm"/>
              <fo:region-after extent="1.5cm"/>
          </fo:simple-page-master>
      </fo:layout-master-set>
  
  
      <fo:page-sequence master-name="simple">
          <fo:flow flow-name="xsl-region-body">
              <fo:block>
              If you see this in an RTF document, it means it was successfully converted from
xsl:fo to RTF.
              If converted by jfor, a document property called jforVersion tells you the version
of jfor used for conversion
              </fo:block>
          </fo:flow>
      </fo:page-sequence>
  </fo:root>
  
  
  
  1.1                  cocoon-2.1/src/blocks/jfor/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="Simple jfor example">
    <sample name="XSL-FO document" href="minimal.fo.xml">
    	Source document used by jfor in the next example.
    </sample>
   <sample name="RTF output" href="minimal.rtf">
    	RTF version of the above document
    </sample>
    </group>
  
   <group name="Resources">
   <sample name="jfor web site" href="http://www.jfor.org/">
     Links and reference information
    </sample>
   </group>
  
  </samples>
  
  
  
  

Mime
View raw message