Skip to content

Commit

Permalink
Fix COCOON-1365: POST method in cinclude:includexml is broken.
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.apache.org/repos/asf/cocoon/branches/BRANCH_2_1_X@343985 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
Antonio Gallardo Rivera committed Nov 13, 2005
1 parent c1093a9 commit f1dcb10
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
14 changes: 12 additions & 2 deletions src/java/org/apache/cocoon/xml/XMLUtils.java
Expand Up @@ -18,6 +18,7 @@
import java.io.StringWriter;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Enumeration;
import java.util.Iterator;
import java.util.Properties;

Expand Down Expand Up @@ -133,7 +134,7 @@ public static XMLConsumer getConsumer(ContentHandler ch, LexicalHandler lh) {
if (ch instanceof XMLConsumer) {
return (XMLConsumer)ch;
} else {
if ( lh == null && ch instanceof LexicalHandler ) {
if (lh == null && ch instanceof LexicalHandler) {
lh = (LexicalHandler)ch;
}
return new ContentHandlerWrapper(ch, lh);
Expand Down Expand Up @@ -214,7 +215,16 @@ private static Properties createDefaultPropertiesForXML(boolean omitXMLDeclarati
* </ul>
*/
public static Properties createPropertiesForXML(boolean omitXMLDeclaration) {
return new Properties(omitXMLDeclaration? XML_FORMAT_NODECL: XML_FORMAT);
/* Properties passed as parameters to the Properties constructor become "default properties".
But Xalan does not use the default properties, so they are lost.
Therefore, we must promote them to "set properties".
*/
Properties propertiesForXML = new Properties(omitXMLDeclaration? XML_FORMAT_NODECL: XML_FORMAT);
for (Enumeration e = propertiesForXML.propertyNames(); e.hasMoreElements(); ) {
String propertyName = (String)e.nextElement();
propertiesForXML.setProperty(propertyName, propertiesForXML.getProperty(propertyName, ""));
}
return propertiesForXML;
}

/**
Expand Down
3 changes: 3 additions & 0 deletions status.xml
Expand Up @@ -179,6 +179,9 @@
<release version="@version@" date="@date@">
-->
<release version="2.1.8-dev" date="not yet released">
<action dev="AG" type="fix" fixes-bug="COCOON-1365" due-to="Maurice Jumelet" due-to-email="maurice@jumelet.net">
POST method in cinclude:includexml is broken.
</action>
<action dev="CZ" type="update">
Forms block: If a field is required or not can be changed during form processing.
Applied patch by Philipp Schmidt (philipp.schmidt@gmail.com).
Expand Down

0 comments on commit f1dcb10

Please sign in to comment.