cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dani...@apache.org
Subject svn commit: r493778 - in /cocoon/trunk/core: cocoon-core/src/main/resources/META-INF/cocoon/avalon/ cocoon-pipeline/cocoon-pipeline-components/src/main/resources/META-INF/cocoon/spring/
Date Sun, 07 Jan 2007 17:34:17 GMT
Author: danielf
Date: Sun Jan  7 09:34:15 2007
New Revision: 493778

URL: http://svn.apache.org/viewvc?view=rev&rev=493778
Log:
Switched to Spring configurations for [Text|HTML|XML]Serializer. Using the new pipeline:compoonent
decorator for mime types.

Added:
    cocoon/trunk/core/cocoon-pipeline/cocoon-pipeline-components/src/main/resources/META-INF/cocoon/spring/cocoon-core-serializers.xml
      - copied, changed from r493088, cocoon/trunk/core/cocoon-pipeline/cocoon-pipeline-components/src/main/resources/META-INF/cocoon/spring/cocoon-core-serializers.notyet
Removed:
    cocoon/trunk/core/cocoon-pipeline/cocoon-pipeline-components/src/main/resources/META-INF/cocoon/spring/cocoon-core-serializers.notyet
Modified:
    cocoon/trunk/core/cocoon-core/src/main/resources/META-INF/cocoon/avalon/cocoon-core-sitemapcomponents.xconf

Modified: cocoon/trunk/core/cocoon-core/src/main/resources/META-INF/cocoon/avalon/cocoon-core-sitemapcomponents.xconf
URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-core/src/main/resources/META-INF/cocoon/avalon/cocoon-core-sitemapcomponents.xconf?view=diff&rev=493778&r1=493777&r2=493778
==============================================================================
--- cocoon/trunk/core/cocoon-core/src/main/resources/META-INF/cocoon/avalon/cocoon-core-sitemapcomponents.xconf
(original)
+++ cocoon/trunk/core/cocoon-core/src/main/resources/META-INF/cocoon/avalon/cocoon-core-sitemapcomponents.xconf
Sun Jan  7 09:34:15 2007
@@ -129,67 +129,12 @@
      +-->
  <map:serializers default="html">
    <map:serializer logger="sitemap.serializer.links" name="links" src="org.apache.cocoon.serialization.LinkSerializer"/>
-   <map:serializer logger="sitemap.serializer.xml" mime-type="text/xml" name="xml" src="org.apache.cocoon.serialization.XMLSerializer"/>
 
-   <map:serializer logger="sitemap.serializer.html" mime-type="text/html" name="html"
pool-max="32" src="org.apache.cocoon.serialization.HTMLSerializer">
-     <doctype-public>-//W3C//DTD HTML 4.01 Transitional//EN</doctype-public>
-     <doctype-system>http://www.w3.org/TR/html4/loose.dtd</doctype-system>
-   </map:serializer>
-
-   <map:serializer logger="sitemap.serializer.wml" mime-type="text/vnd.wap.wml" name="wml"
src="org.apache.cocoon.serialization.XMLSerializer">
-    <doctype-public>-//WAPFORUM//DTD WML 1.1//EN</doctype-public>
-    <doctype-system>http://www.wapforum.org/DTD/wml_1.1.xml</doctype-system>
-    <encoding>ASCII</encoding>
-    <omit-xml-declaration>yes</omit-xml-declaration>
-   </map:serializer>
-
-   <map:serializer logger="sitemap.serializer.chtml" mime-type="text/html" name="chtml"
src="org.apache.cocoon.serialization.HTMLSerializer">
-    <!--+
-        | Compact HTML for Small Information Appliances,
-        | based on http://www.w3.org/TR/1998/NOTE-compactHTML-19980209/
-        + -->
-    <doctype-public>-//W3C//DTD Compact HTML 1.0 Draft//EN</doctype-public>
-   </map:serializer>
-
-   <map:serializer logger="sitemap.serializer.svgxml" mime-type="image/svg+xml" name="svgxml"
src="org.apache.cocoon.serialization.XMLSerializer">
-    <doctype-public>-//W3C//DTD SVG 1.0//EN</doctype-public>
-    <doctype-system>http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd</doctype-system>
-   </map:serializer>
-
-   <map:serializer logger="sitemap.serializer.xhtml" mime-type="text/html" name="xhtml"
pool-max="64" src="org.apache.cocoon.serialization.XMLSerializer">
-     <!--+
-         | You can choose from Strict, Transitional, or Frameset XHTML.
-         | For Strict XHTML set doctype to:
-         |   <doctype-public>-//W3C//DTD XHTML 1.0 Strict//EN</doctype-public>
-         |   <doctype-system>http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd</doctype-system>
-         | For Transitional XHTML set doctype to:
-         |   <doctype-public>-//W3C//DTD XHTML 1.0 Transitional//EN</doctype-public>
-         |   <doctype-system>http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd</doctype-system>
-         | For Frameset XHTML set doctype to:
-         |   <doctype-public>-//W3C//DTD XHTML 1.0 Frameset//EN</doctype-public>
-         |   <doctype-system>http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd</doctype-system>
-         |
-         | Default XHTML doctype in Cocoon is XHTML Strict. If you want to use more than
one
-         | XHTML DTD simultaneously, you can define several XHTML serializers.
-         +-->
-     <doctype-public>-//W3C//DTD XHTML 1.0 Strict//EN</doctype-public>
-     <doctype-system>http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd</doctype-system>
-     <encoding>UTF-8</encoding>
-   </map:serializer>
-
-   <map:serializer logger="sitemap.serializer.xhtml" mime-type="application/xhtml+xml"
name="xhtml11" pool-max="64" src="org.apache.cocoon.serialization.XMLSerializer">
-     <doctype-public>-//W3C//DTD XHTML 1.1//EN</doctype-public>
-     <doctype-system>http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd</doctype-system>
-     <encoding>UTF-8</encoding>
-   </map:serializer>
-
-   <map:serializer logger="sitemap.serializer.text" mime-type="text/plain" name="text"
src="org.apache.cocoon.serialization.TextSerializer"/>
    <map:serializer logger="sitemap.serializer.zip"  mime-type="application/zip" name="zip"
src="org.apache.cocoon.serialization.ZipArchiveSerializer"/>
    <map:serializer logger="sitemap.serializer.sxw"  mime-type="application/vnd.sun.xml.writer"
name="sxw" src="org.apache.cocoon.serialization.ZipArchiveSerializer"/>
    <map:serializer logger="sitemap.serializer.sxc"  mime-type="application/vnd.sun.xml.calc"
name="sxc" src="org.apache.cocoon.serialization.ZipArchiveSerializer"/>
    <map:serializer logger="sitemap.serializer.sxd"  mime-type="application/vnd.sun.xml.draw"
name="sxd" src="org.apache.cocoon.serialization.ZipArchiveSerializer"/>
    <map:serializer logger="sitemap.serializer.sxi"  mime-type="application/vnd.sun.xml.impress"
name="sxi" src="org.apache.cocoon.serialization.ZipArchiveSerializer"/>
-   <map:serializer logger="sitemap.serializer.vrml" mime-type="model/vrml" name="vrml"
src="org.apache.cocoon.serialization.TextSerializer"/>
  </map:serializers>
 
 

Copied: cocoon/trunk/core/cocoon-pipeline/cocoon-pipeline-components/src/main/resources/META-INF/cocoon/spring/cocoon-core-serializers.xml
(from r493088, cocoon/trunk/core/cocoon-pipeline/cocoon-pipeline-components/src/main/resources/META-INF/cocoon/spring/cocoon-core-serializers.notyet)
URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-pipeline/cocoon-pipeline-components/src/main/resources/META-INF/cocoon/spring/cocoon-core-serializers.xml?view=diff&rev=493778&p1=cocoon/trunk/core/cocoon-pipeline/cocoon-pipeline-components/src/main/resources/META-INF/cocoon/spring/cocoon-core-serializers.notyet&r1=493088&p2=cocoon/trunk/core/cocoon-pipeline/cocoon-pipeline-components/src/main/resources/META-INF/cocoon/spring/cocoon-core-serializers.xml&r2=493778
==============================================================================
--- cocoon/trunk/core/cocoon-pipeline/cocoon-pipeline-components/src/main/resources/META-INF/cocoon/spring/cocoon-core-serializers.notyet
(original)
+++ cocoon/trunk/core/cocoon-pipeline/cocoon-pipeline-components/src/main/resources/META-INF/cocoon/spring/cocoon-core-serializers.xml
Sun Jan  7 09:34:15 2007
@@ -1,6 +1,4 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN 2.0//EN"
-    "http://www.springframework.org/dtd/spring-beans-2.0.dtd">
 <!--
   Licensed to the Apache Software Foundation (ASF) under one or more
   contributor license agreements.  See the NOTICE file distributed with
@@ -23,11 +21,13 @@
 <!--+
     | Serializers consume SAX events and produce a character stream. Every
     | pipeline needs to be terminated by a serializer.
-    |
-    | FIXME: this configuration file is not complete yet, it still lacks a mechanism for
-    | setting the mime-type of the serializers.
     +-->
-<beans default-init-method="init">
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xmlns:pipeline="http://cocoon.apache.org/schema/pipeline"
+       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
+                           http://cocoon.apache.org/schema/pipeline http://cocoon.apache.org/schema/pipeline/cocoon-pipeline-1.0.xsd"
+       default-init-method="init">
 
   <!-- Abstract parent bean that sets the default encoding from the settings bean -->
   <bean name="org.apache.cocoon.serialization.AbstractTextSerializer" class="org.apache.cocoon.serialization.AbstractTextSerializer"
abstract="true">
@@ -39,13 +39,14 @@
     </property>
   </bean>
 
-  <!-- mime-type="text/xml" -->
   <bean name="org.apache.cocoon.serialization.Serializer/xml" class="org.apache.cocoon.serialization.XMLSerializer"
-        scope="prototype" parent="org.apache.cocoon.serialization.AbstractTextSerializer"/>
+        scope="prototype" parent="org.apache.cocoon.serialization.AbstractTextSerializer">
+    <pipeline:component mime-type="text/xml"/>
+  </bean>
 
-  <!-- mime-type="text/html" -->
   <bean name="org.apache.cocoon.serialization.Serializer/html" class="org.apache.cocoon.serialization.HTMLSerializer"
         scope="prototype" parent="org.apache.cocoon.serialization.AbstractTextSerializer">
+    <pipeline:component mime-type="text/html"/>
 	<property name="format">
 	  <props>
 	    <prop key="doctype-public">-//W3C//DTD HTML 4.01 Transitional//EN</prop>
@@ -54,9 +55,9 @@
 	</property>
   </bean>
 
-  <!-- mime-type="text/vnd.wap.wml" -->
   <bean name="org.apache.cocoon.serialization.Serializer/wml" class="org.apache.cocoon.serialization.XMLSerializer"
         scope="prototype" parent="org.apache.cocoon.serialization.AbstractTextSerializer">
+    <pipeline:component mime-type="text/vnd.wap.wml"/>
 	<property name="format">
 	  <props>
 	    <prop key="doctype-public">-//WAPFORUM//DTD WML 1.1//EN</prop>
@@ -71,9 +72,9 @@
       | Compact HTML for Small Information Appliances,
       | based on http://www.w3.org/TR/1998/NOTE-compactHTML-19980209/
       + -->
-  <!-- mime-type="text/html" -->
   <bean name="org.apache.cocoon.serialization.Serializer/chtml" class="org.apache.cocoon.serialization.HTMLSerializer"
         scope="prototype" parent="org.apache.cocoon.serialization.AbstractTextSerializer">
+    <pipeline:component mime-type="text/html"/>
 	<property name="format">
 	  <props>
 	    <prop key="doctype-public">-//W3C//DTD Compact HTML 1.0 Draft//EN</prop>
@@ -81,9 +82,9 @@
 	</property>
   </bean>
 
-  <!-- mime-type="image/svg+xml" -->
   <bean name="org.apache.cocoon.serialization.Serializer/svgxml" class="org.apache.cocoon.serialization.XMLSerializer"
         scope="prototype" parent="org.apache.cocoon.serialization.AbstractTextSerializer">
+    <pipeline:component mime-type="image/svg+xml"/>
 	<property name="format">
 	  <props>
 	    <prop key="doctype-public">-//W3C//DTD SVG 1.0//EN</prop>
@@ -107,9 +108,9 @@
       | Default XHTML doctype in Cocoon is XHTML Strict. If you want to use more than one
       | XHTML DTD simultaneously, you can define several XHTML serializers.
       +-->
-  <!-- mime-type="text/html" -->
   <bean name="org.apache.cocoon.serialization.Serializer/xhtml" class="org.apache.cocoon.serialization.XMLSerializer"
         scope="prototype" parent="org.apache.cocoon.serialization.AbstractTextSerializer">
+    <pipeline:component mime-type="text/html"/>
 	<property name="format">
 	  <props>
 	    <prop key="doctype-public">-//W3C//DTD XHTML 1.0 Strict//EN</prop>
@@ -119,9 +120,9 @@
 	</property>
   </bean>
 
-  <!-- mime-type="application/xhtml+xml" -->
   <bean name="org.apache.cocoon.serialization.Serializer/xhtml11" class="org.apache.cocoon.serialization.XMLSerializer"
         scope="prototype" parent="org.apache.cocoon.serialization.AbstractTextSerializer">
+    <pipeline:component mime-type="application/xhtml+xml"/>
 	<property name="format">
 	  <props>
 	    <prop key="doctype-public">-//W3C//DTD XHTML 1.1//EN</prop>
@@ -131,11 +132,13 @@
 	</property>
   </bean>
 
-  <!-- mime-type="text/plain" -->
   <bean name="org.apache.cocoon.serialization.Serializer/text" class="org.apache.cocoon.serialization.TextSerializer"
-        scope="prototype" parent="org.apache.cocoon.serialization.AbstractTextSerializer"/>
+        scope="prototype" parent="org.apache.cocoon.serialization.AbstractTextSerializer">
+    <pipeline:component mime-type="text/plain"/>
+  </bean>
 
-  <!-- mime-type="model/vrml" -->
   <bean name="org.apache.cocoon.serialization.Serializer/vrml" class="org.apache.cocoon.serialization.TextSerializer"
-        scope="prototype" parent="org.apache.cocoon.serialization.AbstractTextSerializer"/>
+        scope="prototype" parent="org.apache.cocoon.serialization.AbstractTextSerializer">
+    <pipeline:component mime-type="model/vrml"/>
+  </bean>
 </beans>



Mime
View raw message