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/fop/samples/misc minimal.fo.xml samples.xml
Date Thu, 01 May 2003 11:23:27 GMT
bdelacretaz    2003/05/01 04:23:27

  Added:       src/blocks/fop/conf fop.xsamples
               src/blocks/fop/samples sitemap.xmap
               src/blocks/fop/samples/misc minimal.fo.xml samples.xml
  Removed:     src/blocks/fop/samples readme.fo
  Log:
  FOP samples page resurrected with minimal XSL-FO example
  
  Revision  Changes    Path
  1.1                  cocoon-2.1/src/blocks/fop/conf/fop.xsamples
  
  Index: fop.xsamples
  ===================================================================
  <?xml version="1.0"?>
  
  <!-- make FOP samples appear in the samples page -->
  
  <xsamples xpath="/samples" unless="group[@name='fop']">
  
      <group name="fop">
          <sample name="FOP PDF serializer" href="fop/">
              Examples of PDF document generation.
          </sample>
      </group>
  
  </xsamples>
  
  
  
  1.1                  cocoon-2.1/src/blocks/fop/samples/sitemap.xmap
  
  Index: sitemap.xmap
  ===================================================================
  <?xml version="1.0"?>
  
  <!-- FOP 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="fo2pdf" src="org.apache.cocoon.serialization.FOPSerializer"
                  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>
  
              <!-- ========================= FOP ================================ -->
  
              <map:match pattern="**/*.fo.xml">
                  <map:generate src="{1}/{2}.fo.xml"/>
                  <map:serialize type="xml"/>
              </map:match>
  
              <map:match pattern="**/*.pdf">
                  <map:generate src="cocoon:/{1}/{2}.fo.xml"/>
                  <map:serialize type="fo2pdf"/>
              </map:match>
  
          </map:pipeline>
  
      </map:pipelines>
  
  </map:sitemap>
  
  
  
  1.1                  cocoon-2.1/src/blocks/fop/samples/misc/minimal.fo.xml
  
  Index: minimal.fo.xml
  ===================================================================
  <?xml version="1.0" encoding="utf-8"?>
  
  <!--  minimal FOP example for Cocoon -->
  
  <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
      <fo:layout-master-set>
  
          <!-- layout for all pages -->
          <fo:simple-page-master master-name="main"
              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>
  
      <!-- content -->
      <fo:page-sequence master-reference="main">
  
          <fo:flow flow-name="xsl-region-body">
              <fo:block font-size="18pt">
                  Congratulations!
              </fo:block>
              <fo:block font-size="12pt">
                  If you see this in a PDF document, it means that Cocoon and FOP
                  were able to generate it from the minimal.fo.xml example document.
              </fo:block>
          </fo:flow>
      </fo:page-sequence>
  </fo:root>
  
  
  1.1                  cocoon-2.1/src/blocks/fop/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="Minimal FOP example">
          <sample name="XSL-FO document" href="misc/minimal.fo.xml">
              Source document used by FOP in the next example.
          </sample>
          <sample name="PDF output" href="misc/minimal.pdf">
              PDF version of the above document
          </sample>
      </group>
  
      <group name="Resources">
          <sample name="FOP web site" href="http://xml.apache.org/fop">
              FOP reference information
          </sample>
      </group>
  
  </samples>
  
  
  
  

Mime
View raw message