Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

COCOON-2222

Add SaxParser configuration properties

Reporter/Patch provider: Robin Wyles 

Thank you robin and sorry we took so long to apply the patch


git-svn-id: https://svn.apache.org/repos/asf/cocoon/trunk@1381963 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information...
commit 0bd68713e2449e795e2c1dc9bca0ca768ec812b4 1 parent 28e1ac8
@scherler scherler authored
View
44 .../cocoon-xml-impl/src/main/resources/META-INF/cocoon/properties/cocoon-xml-impl.properties
@@ -0,0 +1,44 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# - 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.
+org.apache.cocoon.core.xml.SAXParser/validate=false
+
+# - 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).
+org.apache.cocoon.core.xml.SAXParser/nsPrefixes=false
+
+#- stopOnWarning (boolean, default = false) : should the parser
+# stop parsing if a warning occurs ?
+org.apache.cocoon.core.xml.SAXParser/stopOnWarning=false
+
+#- stopOnRecoverableError (boolean, default = false) : should the
+# parser stop parsing if a recoverable error occurs ?
+org.apache.cocoon.core.xml.SAXParser/stopOnRecoverableError=false
+
+#- 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.
+#org.apache.cocoon.core.xml.SAXParser/saxParserFactory=
View
6 .../cocoon-xml/cocoon-xml-impl/src/main/resources/META-INF/cocoon/spring/cocoon-xml-impl.xml
@@ -76,6 +76,10 @@
+-->
<bean name="org.apache.cocoon.core.xml.SAXParser"
class="org.apache.cocoon.core.xml.impl.JaxpSAXParser" scope="singleton">
- <property name="validate" value="false"/>
+ <property name="validate" value="${org.apache.cocoon.core.xml.SAXParser/validate}"/>
+ <property name="nsPrefixes" value="${org.apache.cocoon.core.xml.SAXParser/nsPrefixes}"/>
+ <property name="stopOnWarning" value="${org.apache.cocoon.core.xml.SAXParser/stopOnWarning}"/>
+ <property name="stopOnRecoverableError" value="${org.apache.cocoon.core.xml.SAXParser/stopOnRecoverableError}"/>
+<!-- <property name="saxParserFactory" value="${org.apache.cocoon.core.xml.SAXParser/saxParserFactory}"/>-->
</bean>
</beans>
Please sign in to comment.
Something went wrong with that request. Please try again.