You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by cz...@apache.org on 2006/12/25 23:06:58 UTC
svn commit: r490192 - in /cocoon/trunk/core/cocoon-xml:
cocoon-xml-impl/src/main/java/org/apache/cocoon/core/xml/impl/
cocoon-xml-impl/src/main/resources/META-INF/cocoon/spring/
cocoon-xml-resolver/src/main/resources/META-INF/cocoon/spring/
Author: cziegeler
Date: Mon Dec 25 14:06:57 2006
New Revision: 490192
URL: http://svn.apache.org/viewvc?view=rev&rev=490192
Log:
Add some comments
Modified:
cocoon/trunk/core/cocoon-xml/cocoon-xml-impl/src/main/java/org/apache/cocoon/core/xml/impl/DefaultEntityResolver.java
cocoon/trunk/core/cocoon-xml/cocoon-xml-impl/src/main/resources/META-INF/cocoon/spring/cocoon-xml-impl.xml
cocoon/trunk/core/cocoon-xml/cocoon-xml-resolver/src/main/resources/META-INF/cocoon/spring/cocoon-xml-resolver.xml
Modified: cocoon/trunk/core/cocoon-xml/cocoon-xml-impl/src/main/java/org/apache/cocoon/core/xml/impl/DefaultEntityResolver.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-xml/cocoon-xml-impl/src/main/java/org/apache/cocoon/core/xml/impl/DefaultEntityResolver.java?view=diff&rev=490192&r1=490191&r2=490192
==============================================================================
--- cocoon/trunk/core/cocoon-xml/cocoon-xml-impl/src/main/java/org/apache/cocoon/core/xml/impl/DefaultEntityResolver.java (original)
+++ cocoon/trunk/core/cocoon-xml/cocoon-xml-impl/src/main/java/org/apache/cocoon/core/xml/impl/DefaultEntityResolver.java Mon Dec 25 14:06:57 2006
@@ -23,6 +23,7 @@
import org.apache.commons.logging.LogFactory;
import org.apache.xml.resolver.CatalogManager;
import org.apache.xml.resolver.tools.CatalogResolver;
+import org.springframework.context.ResourceLoaderAware;
import org.springframework.core.io.Resource;
import org.springframework.core.io.ResourceLoader;
import org.xml.sax.EntityResolver;
@@ -44,7 +45,7 @@
* @since 2.2
*/
public class DefaultEntityResolver
- implements EntityResolver {
+ implements EntityResolver, ResourceLoaderAware {
/** By default we use the logger for this class. */
private Log logger = LogFactory.getLog(getClass());
Modified: cocoon/trunk/core/cocoon-xml/cocoon-xml-impl/src/main/resources/META-INF/cocoon/spring/cocoon-xml-impl.xml
URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-xml/cocoon-xml-impl/src/main/resources/META-INF/cocoon/spring/cocoon-xml-impl.xml?view=diff&rev=490192&r1=490191&r2=490192
==============================================================================
--- cocoon/trunk/core/cocoon-xml/cocoon-xml-impl/src/main/resources/META-INF/cocoon/spring/cocoon-xml-impl.xml (original)
+++ cocoon/trunk/core/cocoon-xml/cocoon-xml-impl/src/main/resources/META-INF/cocoon/spring/cocoon-xml-impl.xml Mon Dec 25 14:06:57 2006
@@ -20,13 +20,60 @@
<!-- @version $Id$ -->
<beans>
- <!-- The DOM Parser -->
+ <!--+
+ | DOM XML Parser
+ |
+ | Configuration parameters:
+ | - validate (boolean, default = false): should the parser validate
+ | parsed documents?
+ | Note: XML validation is only being used for the documentation build.
+ | (If you are going to use it elsewhere, then do so with caution.)
+ | You really should have validated all of your XML documents already,
+ | according to their proper DTD or schema. Do not expect Cocoon
+ | to do it.
+ | - documentBuilderFactory (string, optional) : the name of the
+ | DocumentBuilderFactory implementation to be used (similar to
+ | sax-parser-factory for DOM).
+ | - resolver
+ | An optional entity resolver.
+ +-->
<bean name="org.apache.cocoon.core.xml.DOMParser"
class="org.apache.cocoon.core.xml.impl.JaxpDOMParser">
<property name="validate" value="false"/>
</bean>
- <!-- The SAX Parser -->
+ <!--+
+ | SAX XML Parser
+ |
+ | Configuration parameters:
+ | - validate (boolean, default = false): should the parser validate
+ | parsed documents?
+ | Note: XML validation is only being used for the documentation build.
+ | (If you are going to use it elsewhere, then do so with caution.)
+ | You really should have validated all of your XML documents already,
+ | according to their proper DTD or schema. Do not expect Cocoon
+ | to do it.
+ | - nsPrefixes (boolean, default = false) : do we want
+ | namespaces declarations also as 'xmlns:' attributes?
+ | Note : setting this to true confuses some XSL processors
+ | (e.g. Saxon).
+ | - stopOnWarning (boolean, default = true) : should the parser
+ | stop parsing if a warning occurs ?
+ | - stopOnRecoverableError (boolean, default = true) : should the
+ | parser stop parsing if a recoverable error occurs ?
+ | - saxParserFactory (string, optional) : the name of the
+ | SAXParserFactory implementation class to be used instead of using
+ | the standard JAXP mechanism (SAXParserFactory.newInstance()). This
+ | allows to choose unambiguously the JAXP implementation to be used
+ | when several of them are available in the classpath.
+ | - dropDtdComments : should comment() events from DTD's be dropped?
+ | Note: Since this implementation does not support the DeclHandler
+ | interface anyway, it is quite useless to only have the comments
+ | from DTD. And the comment events from the internal DTD subset
+ | would appear in the serialized output again.
+ | - resolver
+ | An optional entity resolver.
+ +-->
<bean name="org.apache.cocoon.core.xml.SAXParser"
class="org.apache.cocoon.core.xml.impl.JaxpSAXParser">
<property name="validate" value="false"/>
Modified: cocoon/trunk/core/cocoon-xml/cocoon-xml-resolver/src/main/resources/META-INF/cocoon/spring/cocoon-xml-resolver.xml
URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-xml/cocoon-xml-resolver/src/main/resources/META-INF/cocoon/spring/cocoon-xml-resolver.xml?view=diff&rev=490192&r1=490191&r2=490192
==============================================================================
--- cocoon/trunk/core/cocoon-xml/cocoon-xml-resolver/src/main/resources/META-INF/cocoon/spring/cocoon-xml-resolver.xml (original)
+++ cocoon/trunk/core/cocoon-xml/cocoon-xml-resolver/src/main/resources/META-INF/cocoon/spring/cocoon-xml-resolver.xml Mon Dec 25 14:06:57 2006
@@ -20,9 +20,46 @@
<!-- @version $Id$ -->
<beans>
- <!-- The Entity Resolver -->
+
+ <!--+
+ | Entity resolution catalogs
+ |
+ | The default catalog is distributed at the cocoon-xml-resolver jar file
+ | and automatically extracted to a temporary directoy at runtime.
+ | The property "catalog" is automatically set to this temporary directory,
+ | therefore changing this value in the configuration has no effect!
+ |
+ | However, it is probably desirable to leave this default catalog config
+ | and declare your own local catalogs, which are loaded in addition to
+ | the system catalog.
+ |
+ | There are various ways to do local configuration (see "Entity Catalogs"
+ | documentation). You can specify the "localCatalog" property here:
+ |
+ | localCatalog:
+ | The full filesystem pathname to a single local catalog file.
+ |
+ | <property name="localCatalog" value="/usr/local/sgml/mycatalog"/>
+ |
+ | verbosity:
+ | The level of messages for status/debug (messages go to standard output)
+ | The following messages are provided ...
+ | 0 = none
+ | 1 = ? (... not sure yet)
+ | 2 = 1+, Loading catalog, Resolved public, Resolved system
+ | 3 = 2+, Catalog does not exist, resolvePublic, resolveSystem
+ | 10 = 3+, List all catalog entries when loading a catalog
+ | (Cocoon also logs the "Resolved public" messages.)
+ |
+ | <property name="verbosity" value="2"/>
+ |
+ | settings:
+ | The settings property should reference the Cocoon settings bean.
+ |
+ +-->
<bean name="org.xml.sax.EntityResolver"
class="org.apache.cocoon.core.xml.resolver.CocoonSystemResolver">
<property name="settings" ref="org.apache.cocoon.configuration.Settings"></property>
+ <property name="verbosity" value="2"/>
</bean>
</beans>