cziegeler 2004/05/25 07:24:01
Modified: . status.xml
src/java/org/apache/cocoon/components/source SourceUtil.java
src/java/org/apache/cocoon/xml/dom DOMBuilder.java
DOMUtil.java
src/java/org/apache/cocoon/components/treeprocessor
TreeProcessor.java
src/java/org/apache/cocoon/xml XMLUtils.java
Log:
Remove deprecated methods from XMLUtils, DOMUtil, DOMBuilder and
SourceUtil.
Revision Changes Path
1.340 +4 -1 cocoon-2.1/status.xml
Index: status.xml
===================================================================
RCS file: /home/cvs/cocoon-2.1/status.xml,v
retrieving revision 1.339
retrieving revision 1.340
diff -u -r1.339 -r1.340
--- status.xml 25 May 2004 08:06:19 -0000 1.339
+++ status.xml 25 May 2004 14:24:00 -0000 1.340
@@ -211,6 +211,9 @@
<changes>
<release version="@version@" date="@date@">
+ <action dev="CZ" type="update">
+ Remove deprecated methods from XMLUtils, DOMUtil, DOMBuilder and
SourceUtil.
+ </action>
<action dev="DC" type="update" fixes-bug="28809" due-to="Dave Brondsema">
Improvements for Chaperon JSPWiki to xdocs conversion:
* handle nested bullet lists (number lists already supported)
1.19 +10 -96
cocoon-2.1/src/java/org/apache/cocoon/components/source/SourceUtil.java
Index: SourceUtil.java
===================================================================
RCS file:
/home/cvs/cocoon-2.1/src/java/org/apache/cocoon/components/source/SourceUtil.java,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- SourceUtil.java 25 May 2004 07:28:26 -0000 1.18
+++ SourceUtil.java 25 May 2004 14:24:01 -0000 1.19
@@ -24,9 +24,6 @@
import javax.xml.transform.OutputKeys;
-import org.apache.avalon.framework.component.Component;
-import org.apache.avalon.framework.component.ComponentException;
-import org.apache.avalon.framework.component.ComponentManager;
import org.apache.avalon.framework.parameters.Parameters;
import org.apache.avalon.framework.service.ServiceException;
import org.apache.avalon.framework.service.ServiceManager;
@@ -106,7 +103,7 @@
* @throws ProcessingException if no suitable converter is found
*/
static public void toSAX( Source source,
- String mimeTypeHint,
+ String mimeTypeHint,
ContentHandler handler)
throws SAXException, IOException, ProcessingException {
toSAX(EnvironmentHelper.getSitemapServiceManager(),
@@ -115,69 +112,16 @@
/**
* Generates SAX events from the given source
- * <b>NOTE</b> : if the implementation can produce lexical events, care
- * should be taken that <code>handler</code> can actually directly
implement
- * the LexicalHandler interface!
- * @param source the data
- * @throws ProcessingException if no suitable converter is found
- * @deprecated Use the [EMAIL PROTECTED] #toSAX(ServiceManager, Source,
String, ContentHandler)}
- * method instead.
- */
- static public void toSAX(ComponentManager manager, Source source,
- String mimeTypeHint,
- ContentHandler handler)
- throws SAXException, IOException, ProcessingException {
- if ( source instanceof XMLizable ) {
- try {
- ((XMLizable)source).toSAX( handler );
- } catch (SAXException e) {
- // Unwrap ProcessingException, IOException, and extreme
cases of SAXExceptions.
- // See also FileGenerator.generate()
- final Exception cause = e.getException();
- if (cause != null) {
- if (cause instanceof ProcessingException) {
- throw (ProcessingException)cause;
- }
- if (cause instanceof IOException) {
- throw (IOException)cause;
- }
- if (cause instanceof SAXException) {
- throw (SAXException)cause;
- }
- }
- throw e;
- }
- } else {
- String mimeType = source.getMimeType();
- if ( null == mimeType) mimeType = mimeTypeHint;
- XMLizer xmlizer = null;
- try {
- xmlizer = (XMLizer) manager.lookup( XMLizer.ROLE);
- xmlizer.toSAX( source.getInputStream(),
- mimeType,
- source.getURI(),
- handler );
- } catch (SourceException se) {
- throw SourceUtil.handle(se);
- } catch (ComponentException ce) {
- throw new ProcessingException("Exception during streaming
source.", ce);
- } finally {
- manager.release( (Component)xmlizer );
- }
- }
- }
-
- /**
- * Generates SAX events from the given source
* <b>NOTE</b> : if the implementation can produce lexical events, care
should be taken
* that <code>handler</code> can actually
* directly implement the LexicalHandler interface!
* @param source the data
* @throws ProcessingException if no suitable converter is found
*/
- static public void toSAX( ServiceManager manager, Source source,
- String mimeTypeHint,
- ContentHandler handler)
+ static public void toSAX( ServiceManager manager,
+ Source source,
+ String mimeTypeHint,
+ ContentHandler handler)
throws SAXException, IOException, ProcessingException {
if ( source instanceof XMLizable ) {
((XMLizable)source).toSAX( handler );
@@ -208,36 +152,6 @@
* directly implement the LexicalHandler interface!
* @param source the data
* @throws ProcessingException if no suitable converter is found
- * @deprecated Use [EMAIL PROTECTED] #parse(ServiceManager, Source,
ContentHandler)}.
- */
- static public void parse( ComponentManager manager,
- Source source,
- ContentHandler handler)
- throws SAXException, IOException, ProcessingException {
- if ( source instanceof XMLizable ) {
- ((XMLizable)source).toSAX( handler );
- } else {
- SAXParser parser = null;
- try {
- parser = (SAXParser) manager.lookup( SAXParser.ROLE);
- parser.parse( getInputSource( source ), handler );
- } catch (SourceException se) {
- throw SourceUtil.handle(se);
- } catch (ComponentException ce) {
- throw new ProcessingException("Exception during parsing
source.", ce);
- } finally {
- manager.release( (Component)parser );
- }
- }
- }
-
- /**
- * Generates SAX events from the given source by parsing it.
- * <b>NOTE</b> : if the implementation can produce lexical events, care
should be taken
- * that <code>handler</code> can actually
- * directly implement the LexicalHandler interface!
- * @param source the data
- * @throws ProcessingException if no suitable converter is found
*/
static public void parse( ServiceManager manager,
Source source,
@@ -527,6 +441,7 @@
* If the source is a ModifiableSource the interface is used.
* If not, the source is invoked with an additional parameter named
* "content" containing the XML.
+ * The current sitemap service manager is used to lookup the serializer.
*
* @param location URI of the Source
* @param typeParameters Type of Source query. Currently, only
@@ -536,7 +451,7 @@
* May be <code>null</code>
* @param frag DOM fragment to serialize to the Source
* @param resolver Resolver for the source.
- * @param serializerName
+ * @param serializerName The serializer to use
*
* @throws ProcessingException
*/
@@ -547,7 +462,6 @@
SourceResolver resolver,
String serializerName)
throws ProcessingException {
-
Source source = null;
try {
@@ -559,8 +473,8 @@
frag.normalize();
if ( null != serializerName) {
- ServiceManager manager =
EnvironmentHelper.getSitemapServiceManager();
+ ServiceManager manager =
EnvironmentHelper.getSitemapServiceManager();
ServiceSelector selector = null;
Serializer serializer = null;
OutputStream oStream = null;
@@ -601,8 +515,8 @@
} else {
String content;
if ( null != serializerName) {
- ServiceManager manager =
EnvironmentHelper.getSitemapServiceManager();
+ ServiceManager manager =
EnvironmentHelper.getSitemapServiceManager();
ServiceSelector selector = null;
Serializer serializer = null;
ByteArrayOutputStream oStream = new
ByteArrayOutputStream();
1.3 +2 -26
cocoon-2.1/src/java/org/apache/cocoon/xml/dom/DOMBuilder.java
Index: DOMBuilder.java
===================================================================
RCS file:
/home/cvs/cocoon-2.1/src/java/org/apache/cocoon/xml/dom/DOMBuilder.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- DOMBuilder.java 5 Mar 2004 13:03:02 -0000 1.2
+++ DOMBuilder.java 25 May 2004 14:24:01 -0000 1.3
@@ -55,14 +55,6 @@
/**
* Construct a new instance of this DOMBuilder.
- * @deprecated Use DOMBuilder() instead.
- */
- public DOMBuilder(DOMFactory factory) {
- this( (Listener)null, (Node)null );
- }
-
- /**
- * Construct a new instance of this DOMBuilder.
*/
public DOMBuilder( Listener listener ) {
this(listener, null);
@@ -70,22 +62,6 @@
/**
* Construct a new instance of this DOMBuilder.
- * @deprecated Use DOMBuilder(listener) instead.
- */
- public DOMBuilder( DOMFactory factory, Listener listener ) {
- this(listener, null);
- }
-
- /**
- * Construct a new instance of this DOMBuilder.
- * @deprecated Use DOMBuilder(listener, parentNode) instead.
- */
- public DOMBuilder( DOMFactory domFactory, Listener listener, Node
parentNode ) {
- this(listener, parentNode);
- }
-
- /**
- * Construct a new instance of this DOMBuilder.
*/
public DOMBuilder( Listener listener, Node parentNode ) {
super();
@@ -113,7 +89,7 @@
* which does not happen here.
*/
public DOMBuilder( Node parentNode ) {
- this(null, null, parentNode);
+ this( null, parentNode);
}
/**
1.11 +1 -369
cocoon-2.1/src/java/org/apache/cocoon/xml/dom/DOMUtil.java
Index: DOMUtil.java
===================================================================
RCS file:
/home/cvs/cocoon-2.1/src/java/org/apache/cocoon/xml/dom/DOMUtil.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- DOMUtil.java 28 Mar 2004 23:57:41 -0000 1.10
+++ DOMUtil.java 25 May 2004 14:24:01 -0000 1.11
@@ -23,17 +23,14 @@
import java.util.Collection;
import java.util.Iterator;
import java.util.Map;
-import java.util.Properties;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
-import javax.xml.transform.OutputKeys;
import javax.xml.transform.TransformerException;
import org.apache.cocoon.ProcessingException;
import org.apache.cocoon.xml.IncludeXMLConsumer;
-import org.apache.cocoon.xml.XMLUtils;
import org.apache.commons.lang.BooleanUtils;
import org.apache.commons.lang.StringUtils;
import org.apache.excalibur.source.SourceParameters;
@@ -42,7 +39,6 @@
import org.apache.excalibur.xml.xpath.NodeListImpl;
import org.apache.excalibur.xml.xpath.XPathProcessor;
import org.apache.excalibur.xml.xpath.XPathUtil;
-import org.apache.xpath.XPathAPI;
import org.w3c.dom.DOMException;
import org.w3c.dom.Document;
import org.w3c.dom.DocumentFragment;
@@ -605,193 +601,6 @@
}
/**
- * Use an XPath string to select a single node. XPath namespace
- * prefixes are resolved from the context node, which may not
- * be what you want (see the next method).
- *
- * @param contextNode The node to start searching from.
- * @param str A valid XPath string.
- * @return The first node found that matches the XPath, or null.
- *
- * @throws TransformerException
- * @deprecated
- */
- public static Node getSingleNode(Node contextNode, String str) throws
TransformerException {
- String[] pathComponents = buildPathArray(str);
- if (pathComponents == null) {
- return XPathAPI.selectSingleNode(contextNode, str);
- } else {
- return getFirstNodeFromPath(contextNode, pathComponents, false);
- }
- }
-
- /**
- * Return the <CODE>Node</CODE> from the DOM Node <CODE>rootNode</CODE>
- * using the XPath expression <CODE>path</CODE>.
- * If the node does not exist, it is created and then returned.
- * This is a very simple method for creating new nodes. If the
- * XPath contains selectors ([,,,]) or "*" it is of course not
- * possible to create the new node. So if you use such XPaths
- * the node must exist beforehand.
- * An simple exception is if the expression contains attribute
- * test to values (e.g. [EMAIL PROTECTED] = 'du' and @number = 'you'],
- * the attributes with the given values are added. The attributes
- * must be separated with 'and'.
- * Another problem are namespaces: XPath requires sometimes selectors for
- * namespaces, e.g. : /*[namespace-uri()="uri" and local-name()="name"]
- * Creating such a node with a namespace is not possible right now as we
use
- * a very simple XPath parser which is not able to parse all kinds of
selectors
- * correctly.
- *
- * @param rootNode The node to start the search.
- * @param path XPath expression for searching the node.
- * @return The node specified by the path.
- * @throws ProcessingException If no path is specified or the XPath
engine fails.
- * @deprecated
- */
- public static Node selectSingleNode(Node rootNode, String path) throws
ProcessingException {
- // Now we have to parse the string
- // First test: path? rootNode?
- if (path == null) {
- throw new ProcessingException("XPath is required.");
- }
- if (rootNode == null)
- return rootNode;
-
- if (path.length() == 0 || path.equals("/") == true)
- return rootNode;
-
- // now the first "quick" test is if the node exists using the
- // full XPathAPI
- try {
- Node testNode = getSingleNode(rootNode, path);
- if (testNode != null)
- return testNode;
- } catch (javax.xml.transform.TransformerException local) {
- throw new ProcessingException(
- "Transforming exception during selectSingleNode with path: '"
- + path
- + "'. Exception: "
- + local,
- local);
- }
- // Remove leading "/" on both ends
- path = StringUtils.strip(path, "/");
-
- // now step through the nodes!
- Node parent = rootNode;
- int pos;
- int posSelector;
- do {
- pos = path.indexOf("/"); // get next separator
- posSelector = path.indexOf("[");
- if (posSelector != -1 && posSelector < pos) {
- posSelector = path.indexOf("]");
- pos = path.indexOf("/", posSelector);
- }
-
- String nodeName;
- boolean isAttribute = false;
- if (pos != -1) { // found separator
- nodeName = path.substring(0, pos); // string until "/"
- path = path.substring(pos + 1); // rest of string after "/"
- } else {
- nodeName = path;
- }
-
- // test for attribute spec
- if (nodeName.startsWith("@") == true) {
- isAttribute = true;
- }
-
- Node singleNode;
- try {
- singleNode = getSingleNode(parent, nodeName);
- } catch (javax.xml.transform.TransformerException
localException) {
- throw new ProcessingException(
- "XPathUtil.selectSingleNode: " +
localException.getMessage(),
- localException);
- }
-
- // create node if necessary
- if (singleNode == null) {
- Node newNode;
- // delete XPath selectors
- int posSelect = nodeName.indexOf("[");
- String XPathExp = null;
- if (posSelect != -1) {
- XPathExp = nodeName.substring(posSelect + 1,
nodeName.length() - 1);
- nodeName = nodeName.substring(0, posSelect);
- }
- if (isAttribute == true) {
- try {
- newNode =
- getOwnerDocument(rootNode).createAttributeNS(
- null,
- nodeName.substring(1));
- ((Element)
parent).setAttributeNodeNS((org.w3c.dom.Attr) newNode);
- parent = newNode;
- } catch (DOMException local) {
- throw new ProcessingException(
- "Unable to create new DOM node: '" + nodeName +
"'.",
- local);
- }
- } else {
- try {
- newNode =
getOwnerDocument(rootNode).createElementNS(null, nodeName);
- } catch (DOMException local) {
- throw new ProcessingException(
- "Unable to create new DOM node: '" + nodeName +
"'.",
- local);
- }
- if (XPathExp != null) {
- java.util.List attrValuePairs = new
java.util.ArrayList(4);
- boolean noError = true;
-
- String attr;
- String value;
- // scan for attributes
- java.util.StringTokenizer tokenizer =
- new java.util.StringTokenizer(XPathExp, "= ");
- while (tokenizer.hasMoreTokens() == true) {
- attr = tokenizer.nextToken();
- if (attr.startsWith("@") == true) {
- if (tokenizer.hasMoreTokens() == true) {
- value = tokenizer.nextToken();
- if (value.startsWith("'") &&
value.endsWith("'"))
- value = value.substring(1,
value.length() - 1);
- if (value.startsWith("\"") &&
value.endsWith("\""))
- value = value.substring(1,
value.length() - 1);
- attrValuePairs.add(attr.substring(1));
- attrValuePairs.add(value);
- } else {
- noError = false;
- }
- } else if (attr.trim().equals("and") == false) {
- noError = false;
- }
- }
- if (noError == true) {
- for (int l = 0; l < attrValuePairs.size(); l = l
+ 2) {
- ((Element) newNode).setAttributeNS(
- null,
- (String) attrValuePairs.get(l),
- (String) attrValuePairs.get(l + 1));
- }
- }
- }
- parent.appendChild(newNode);
- parent = newNode;
- }
- } else {
- parent = singleNode;
- }
- }
- while (pos != -1);
- return parent;
- }
-
- /**
* Return the <CODE>Node</CODE> from the DOM Node <CODE>rootNode</CODE>
* using the XPath expression <CODE>path</CODE>.
* If the node does not exist, it is created and then returned.
@@ -966,37 +775,6 @@
*
* @param root The node to start the search.
* @param path XPath search expression.
- * @return The value of the node or <CODE>null</CODE>
- * @deprecated
- */
- public static String getValueOf(Node root, String path) throws
ProcessingException {
- if (path == null) {
- throw new ProcessingException("Not a valid XPath: " + path);
- }
- if (root == null)
- return null;
- path = StringUtils.strip(path, "/");
-
- try {
- Node node = getSingleNode(root, path);
- if (node != null) {
- return getValueOfNode(node);
- }
- } catch (javax.xml.transform.TransformerException localException) {
- throw new ProcessingException(
- "XPathUtil.selectSingleNode: " + localException.getMessage(),
- localException);
- }
- return null;
- }
-
- /**
- * Get the value of the node specified by the XPath.
- * This works similar to xsl:value-of. If the node does not exist
<CODE>null</CODE>
- * is returned.
- *
- * @param root The node to start the search.
- * @param path XPath search expression.
* @param processor The XPath processor to use
* @return The value of the node or <CODE>null</CODE>
*/
@@ -1030,26 +808,6 @@
* @param root The node to start the search.
* @param path XPath search expression.
* @param defaultValue The default value if the node does not exist.
- * @return The value of the node or <CODE>defaultValue</CODE>
- * @deprecated
- */
- public static String getValueOf(Node root, String path, String
defaultValue)
- throws ProcessingException {
- String value = getValueOf(root, path);
- if (value == null) {
- value = defaultValue;
- }
- return value;
- }
-
- /**
- * Get the value of the node specified by the XPath.
- * This works similar to xsl:value-of. If the node is not found
- * the <CODE>defaultValue</CODE> is returned.
- *
- * @param root The node to start the search.
- * @param path XPath search expression.
- * @param defaultValue The default value if the node does not exist.
* @param processor The XPath Processor
* @return The value of the node or <CODE>defaultValue</CODE>
*/
@@ -1071,27 +829,6 @@
*
* @param root The node to start the search.
* @param path XPath search expression.
- * @return The boolean value of the node.
- * @throws ProcessingException If the node is not found.
- * @deprecated
- */
- public static boolean getValueAsBooleanOf(Node root, String path) throws
ProcessingException {
- String value = getValueOf(root, path);
- if (value != null) {
- return Boolean.valueOf(value).booleanValue();
- } else {
- throw new ProcessingException("No such node: " + path);
- }
- }
-
- /**
- * Get the boolean value of the node specified by the XPath.
- * This works similar to xsl:value-of. If the node exists and has a value
- * this value is converted to a boolean, e.g. "true" or "false" as value
- * will result into the corresponding boolean values.
- *
- * @param root The node to start the search.
- * @param path XPath search expression.
* @param processor The XPath Processor
* @return The boolean value of the node.
* @throws ProcessingException If the node is not found.
@@ -1116,28 +853,6 @@
* @param root The node to start the search.
* @param path XPath search expression.
* @param defaultValue Default boolean value.
- * @return The value of the node or <CODE>defaultValue</CODE>
- * @deprecated
- */
- public static boolean getValueAsBooleanOf(Node root, String path,
boolean defaultValue)
- throws ProcessingException {
- String value = getValueOf(root, path);
- if (value != null) {
- return Boolean.valueOf(value).booleanValue();
- }
- return defaultValue;
- }
-
- /**
- * Get the boolean value of the node specified by the XPath.
- * This works similar to xsl:value-of. If the node exists and has a value
- * this value is converted to a boolean, e.g. "true" or "false" as value
- * will result into the corresponding boolean values.
- * If the node does not exist, the <CODE>defaultValue</CODE> is returned.
- *
- * @param root The node to start the search.
- * @param path XPath search expression.
- * @param defaultValue Default boolean value.
* @param processor The XPath Processor
* @return The value of the node or <CODE>defaultValue</CODE>
*/
@@ -1172,26 +887,6 @@
*
* @param contextNode The node to start searching from.
* @param str A valid XPath string.
- * @return A NodeIterator, should never be null.
- *
- * @throws TransformerException
- * @deprecated
- */
- public static NodeList selectNodeList(Node contextNode, String str)
- throws TransformerException {
- String[] pathComponents = buildPathArray(str);
- if (pathComponents != null) {
- return getNodeListFromPath(contextNode, pathComponents);
- }
- return XPathAPI.selectNodeList(contextNode, str);
- }
-
- /**
- * Use an XPath string to select a nodelist.
- * XPath namespace prefixes are resolved from the contextNode.
- *
- * @param contextNode The node to start searching from.
- * @param str A valid XPath string.
* @param processor The XPath Processor
* @return A NodeIterator, should never be null.
*
@@ -1442,67 +1137,4 @@
}
}
- /**
- * Converts a org.w3c.dom.Node to a String. Uses [EMAIL PROTECTED]
javax.xml.transform.Transformer}
- * to convert from a Node to a String.
- *
- * @param node a <code>org.w3c.dom.Node</code> value
- * @return String representation of the document
- * @deprecated Use [EMAIL PROTECTED] XMLUtils#serializeNodeToXML(Node)}
instead.
- */
- public static String node2String(Node node) {
- try {
- return XMLUtils.serializeNodeToXML(node);
- } catch (ProcessingException e) {
- // Empty
- }
- return "";
- }
-
- /**
- * Create a string representation of a org.w3c.dom.Node and any
- * (most) subtypes.
- * @param node a <code>org.w3c.dom.Node</code> value
- * @param pretty a <code>boolean</code> value whether to format the XML
- * @return a <code>String</code> value
- * @deprecated Please use [EMAIL PROTECTED] XMLUtils#serializeNode(Node,
Properties)} instead.
- */
- public static String node2String(Node node, boolean pretty) {
- try {
- if (pretty) {
- Properties props = new Properties();
- props.setProperty(OutputKeys.INDENT, "yes");
- return XMLUtils.serializeNode(node, props);
- } else {
- return XMLUtils.serializeNodeToXML(node);
- }
- } catch (ProcessingException e) {
- }
- return "";
- }
-
- /**
- * Create a string representation of a org.w3c.dom.Node and any
- * (most) subtypes.
- * @param node a <code>org.w3c.dom.Node</code> value
- * @return a <code>StringBuffer</code> value
- * @deprecated Please use [EMAIL PROTECTED]
XMLUtils#serializeNodeToXML(Node)} instead.
- */
- public static StringBuffer node2StringBuffer(Node node) {
- return new StringBuffer(node2String(node));
- }
-
- /**
- * Create a string representation of a org.w3c.dom.Node and any
- * (most) subtypes.
- * @param node a <code>org.w3c.dom.Node</code> value
- * @param pretty a <code>boolean</code> value whether to format the XML
- * @param indent a <code>String</code> value containing spaces as
- * initial indent, if null defaults to empty string.
- * @return a <code>StringBuffer</code> value
- * @deprecated Please use [EMAIL PROTECTED] XMLUtils#serializeNode(Node,
Properties)} instead.
- */
- public static StringBuffer node2StringBuffer(Node node, boolean pretty,
String indent) {
- return new StringBuffer(node2String(node, pretty));
- }
}
1.31 +2 -2
cocoon-2.1/src/java/org/apache/cocoon/components/treeprocessor/TreeProcessor.java
Index: TreeProcessor.java
===================================================================
RCS file:
/home/cvs/cocoon-2.1/src/java/org/apache/cocoon/components/treeprocessor/TreeProcessor.java,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -r1.30 -r1.31
--- TreeProcessor.java 25 May 2004 13:48:12 -0000 1.30
+++ TreeProcessor.java 25 May 2004 14:24:01 -0000 1.31
@@ -265,7 +265,7 @@
Source source = this.resolver.resolveURI( xconfURL );
try {
SAXConfigurationHandler handler = new
SAXConfigurationHandler();
- SourceUtil.toSAX( this.manager, source, null, handler);
+ SourceUtil.toSAX( new ComponentManagerWrapper(this.manager),
source, null, handler);
builtin = handler.getConfiguration();
} finally {
this.resolver.release( source );
1.8 +1 -41 cocoon-2.1/src/java/org/apache/cocoon/xml/XMLUtils.java
Index: XMLUtils.java
===================================================================
RCS file: /home/cvs/cocoon-2.1/src/java/org/apache/cocoon/xml/XMLUtils.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- XMLUtils.java 17 Mar 2004 11:50:21 -0000 1.7
+++ XMLUtils.java 25 May 2004 14:24:01 -0000 1.8
@@ -145,46 +145,6 @@
}
/**
- * Serialize a DOM node to a String.
- * The defaultSerializeToXMLFormat() is used to format the serialized
xml.
- * @deprecated use serializeNode(Node, Properties) instead
- */
- public static String serializeNodeToXML(Node node)
- throws ProcessingException {
- return serializeNode(node, XMLUtils.defaultSerializeToXMLFormat());
- }
-
- /**
- * This is the default properties set used to serialize xml.
- * It is used by the serializeNodeToXML() method.
- * The format is as follows:
- * Method: xml
- * Encoding: ISO-8859-1
- * Omit xml declaration: no
- * Indent: yes
- * @deprecated Use createPropertiesForXML(false) instead and add the
encoding
- */
- public static Properties defaultSerializeToXMLFormat() {
- return defaultSerializeToXMLFormat(false);
- }
-
- /**
- * This is the default properties set used to serialize xml.
- * It is used by the serializeNodeToXML() method.
- * The omit xml declaration property can be controlled by the flag.
- * Method: xml
- * Encoding: ISO-8859-1
- * Omit xml declaration: according to the flag
- * Indent: yes
- * @deprecated Use createPropertiesForXML(boolean) instead and add the
encoding
- */
- public static Properties defaultSerializeToXMLFormat(boolean
omitXMLDeclaration) {
- final Properties format = createPropertiesForXML(omitXMLDeclaration);
- format.put(OutputKeys.ENCODING, "ISO-8859-1");
- return format;
- }
-
- /**
* Create a new properties set for serializing xml
* The omit xml declaration property can be controlled by the flag.
* Method: xml