nicolaken    02/03/18 11:21:42

  Modified:    .        build.xml
               src/webapp sitemap.xmap
  Added:       src/webapp/samples samples.xml sitemap.xmap
  Removed:     src/webapp cocoon.xconf
  Log:
  Partial commit of new samples structure.
  Samples go in samples/ dir with theit own sitemap.
  All scratchpad samples that are in the samples/ subdir are copied in webapp samples 
automatically by installscratchpadwar target.
  cocoon.xconf is moved in WEB-INF for security reasons.
  Added new "gump" target to build; it calls docs, javadocs, test and package.
  
  Revision  Changes    Path
  1.187     +9 -5      xml-cocoon2/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/build.xml,v
  retrieving revision 1.186
  retrieving revision 1.187
  diff -u -r1.186 -r1.187
  --- build.xml 18 Mar 2002 12:02:59 -0000      1.186
  +++ build.xml 18 Mar 2002 19:21:41 -0000      1.187
  @@ -946,7 +946,11 @@
       </jar>
     </target>
   
  -
  +  <!-- =================================================================== -->
  +  <!-- Target called by Gump                                                -->
  +  <!-- =================================================================== -->
  +  <target name="gump" depends="docs, javadocs, test, package" description="Gump 
target"/>
  +  
     <!-- =================================================================== -->
     <!-- Prepares the docs                                                   -->
     <!-- =================================================================== -->
  @@ -1105,7 +1109,7 @@
   
         <xconf-tool directory="${build.src}"
                     extension="xconf"
  -                  configuration="${build.war}/cocoon.xconf"/>
  +                  configuration="${build.war}/WEB-INF/cocoon.xconf"/>
     </target>
   
     <!-- =================================================================== -->
  @@ -1123,7 +1127,7 @@
   
         <xconf-tool directory="${build.scratchpad.src}"
                     extension="xconf"
  -                  configuration="${build.war}/cocoon.xconf"/>
  +                  configuration="${build.war}/WEB-INF/3cocoon.xconf"/>
     </target>
   
     <!-- =================================================================== -->
  @@ -1131,7 +1135,7 @@
     <!-- =================================================================== -->
     <target name="prepare-xsp" depends="package" if="build.precompile">
       <java classname="org.apache.cocoon.Main" fork="yes" failonerror="true">
  -      <arg line="-P -C ${build.war}/cocoon.xconf -w ${build.war}/WEB-INF/classes -c 
${build.war}" />
  +      <arg line="-P -C ${build.war}/WEB-INF/cocoon.xconf -w 
${build.war}/WEB-INF/classes -c ${build.war}" />
         <classpath>
           <fileset dir="lib/core">
             <include name="**/*.jar"/>
  @@ -1469,7 +1473,7 @@
       </copy>
   
       <!-- Fix for web.xml, cocoon.xconf and sitemap.xmap -->
  -    <copy file="${webapp.dir}/cocoon.xconf" 
tofile="${dist.src.dir}/src/webapp/cocoon.xconf" filtering="off" overwrite="yes"/>
  +    <copy file="${webapp.dir}/WEB-INF/cocoon.xconf" 
tofile="${dist.src.dir}/src/webapp/WEB-INF/cocoon.xconf" filtering="off" 
overwrite="yes"/>
       <copy file="${webapp.dir}/sitemap.xmap" 
tofile="${dist.src.dir}/src/webapp/sitemap.xmap" filtering="off" overwrite="yes"/>
       <copy file="${webapp.dir}/WEB-INF/web.xml" 
tofile="${dist.src.dir}/src/webapp/WEB-INF/web.xml" filtering="off" overwrite="yes"/>
   
  
  
  
  1.44      +10 -5     xml-cocoon2/src/webapp/sitemap.xmap
  
  Index: sitemap.xmap
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/webapp/sitemap.xmap,v
  retrieving revision 1.43
  retrieving revision 1.44
  diff -u -r1.43 -r1.44
  --- sitemap.xmap      15 Mar 2002 11:47:56 -0000      1.43
  +++ sitemap.xmap      18 Mar 2002 19:21:41 -0000      1.44
  @@ -606,15 +606,20 @@
       </map:match>
   
       <!-- mount other sample pages -->
  -    <map:match pattern="samples/*/**">
  -      <map:mount uri-prefix="samples/{1}" src="samples/{1}/" check-reload="yes"/>
  +    <map:match pattern="samples/**">
  +      <map:mount check-reload="yes" src="samples/" uri-prefix="samples"/>
       </map:match>   
     </map:pipeline>
   
     <!-- main samples pipeline -->
     <map:pipeline>   
       <map:match pattern="">
  -      <map:redirect-to uri="welcome"/>
  +      <map:generate src="welcome/welcome.xhtml"/>
  +      <map:serialize/>      
  +    </map:match>
  +
  +    <map:match pattern="cocoon.gif">
  +      <map:read mime-type="image/gif" src="welcome/cocoon.gif"/>
       </map:match>
   
      <map:match pattern="welcome">
  @@ -1188,8 +1193,8 @@
      </map:match>
   
      <map:match pattern="status">
  -    <map:generate type="status" src="status"/>
  -    <map:transform src="stylesheets/system/status2html.xsl"/>
  +    <map:generate src="status" type="status"/>
  +    <map:transform src="welcome/status2html.xsl"/>
       <map:serialize/>
      </map:match>
   
  
  
  
  1.1                  xml-cocoon2/src/webapp/samples/samples.xml
  
  Index: samples.xml
  ===================================================================
  <?xml version="1.0" encoding="iso-8859-1"?>
  
  <!-- CVS: $Id: samples.xml,v 1.1 2002/03/18 19:21:41 nicolaken Exp $ -->
  
  <samples xmlns:xlink="http://www.w3.org/1999/xlink";>
  
   <group name="Hello World!">
     <sample name="XML" href="hello-world/hello.html.source">
      A simple XML page source.
     </sample>
     <sample name="HTML" href="hello-world/hello.html">
      This is a very simple demonstration of how to use Cocoon. A simple XML page
      is transformed into an HTML page.
     </sample>
     <sample name="XHTML" href="hello-world/hello.xhtml">
      Here it's outputted as XHTML.
     </sample>
     <sample name="TEXT" href="hello-world/hello.txt">
      The XML page is transformed into a plain text page.  
     </sample>   
     <sample name="WML" href="hello-world/hello.wml">
      Now something more juicy: the exact same page is translated into WAP WML.
     </sample>
     <sample name="VoxML" href="hello-world/hello.vml">
      Maybe you have your hands busy? with VoxML you don't need hands, just your voice.
     </sample>
     <sample name="SVG" href="hello-world/hello.svg">
      Need a fancier look? No problem, SVG is your friend.
     </sample>
     <sample name="SVG JPEG" href="hello-world/hello.jpg">
      Need a fancier look but don't have an SVG browser? SVG is served as JPEG by 
Cocoon.
     </sample>
     <sample name="VRML" href="hello-world/hello.wrl">
      Need more space? Well, not really useful in this case, but VRML may come handy.
     </sample>
     <sample name="PDF" href="hello-world/hello.pdf">
      Printed HTML sucks? Don't worry, your friend Cocoon gives you a nice PDF.
     </sample>
     <sample name="PS" href="hello-world/hello.ps">
      You prefer postscript? No problem, here it is!
     </sample>   
     <sample name="XLS" href="hello-world/hello.xls">
      Still stuck with legacy file formats? Don't worry, here is an example.
     </sample>
    </group>
  
    <group name="System Tools And Pages">
     <!-- sample name="Sitemap Editor" href="sitebuilder/openSubSite/">
      Cocoon/JSP based Sitemap Editor.
     </sample -->
     <sample name="Status Page" href="../status">
      Cocoon status page.
     </sample>
     <sample name="Request Page" href="system/request.html">
      This example shows the usage of the RequestGenerator.
     </sample>
     <sample name="Error Page" href="system/generror.html">
      This example shows what happens if an error is triggered in the pipeline.
     </sample>
    </group>
    
    <group name="Documentation">
     <sample name="Docs" href="../documents/index">
      The Cocoon documentation.
     </sample>
     <sample name="Tutorial" href="tutorial/home.html">
      A tutorial on Cocoon.
     </sample>
     <sample name="List of docs" href="../documents/doclist.html">
      Generated list of all documentation (aggregates each book.xml)
     </sample>
     <sample name="Slides" href="slides/slides">
      Presentation of Cocoon 1 shown at ApacheCon 2000. (Example of complex XSLT usage)
     </sample>
     <sample name="Search the docs" href="../search/welcome">
      Search into the cocoon documentation using Apache Lucene.
     </sample>
    </group>
    
    <group name="More Samples">
     <sample name="Static Content" href="sample-static">
      How to produce different type of static content.
     </sample>
  
     <sample name="Server Pages" href="sample-xsp">
      Dynamic content implemented in XSP pages.
     </sample>
  
     <sample name="Dynamic Content" href="sample-dynamic">
      More ways of implementing dynamic content.
     </sample>
  
     <sample name="Portal &amp; Authentication" href="sunspotdemoportal">
      A customizable Portal with Cocoon. In order to run this
      sample, you have to build the Cocoon webapp with the "-Dinclude.scratchpad.libs"
      option.
     </sample>
  
     <sample name="Sources" href="sub/">
      Samples showing possible ways how to use Cocoon sources in sitemap.
      (These samples are served by sub-sitemap)
     </sample>
  
     <sample name="Web Applications" href="sample-apps">
      Samples showing how to perform form processing, state management,
      and simple web-application with login and protected resources.
     </sample>
     
     <sample name="Legacy file formats" href="samples/poi/">
      Samples showing how to use Apache POI to use common office file formats
      with Cocoon.
     </sample>
     
    </group>
    
    <group name="Scratchpad samples">
     <sample name="Try Scratchpad" href="scratchpad">
      Here is a peek of what the next release of Cocoon will bring.
      To test these samples, you mus have built cocoon with "build (sh|bat) 
installscratchpadwar".
     </sample>
   </group>
   
  </samples>
  
  
  
  1.1                  xml-cocoon2/src/webapp/samples/sitemap.xmap
  
  Index: sitemap.xmap
  ===================================================================
  <?xml version="1.0"?>
  
  <map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0";>
  <!-- =========================== Components ================================ -->
  
   <map:components>
  
    <map:matchers default="wildcard"/>
    <map:selectors default="browser"/>
    <!-- <map:actions/> -->
    
    <map:generators default="file" label="content"/>
    <map:transformers default="xslt"/>
    <map:readers default="resource"/>
    <map:serializers default="html"/>
  
   </map:components>
  
  <!-- =========================== Views =================================== -->
  
  <!--
    Views provide diffent, well, views to resources. Views are
    orthogonal to pipelines. Please refer to the docs.
  -->
   <map:views>
    <map:view name="content" from-label="content">
     <map:serialize type="xml"/>
    </map:view>
  
    <map:view name="pretty-content" from-label="data">
      <map:transform src="common/style/xsl/html/simple-xml2html.xsl"/>
      <map:serialize type="html"/>
    </map:view>
    
    <map:view name="links" from-position="last">
     <map:serialize type="links"/>
    </map:view>
  
   </map:views>
  
  <!-- =========================== Pipelines ================================= -->
  
   <map:pipelines>
    <map:pipeline>
  
     <map:match pattern="welcome">
      <map:generate src="samples.xml"/>
      <map:transform src="common/style/xsl/html/simple-samples2html.xsl"/>
      <map:serialize/>
     </map:match>
    
     <!-- ========================= Server ================================ -->
  
     <map:match pattern="**favicon.ico">
      <map:read src="common/resources/icons/cocoon.ico" mime-type="application/ico"/>
     </map:match>
     
     <!-- ================== Common ======================= -->
     <map:match pattern="*.css">
      <map:read src="common/style/css/{1}.css" mime-type="text/css"/>
     </map:match>
  
     <map:match pattern="images/*.gif">
      <map:read src="common/resources/images/{1}.gif" mime-type="image/gif"/>
     </map:match>
  
     <map:match pattern="images/*.jpg">
      <map:read src="common/resources/images/{1}.jpg" mime-type="image/jpg"/>
     </map:match>
  
     <map:match pattern="images/*.png">
      <map:read src="common/resources/images/{1}.png" mime-type="image/png"/>
     </map:match>
     
     <!-- ================== Each ======================= -->
     <map:match pattern="*/**.css">
      <map:read src="{1}/style/css/{2}.css" mime-type="text/css"/>
     </map:match>
  
     <map:match pattern="*/images/**.gif">
      <map:read src="{1}/resources/images/{2}.gif" mime-type="image/gif"/>
     </map:match>
  
     <map:match pattern="*/images/**.jpg">
      <map:read src="{1}/resources/images/{2}.jpg" mime-type="image/jpg"/>
     </map:match>
  
     <map:match pattern="*/images/**.png">
      <map:read src="{1}/resources/images/{2}.png" mime-type="image/png"/>
     </map:match>
     <!-- ======================== Samples =============================== -->
     
     <!-- samples automount -->  
     <map:match pattern="*/**">
       <map:mount uri-prefix="{1}" src="{1}/" check-reload="yes"/>
     </map:match>
          
     <map:handle-errors>
      <map:transform src="common/style/xsl/html/error2html.xsl"/>
      <map:serialize type="html" status-code="500"/>
     </map:handle-errors>
  
    </map:pipeline>
   </map:pipelines>
  
  </map:sitemap>
  
  <!-- end of file -->
  
  
  

----------------------------------------------------------------------
In case of troubles, e-mail:     [EMAIL PROTECTED]
To unsubscribe, e-mail:          [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to