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 2005/03/08 15:45:52 UTC
svn commit: r156529 - in cocoon/branches/BRANCH_2_1_X:
src/blocks/forms/java/org/apache/cocoon/forms/util/DomHelper.java
src/blocks/scratchpad/java/org/apache/cocoon/components/jxdom/DocumentAdapter.java
src/java/org/apache/cocoon/xml/dom/DocumentWrapper.java
tools/src/anttasks/DocumentCache.java
Author: cziegeler
Date: Tue Mar 8 06:45:48 2005
New Revision: 156529
URL: http://svn.apache.org/viewcvs?view=rev&rev=156529
Log:
Fix problems with JDK 5.0 on windows :(
Modified:
cocoon/branches/BRANCH_2_1_X/src/blocks/forms/java/org/apache/cocoon/forms/util/DomHelper.java
cocoon/branches/BRANCH_2_1_X/src/blocks/scratchpad/java/org/apache/cocoon/components/jxdom/DocumentAdapter.java
cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/xml/dom/DocumentWrapper.java
cocoon/branches/BRANCH_2_1_X/tools/src/anttasks/DocumentCache.java
Modified: cocoon/branches/BRANCH_2_1_X/src/blocks/forms/java/org/apache/cocoon/forms/util/DomHelper.java
URL: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/blocks/forms/java/org/apache/cocoon/forms/util/DomHelper.java?view=diff&r1=156528&r2=156529
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/forms/java/org/apache/cocoon/forms/util/DomHelper.java (original)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/forms/java/org/apache/cocoon/forms/util/DomHelper.java Tue Mar 8 06:45:48 2005
@@ -1,5 +1,5 @@
/*
- * Copyright 1999-2004 The Apache Software Foundation.
+ * Copyright 1999-2005 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Modified: cocoon/branches/BRANCH_2_1_X/src/blocks/scratchpad/java/org/apache/cocoon/components/jxdom/DocumentAdapter.java
URL: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/blocks/scratchpad/java/org/apache/cocoon/components/jxdom/DocumentAdapter.java?view=diff&r1=156528&r2=156529
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/scratchpad/java/org/apache/cocoon/components/jxdom/DocumentAdapter.java (original)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/scratchpad/java/org/apache/cocoon/components/jxdom/DocumentAdapter.java Tue Mar 8 06:45:48 2005
@@ -1,5 +1,5 @@
/*
- * Copyright 1999-2004 The Apache Software Foundation.
+ * Copyright 1999-2005 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Modified: cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/xml/dom/DocumentWrapper.java
URL: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/xml/dom/DocumentWrapper.java?view=diff&r1=156528&r2=156529
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/xml/dom/DocumentWrapper.java (original)
+++ cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/xml/dom/DocumentWrapper.java Tue Mar 8 06:45:48 2005
@@ -1,12 +1,12 @@
/*
- * Copyright 1999-2004 The Apache Software Foundation.
- *
+ * Copyright 1999-2005 The Apache Software Foundation.
+ *
* Licensed 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.
@@ -52,7 +52,7 @@
protected final static String DOMLEVEL3_ERR_MSG =
"This method was just added for providing future compatibility to JDK 1.5's DOM level 3 Document interface.";
- Document document;
+ protected final Document document;
/** Creates a new instance of DocmentWrapper */
public DocumentWrapper(Document doc) {
@@ -70,8 +70,8 @@
public void toSAX(org.xml.sax.ContentHandler handler) throws SAXException {
DOMStreamer ds = new DOMStreamer(handler);
- ds.stream(this.document.getDocumentElement());
- }
+ ds.stream(this.document.getDocumentElement());
+ }
public String toString() {
@@ -104,7 +104,7 @@
public Node appendChild(Node newChild) throws DOMException {
return this.document.appendChild(newChild);
}
-
+
/** Returns a duplicate of this node, i.e., serves as a generic copy
* constructor for nodes. The duplicate node has no parent; (
* <code>parentNode</code> is <code>null</code>.).
@@ -132,7 +132,7 @@
public Node cloneNode(boolean deep) {
return this.document.cloneNode(deep);
}
-
+
/** Creates an <code>Attr</code> of the given name. Note that the
* <code>Attr</code> instance can then be set on an <code>Element</code>
* using the <code>setAttributeNode</code> method.
@@ -151,7 +151,7 @@
public Attr createAttribute(String name) throws DOMException {
return this.document.createAttribute(name);
}
-
+
/** Creates an attribute of the given qualified name and namespace URI.
* @param namespaceURI The namespace URI of the attribute to create.
* @param qualifiedName The qualified name of the attribute to
@@ -217,7 +217,7 @@
public Attr createAttributeNS(String namespaceURI, String qualifiedName) throws DOMException {
return this.document.createAttributeNS(namespaceURI, qualifiedName);
}
-
+
/** Creates a <code>CDATASection</code> node whose value is the specified
* string.
* @param data The data for the <code>CDATASection</code> contents.
@@ -229,7 +229,7 @@
public CDATASection createCDATASection(String data) throws DOMException {
return this.document.createCDATASection(data);
}
-
+
/** Creates a <code>Comment</code> node given the specified string.
* @param data The data for the node.
* @return The new <code>Comment</code> object.
@@ -238,7 +238,7 @@
public Comment createComment(String data) {
return this.document.createComment(data);
}
-
+
/** Creates an empty <code>DocumentFragment</code> object.
* @return A new <code>DocumentFragment</code>.
*
@@ -246,7 +246,7 @@
public DocumentFragment createDocumentFragment() {
return this.document.createDocumentFragment();
}
-
+
/** Creates an element of the type specified. Note that the instance
* returned implements the <code>Element</code> interface, so attributes
* can be specified directly on the returned object.
@@ -329,7 +329,7 @@
public Element createElementNS(String namespaceURI, String qualifiedName) throws DOMException {
return this.document.createElementNS(namespaceURI, qualifiedName);
}
-
+
/** Creates an <code>EntityReference</code> object. In addition, if the
* referenced entity is known, the child list of the
* <code>EntityReference</code> node is made the same as that of the
@@ -350,7 +350,7 @@
public EntityReference createEntityReference(String name) throws DOMException {
return this.document.createEntityReference(name);
}
-
+
/** Creates a <code>ProcessingInstruction</code> node given the specified
* name and data strings.
* @param target The target part of the processing instruction.
@@ -365,7 +365,7 @@
public ProcessingInstruction createProcessingInstruction(String target, String data) throws DOMException {
return this.document.createProcessingInstruction(target, data);
}
-
+
/** Creates a <code>Text</code> node given the specified string.
* @param data The data for the node.
* @return The new <code>Text</code> object.
@@ -374,7 +374,7 @@
public Text createTextNode(String data) {
return this.document.createTextNode(data);
}
-
+
/** A <code>NamedNodeMap</code> containing the attributes of this node (if
* it is an <code>Element</code>) or <code>null</code> otherwise.
*
@@ -382,7 +382,7 @@
public NamedNodeMap getAttributes() {
return this.document.getAttributes();
}
-
+
/** A <code>NodeList</code> that contains all children of this node. If
* there are no children, this is a <code>NodeList</code> containing no
* nodes.
@@ -391,7 +391,7 @@
public NodeList getChildNodes() {
return this.document.getChildNodes();
}
-
+
/** The Document Type Declaration (see <code>DocumentType</code>)
* associated with this document. For HTML documents as well as XML
* documents without a document type declaration this returns
@@ -405,7 +405,7 @@
public DocumentType getDoctype() {
return this.document.getDoctype();
}
-
+
/** This is a convenience attribute that allows direct access to the child
* node that is the root element of the document. For HTML documents,
* this is the element with the tagName "HTML".
@@ -414,7 +414,7 @@
public Element getDocumentElement() {
return this.document.getDocumentElement();
}
-
+
/** Returns the <code>Element</code> whose <code>ID</code> is given by
* <code>elementId</code>. If no such element exists, returns
* <code>null</code>. Behavior is not defined if more than one element
@@ -431,7 +431,7 @@
public Element getElementById(String elementId) {
return this.document.getElementById(elementId);
}
-
+
/** Returns a <code>NodeList</code> of all the <code>Elements</code> with a
* given tag name in the order in which they are encountered in a
* preorder traversal of the <code>Document</code> tree.
@@ -444,7 +444,7 @@
public NodeList getElementsByTagName(String tagname) {
return this.document.getElementsByTagName(tagname);
}
-
+
/** Returns a <code>NodeList</code> of all the <code>Elements</code> with a
* given local name and namespace URI in the order in which they are
* encountered in a preorder traversal of the <code>Document</code> tree.
@@ -460,7 +460,7 @@
public NodeList getElementsByTagNameNS(String namespaceURI, String localName) {
return this.document.getElementsByTagNameNS(namespaceURI, localName);
}
-
+
/** The first child of this node. If there is no such node, this returns
* <code>null</code>.
*
@@ -468,7 +468,7 @@
public Node getFirstChild() {
return this.document.getFirstChild();
}
-
+
/** The <code>DOMImplementation</code> object that handles this document. A
* DOM application may use objects from multiple implementations.
*
@@ -476,7 +476,7 @@
public DOMImplementation getImplementation() {
return this.document.getImplementation();
}
-
+
/** The last child of this node. If there is no such node, this returns
* <code>null</code>.
*
@@ -484,7 +484,7 @@
public Node getLastChild() {
return this.document.getLastChild();
}
-
+
/** Returns the local part of the qualified name of this node.
* <br>For nodes of any type other than <code>ELEMENT_NODE</code> and
* <code>ATTRIBUTE_NODE</code> and nodes created with a DOM Level 1
@@ -496,7 +496,7 @@
public String getLocalName() {
return this.document.getLocalName();
}
-
+
/** The namespace URI of this node, or <code>null</code> if it is
* unspecified.
* <br>This is not a computed value that is the result of a namespace
@@ -515,7 +515,7 @@
public String getNamespaceURI() {
return this.document.getNamespaceURI();
}
-
+
/** The node immediately following this node. If there is no such node,
* this returns <code>null</code>.
*
@@ -523,21 +523,21 @@
public Node getNextSibling() {
return this.document.getNextSibling();
}
-
+
/** The name of this node, depending on its type; see the table above.
*
*/
public String getNodeName() {
return this.document.getNodeName();
}
-
+
/** A code representing the type of the underlying object, as defined above.
*
*/
public short getNodeType() {
return this.document.getNodeType();
}
-
+
/** The value of this node, depending on its type; see the table above.
* When it is defined to be <code>null</code>, setting it has no effect.
* @exception DOMException
@@ -550,7 +550,7 @@
public String getNodeValue() throws DOMException {
return this.document.getNodeValue();
}
-
+
/** The <code>Document</code> object associated with this node. This is
* also the <code>Document</code> object used to create new nodes. When
* this node is a <code>Document</code> or a <code>DocumentType</code>
@@ -562,7 +562,7 @@
public Document getOwnerDocument() {
return this.document.getOwnerDocument();
}
-
+
/** The parent of this node. All nodes, except <code>Attr</code>,
* <code>Document</code>, <code>DocumentFragment</code>,
* <code>Entity</code>, and <code>Notation</code> may have a parent.
@@ -574,7 +574,7 @@
public Node getParentNode() {
return this.document.getParentNode();
}
-
+
/** The namespace prefix of this node, or <code>null</code> if it is
* unspecified.
* <br>Note that setting this attribute, when permitted, changes the
@@ -609,7 +609,7 @@
public String getPrefix() {
return this.document.getPrefix();
}
-
+
/** The node immediately preceding this node. If there is no such node,
* this returns <code>null</code>.
*
@@ -617,7 +617,7 @@
public Node getPreviousSibling() {
return this.document.getPreviousSibling();
}
-
+
/** Returns whether this node (if it is an element) has any attributes.
* @return <code>true</code> if this node has any attributes,
* <code>false</code> otherwise.
@@ -627,7 +627,7 @@
public boolean hasAttributes() {
return this.document.hasAttributes();
}
-
+
/** Returns whether this node has any children.
* @return <code>true</code> if this node has any children,
* <code>false</code> otherwise.
@@ -636,7 +636,7 @@
public boolean hasChildNodes() {
return this.document.hasChildNodes();
}
-
+
/** Imports a node from another document to this document. The returned
* node has no parent; (<code>parentNode</code> is <code>null</code>).
* The source node is not altered or removed from the original document;
@@ -738,7 +738,7 @@
public Node importNode(Node importedNode, boolean deep) throws DOMException {
return this.document.importNode(importedNode, deep);
}
-
+
/** Inserts the node <code>newChild</code> before the existing child node
* <code>refChild</code>. If <code>refChild</code> is <code>null</code>,
* insert <code>newChild</code> at the end of the list of children.
@@ -766,7 +766,7 @@
public Node insertBefore(Node newChild, Node refChild) throws DOMException {
return this.document.insertBefore(newChild, refChild);
}
-
+
/** Tests whether the DOM implementation implements a specific feature and
* that feature is supported by this node.
* @param feature The name of the feature to test. This is the same name
@@ -784,7 +784,7 @@
public boolean isSupported(String feature, String version) {
return this.document.isSupported(feature, version);
}
-
+
/** Puts all <code>Text</code> nodes in the full depth of the sub-tree
* underneath this <code>Node</code>, including attribute nodes, into a
* "normal" form where only structure (e.g., elements, comments,
@@ -804,7 +804,7 @@
public void normalize() {
this.document.normalize();
}
-
+
/** Removes the child node indicated by <code>oldChild</code> from the list
* of children, and returns it.
* @param oldChild The node being removed.
@@ -818,7 +818,7 @@
public Node removeChild(Node oldChild) throws DOMException {
return this.document.removeChild(oldChild);
}
-
+
/** Replaces the child node <code>oldChild</code> with <code>newChild</code>
* in the list of children, and returns the <code>oldChild</code> node.
* <br>If <code>newChild</code> is a <code>DocumentFragment</code> object,
@@ -845,7 +845,7 @@
public Node replaceChild(Node newChild, Node oldChild) throws DOMException {
return this.document.replaceChild(newChild, oldChild);
}
-
+
/** The value of this node, depending on its type; see the table above.
* When it is defined to be <code>null</code>, setting it has no effect.
* @exception DOMException
@@ -858,7 +858,7 @@
public void setNodeValue(String nodeValue) throws DOMException {
this.document.setNodeValue(nodeValue);
}
-
+
/** The namespace prefix of this node, or <code>null</code> if it is
* unspecified.
* <br>Note that setting this attribute, when permitted, changes the
Modified: cocoon/branches/BRANCH_2_1_X/tools/src/anttasks/DocumentCache.java
URL: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/tools/src/anttasks/DocumentCache.java?view=diff&r1=156528&r2=156529
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/tools/src/anttasks/DocumentCache.java (original)
+++ cocoon/branches/BRANCH_2_1_X/tools/src/anttasks/DocumentCache.java Tue Mar 8 06:45:48 2005
@@ -48,7 +48,7 @@
public final class DocumentCache {
/** Cache the read configuration files (Documents) */
- protected static Map fileCache = new HashMap();
+ protected final static Map fileCache = new HashMap();
/** The document builder */
private static DocumentBuilder builder;
@@ -90,7 +90,7 @@
if ( task != null ) {
task.log("Reading: " + fileName, Project.MSG_DEBUG);
}
- document = builder.parse(file);
+ document = builder.parse(fileName);
} catch (IOException e) {
throw new BuildException("IOException: "+e);
}