Author: cziegeler
Date: Tue Mar  8 06:33:33 2005
New Revision: 156528

URL: http://svn.apache.org/viewcvs?view=rev&rev=156528
Log:
Fix problems with JDK 5.0 on windows :(

Added:
    cocoon/trunk/src/mocks/org/
    cocoon/trunk/src/mocks/org/w3c/
    cocoon/trunk/src/mocks/org/w3c/dom/
    cocoon/trunk/src/mocks/org/w3c/dom/DOMConfiguration.java   (with props)
    cocoon/trunk/src/mocks/org/w3c/dom/TypeInfo.java   (with props)
    cocoon/trunk/src/mocks/org/w3c/dom/UserDataHandler.java   (with props)
Modified:
    
cocoon/trunk/src/blocks/forms/java/org/apache/cocoon/forms/util/DomHelper.java
    
cocoon/trunk/src/blocks/scratchpad/java/org/apache/cocoon/components/jxdom/DocumentAdapter.java
    cocoon/trunk/src/java/org/apache/cocoon/xml/dom/DocumentWrapper.java
    cocoon/trunk/tools/src/anttasks/DocumentCache.java

Modified: 
cocoon/trunk/src/blocks/forms/java/org/apache/cocoon/forms/util/DomHelper.java
URL: 
http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/forms/java/org/apache/cocoon/forms/util/DomHelper.java?view=diff&r1=156527&r2=156528
==============================================================================
--- 
cocoon/trunk/src/blocks/forms/java/org/apache/cocoon/forms/util/DomHelper.java 
(original)
+++ 
cocoon/trunk/src/blocks/forms/java/org/apache/cocoon/forms/util/DomHelper.java 
Tue Mar  8 06:33:33 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.
@@ -31,6 +31,7 @@
 import org.apache.excalibur.xml.EntityResolver;
 import org.apache.excalibur.xml.sax.XMLizable;
 import org.apache.xerces.dom.NodeImpl;
+import org.apache.xerces.dom3.UserDataHandler;
 import org.apache.xerces.parsers.DOMParser;
 import org.apache.xerces.xni.Augmentations;
 import org.apache.xerces.xni.NamespaceContext;
@@ -395,7 +396,7 @@
             if (node != null) {
                 String location = locator.getLiteralSystemId() + ":" +
                     locator.getLineNumber() + ":" + locator.getColumnNumber();
-                node.setUserData("location", location, null);
+                node.setUserData("location", location, (UserDataHandler)null);
             }
         }
     }

Modified: 
cocoon/trunk/src/blocks/scratchpad/java/org/apache/cocoon/components/jxdom/DocumentAdapter.java
URL: 
http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/scratchpad/java/org/apache/cocoon/components/jxdom/DocumentAdapter.java?view=diff&r1=156527&r2=156528
==============================================================================
--- 
cocoon/trunk/src/blocks/scratchpad/java/org/apache/cocoon/components/jxdom/DocumentAdapter.java
 (original)
+++ 
cocoon/trunk/src/blocks/scratchpad/java/org/apache/cocoon/components/jxdom/DocumentAdapter.java
 Tue Mar  8 06:33:33 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.
@@ -30,6 +30,7 @@
 import org.w3c.dom.Attr;
 import org.w3c.dom.CDATASection;
 import org.w3c.dom.Comment;
+import org.w3c.dom.DOMConfiguration;
 import org.w3c.dom.DOMException;
 import org.w3c.dom.DOMImplementation;
 import org.w3c.dom.Document;
@@ -42,15 +43,20 @@
 import org.w3c.dom.NodeList;
 import org.w3c.dom.ProcessingInstruction;
 import org.w3c.dom.Text;
+import org.w3c.dom.TypeInfo;
+import org.w3c.dom.UserDataHandler;
 
 /**
  * DOM Wrapper for Java Beans and JavaScript objects utilizing Apache JXPath's 
Introspector.
  *
- * @version CVS $ID$
+ * @version SVN $ID:$
  */
 
 public class DocumentAdapter implements Document {
     
+    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.";
+
     private static final CompiledExpression
         GET_SELF = JXPathContext.compile(".");
     private static final CompiledExpression 
@@ -58,7 +64,7 @@
     protected static final CompiledExpression 
         GET_CHILD_NODES = JXPathContext.compile("*");
 
-    protected static NamedNodeMap EMPTY_NODE_MAP = new NamedNodeMap() {
+    protected final static NamedNodeMap EMPTY_NODE_MAP = new NamedNodeMap() {
             public Node getNamedItem(String name) {
                 return null;
             }
@@ -367,6 +373,110 @@
             return null;
         }
 
+        /**
+         * @since DOM Level 3
+         */
+        public Object getUserData(String key) {
+            throw new UnsupportedOperationException(DOMLEVEL3_ERR_MSG);
+        }
+
+        /**
+         * @since DOM Level 3
+         */
+        public Object setUserData(String key, Object value, UserDataHandler 
handler) {
+            throw new UnsupportedOperationException(DOMLEVEL3_ERR_MSG);
+        }
+
+        /**
+         * @since DOM Level 3
+         */
+        public Object getFeature(String feature, String version) { 
+            throw new UnsupportedOperationException(DOMLEVEL3_ERR_MSG);
+        }
+
+        /**
+         * @since DOM Level 3
+         */
+        public short compareDocumentPosition(Node other) throws DOMException {
+            throw new UnsupportedOperationException(DOMLEVEL3_ERR_MSG);
+        }
+
+        /**
+         * @since DOM Level 3
+         */
+        public String getBaseURI() {
+            throw new UnsupportedOperationException(DOMLEVEL3_ERR_MSG);
+        }
+
+        /**
+         * @since DOM Level 3
+         */
+        public String getTextContent() throws DOMException {
+            throw new UnsupportedOperationException(DOMLEVEL3_ERR_MSG);
+        }
+
+        /**
+         * @since DOM Level 3
+         */
+        public boolean isDefaultNamespace(String namespaceURI) {
+            throw new UnsupportedOperationException(DOMLEVEL3_ERR_MSG);
+        }
+
+        /**
+         * @since DOM Level 3
+         */
+        public boolean isEqualNode(Node arg) {
+            throw new UnsupportedOperationException(DOMLEVEL3_ERR_MSG);
+        }
+
+        /**
+         * @since DOM Level 3
+         */
+        public boolean isSameNode(Node other) {
+            throw new UnsupportedOperationException(DOMLEVEL3_ERR_MSG);
+        }
+
+        /**
+         * @since DOM Level 3
+         */
+        public String lookupNamespaceURI(String prefix) {
+            throw new UnsupportedOperationException(DOMLEVEL3_ERR_MSG);
+        }
+
+        /**
+         * @since DOM Level 3
+         */
+        public String lookupPrefix(String namespaceURI) {
+            throw new UnsupportedOperationException(DOMLEVEL3_ERR_MSG);
+        }
+
+        /**
+         * @since DOM Level 3
+         */
+        public void setTextContent(String textContent) throws DOMException {
+            throw new UnsupportedOperationException(DOMLEVEL3_ERR_MSG);
+        }
+
+        /**
+         * @since DOM Level 3
+         */
+        public String getWholeText() {
+            throw new UnsupportedOperationException(DOMLEVEL3_ERR_MSG);
+        }
+
+        /**
+         * @since DOM Level 3
+         */
+        public boolean isElementContentWhitespace() {
+            throw new UnsupportedOperationException(DOMLEVEL3_ERR_MSG);
+        }
+
+        /**
+         * @since DOM Level 3
+         */
+        public Text replaceWholeText(String content) throws DOMException {
+            throw new UnsupportedOperationException(DOMLEVEL3_ERR_MSG);
+        }
     }
 
     public class ElementAdapter extends NodeAdapter implements Element {
@@ -562,9 +672,108 @@
                 throws DOMException {
                 notSupported();
             }
+
             public Element getOwnerElement() {
                 return ElementAdapter.this;
             }
+
+            /**
+             * @since DOM Level 3
+             */
+            public Object getUserData(String key) {
+                throw new UnsupportedOperationException(DOMLEVEL3_ERR_MSG);
+            }
+
+            /**
+             * @since DOM Level 3
+             */
+            public Object setUserData(String key, Object value, 
UserDataHandler handler) {
+                throw new UnsupportedOperationException(DOMLEVEL3_ERR_MSG);
+            }
+
+            /**
+             * @since DOM Level 3
+             */
+            public Object getFeature(String feature, String version) { 
+                throw new UnsupportedOperationException(DOMLEVEL3_ERR_MSG);
+            }
+
+            /**
+             * @since DOM Level 3
+             */
+            public short compareDocumentPosition(Node other) throws 
DOMException {
+                throw new UnsupportedOperationException(DOMLEVEL3_ERR_MSG);
+            }
+
+            /**
+             * @since DOM Level 3
+             */
+            public String getBaseURI() {
+                throw new UnsupportedOperationException(DOMLEVEL3_ERR_MSG);
+            }
+
+            /**
+             * @since DOM Level 3
+             */
+            public String getTextContent() throws DOMException {
+                throw new UnsupportedOperationException(DOMLEVEL3_ERR_MSG);
+            }
+
+            /**
+             * @since DOM Level 3
+             */
+            public boolean isDefaultNamespace(String namespaceURI) {
+                throw new UnsupportedOperationException(DOMLEVEL3_ERR_MSG);
+            }
+
+            /**
+             * @since DOM Level 3
+             */
+            public boolean isEqualNode(Node arg) {
+                throw new UnsupportedOperationException(DOMLEVEL3_ERR_MSG);
+            }
+
+            /**
+             * @since DOM Level 3
+             */
+            public boolean isSameNode(Node other) {
+                throw new UnsupportedOperationException(DOMLEVEL3_ERR_MSG);
+            }
+
+            /**
+             * @since DOM Level 3
+             */
+            public String lookupNamespaceURI(String prefix) {
+                throw new UnsupportedOperationException(DOMLEVEL3_ERR_MSG);
+            }
+
+            /**
+             * @since DOM Level 3
+             */
+            public String lookupPrefix(String namespaceURI) {
+                throw new UnsupportedOperationException(DOMLEVEL3_ERR_MSG);
+            }
+
+            /**
+             * @since DOM Level 3
+             */
+            public void setTextContent(String textContent) throws DOMException 
{
+                throw new UnsupportedOperationException(DOMLEVEL3_ERR_MSG);
+            }
+
+            /**
+             * @since DOM Level 3
+             */
+            public TypeInfo getSchemaTypeInfo() {
+                throw new UnsupportedOperationException(DOMLEVEL3_ERR_MSG);
+            }
+
+            /**
+             * @since DOM Level 3
+             */
+            public boolean isId() {
+                throw new UnsupportedOperationException(DOMLEVEL3_ERR_MSG);
+            }
         }
 
         
@@ -717,6 +926,120 @@
             return getAttributes().getLength() > 0;
         }
         
+        /**
+         * @since DOM Level 3
+         */
+        public Object getUserData(String key) {
+            throw new UnsupportedOperationException(DOMLEVEL3_ERR_MSG);
+        }
+
+        /**
+         * @since DOM Level 3
+         */
+        public Object setUserData(String key, Object value, UserDataHandler 
handler) {
+            throw new UnsupportedOperationException(DOMLEVEL3_ERR_MSG);
+        }
+
+        /**
+         * @since DOM Level 3
+         */
+        public Object getFeature(String feature, String version) { 
+            throw new UnsupportedOperationException(DOMLEVEL3_ERR_MSG);
+        }
+
+        /**
+         * @since DOM Level 3
+         */
+        public short compareDocumentPosition(Node other) throws DOMException {
+            throw new UnsupportedOperationException(DOMLEVEL3_ERR_MSG);
+        }
+
+        /**
+         * @since DOM Level 3
+         */
+        public String getBaseURI() {
+            throw new UnsupportedOperationException(DOMLEVEL3_ERR_MSG);
+        }
+
+        /**
+         * @since DOM Level 3
+         */
+        public String getTextContent() throws DOMException {
+            throw new UnsupportedOperationException(DOMLEVEL3_ERR_MSG);
+        }
+
+        /**
+         * @since DOM Level 3
+         */
+        public boolean isDefaultNamespace(String namespaceURI) {
+            throw new UnsupportedOperationException(DOMLEVEL3_ERR_MSG);
+        }
+
+        /**
+         * @since DOM Level 3
+         */
+        public boolean isEqualNode(Node arg) {
+            throw new UnsupportedOperationException(DOMLEVEL3_ERR_MSG);
+        }
+
+        /**
+         * @since DOM Level 3
+         */
+        public boolean isSameNode(Node other) {
+            throw new UnsupportedOperationException(DOMLEVEL3_ERR_MSG);
+        }
+
+        /**
+         * @since DOM Level 3
+         */
+        public String lookupNamespaceURI(String prefix) {
+            throw new UnsupportedOperationException(DOMLEVEL3_ERR_MSG);
+        }
+
+        /**
+         * @since DOM Level 3
+         */
+        public String lookupPrefix(String namespaceURI) {
+            throw new UnsupportedOperationException(DOMLEVEL3_ERR_MSG);
+        }
+
+        /**
+         * @since DOM Level 3
+         */
+        public void setTextContent(String textContent) throws DOMException {
+            throw new UnsupportedOperationException(DOMLEVEL3_ERR_MSG);
+        }
+
+        /**
+         * @since DOM Level 3
+         */
+        public TypeInfo getSchemaTypeInfo() {
+            throw new UnsupportedOperationException(DOMLEVEL3_ERR_MSG);
+        }
+
+        /**
+         * @since DOM Level 3
+         */
+        public void setIdAttribute(String name, boolean isId)
+        throws DOMException {
+            throw new UnsupportedOperationException(DOMLEVEL3_ERR_MSG);
+        }
+
+        /**
+         * @since DOM Level 3
+         */
+        public void setIdAttributeNode(Attr idAttr, boolean isId)
+        throws DOMException {
+            throw new UnsupportedOperationException(DOMLEVEL3_ERR_MSG);
+        }
+
+        /**
+         * @since DOM Level 3
+         */
+        public void setIdAttributeNS(String namespaceURI, String localName,
+                boolean isId) throws DOMException {
+            throw new UnsupportedOperationException(DOMLEVEL3_ERR_MSG);
+        }
     }
 
     public DocumentType getDoctype() {
@@ -921,4 +1244,194 @@
     public Object unwrap() {
         return root.unwrap();
     }
+
+    /**
+     * @since DOM Level 3
+     */
+    public Node renameNode(Node node, String namespaceURI, String 
qualifiedName) throws DOMException {
+        throw new UnsupportedOperationException(DOMLEVEL3_ERR_MSG);
+    }
+
+    /**
+     * @since DOM Level 3
+     */
+    public void normalizeDocument() {
+        throw new UnsupportedOperationException(DOMLEVEL3_ERR_MSG);
+    }
+
+    /**
+     * @since DOM Level 3
+     */
+    public DOMConfiguration getDomConfig() {
+        throw new UnsupportedOperationException(DOMLEVEL3_ERR_MSG);
+    }
+
+    /**
+     * @since DOM Level 3
+     */
+    public Node adoptNode(Node source) {
+        throw new UnsupportedOperationException(DOMLEVEL3_ERR_MSG);
+    }
+
+    /**
+     * @since DOM Level 3
+     */
+    public void setDocumentURI(String uri) {
+        throw new UnsupportedOperationException(DOMLEVEL3_ERR_MSG);
+    }
+
+    /**
+     * @since DOM Level 3
+     */
+    public String getDocumentURI() {
+        throw new UnsupportedOperationException(DOMLEVEL3_ERR_MSG);
+    }
+
+    /**
+     * @since DOM Level 3
+     */
+    public void setStrictErrorChecking(boolean value) {
+        throw new UnsupportedOperationException(DOMLEVEL3_ERR_MSG);
+    }
+
+    /**
+     * @since DOM Level 3
+     */
+    public boolean getStrictErrorChecking() {
+        throw new UnsupportedOperationException(DOMLEVEL3_ERR_MSG);
+    }
+
+    /**
+     * @since DOM Level 3
+     */
+    public void setXmlVersion(String version) {
+        throw new UnsupportedOperationException(DOMLEVEL3_ERR_MSG);
+    }
+
+    /**
+     * @since DOM Level 3
+     */
+    public String getXmlVersion() {
+        throw new UnsupportedOperationException(DOMLEVEL3_ERR_MSG);
+    }
+
+    /**
+     * @since DOM Level 3
+     */
+    public void setXmlStandalone(boolean value) {
+        throw new UnsupportedOperationException(DOMLEVEL3_ERR_MSG);
+    }
+
+    /**
+     * @since DOM Level 3
+     */
+    public boolean getXmlStandalone() {
+        throw new UnsupportedOperationException(DOMLEVEL3_ERR_MSG);
+    }
+    
+    /**
+     * @since DOM Level 3
+     */
+    public void setXmlEncoding(String version) {
+        throw new UnsupportedOperationException(DOMLEVEL3_ERR_MSG);
+    }
+
+    /**
+     * @since DOM Level 3
+     */
+    public String getXmlEncoding() {
+        throw new UnsupportedOperationException(DOMLEVEL3_ERR_MSG);
+    }
+
+    /**
+     * @since DOM Level 3
+     */
+    public String getInputEncoding() {
+        throw new UnsupportedOperationException(DOMLEVEL3_ERR_MSG);
+    }
+
+    /**
+     * @since DOM Level 3
+     */
+    public Object getUserData(String key) {
+        throw new UnsupportedOperationException(DOMLEVEL3_ERR_MSG);
+    }
+
+    /**
+     * @since DOM Level 3
+     */
+    public Object setUserData(String key, Object value, UserDataHandler 
handler) {
+        throw new UnsupportedOperationException(DOMLEVEL3_ERR_MSG);
+    }
+    
+    /**
+     * @since DOM Level 3
+     */
+    public Object getFeature(String feature, String version) { 
+        throw new UnsupportedOperationException(DOMLEVEL3_ERR_MSG);
+    }
+
+    /**
+     * @since DOM Level 3
+     */
+    public short compareDocumentPosition(Node other) throws DOMException {
+        throw new UnsupportedOperationException(DOMLEVEL3_ERR_MSG);
+    }
+
+    /**
+     * @since DOM Level 3
+     */
+    public String getBaseURI() {
+        throw new UnsupportedOperationException(DOMLEVEL3_ERR_MSG);
+    }
+
+    /**
+     * @since DOM Level 3
+     */
+    public String getTextContent() throws DOMException {
+        throw new UnsupportedOperationException(DOMLEVEL3_ERR_MSG);
+    }
+
+    /**
+     * @since DOM Level 3
+     */
+    public boolean isDefaultNamespace(String namespaceURI) {
+        throw new UnsupportedOperationException(DOMLEVEL3_ERR_MSG);
+    }
+
+    /**
+     * @since DOM Level 3
+     */
+    public boolean isEqualNode(Node arg) {
+        throw new UnsupportedOperationException(DOMLEVEL3_ERR_MSG);
+    }
+
+    /**
+     * @since DOM Level 3
+     */
+    public boolean isSameNode(Node other) {
+        throw new UnsupportedOperationException(DOMLEVEL3_ERR_MSG);
+    }
+
+    /**
+     * @since DOM Level 3
+     */
+    public String lookupNamespaceURI(String prefix) {
+        throw new UnsupportedOperationException(DOMLEVEL3_ERR_MSG);
+    }
+
+    /**
+     * @since DOM Level 3
+     */
+    public String lookupPrefix(String namespaceURI) {
+        throw new UnsupportedOperationException(DOMLEVEL3_ERR_MSG);
+    }
+
+    /**
+     * @since DOM Level 3
+     */
+    public void setTextContent(String textContent) throws DOMException {
+        throw new UnsupportedOperationException(DOMLEVEL3_ERR_MSG);
+    }
+
 }

Modified: cocoon/trunk/src/java/org/apache/cocoon/xml/dom/DocumentWrapper.java
URL: 
http://svn.apache.org/viewcvs/cocoon/trunk/src/java/org/apache/cocoon/xml/dom/DocumentWrapper.java?view=diff&r1=156527&r2=156528
==============================================================================
--- cocoon/trunk/src/java/org/apache/cocoon/xml/dom/DocumentWrapper.java 
(original)
+++ cocoon/trunk/src/java/org/apache/cocoon/xml/dom/DocumentWrapper.java Tue 
Mar  8 06:33:33 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.
@@ -23,6 +23,7 @@
 import org.w3c.dom.Attr;
 import org.w3c.dom.CDATASection;
 import org.w3c.dom.Comment;
+import org.w3c.dom.DOMConfiguration;
 import org.w3c.dom.DOMException;
 import org.w3c.dom.DOMImplementation;
 import org.w3c.dom.Document;
@@ -35,6 +36,7 @@
 import org.w3c.dom.NodeList;
 import org.w3c.dom.ProcessingInstruction;
 import org.w3c.dom.Text;
+import org.w3c.dom.UserDataHandler;
 import org.xml.sax.SAXException;
 
 
@@ -43,12 +45,15 @@
  *  like XMLizable and a toString() method.
  *
  * @author <a href="mailto:[EMAIL PROTECTED]">Christian Haul</a>
- * @version CVS $Id: DocumentWrapper.java,v 1.7 2004/06/18 14:28:56 vgritsenko 
Exp $
+ * @version CVS $Id$
 */
 public class DocumentWrapper implements org.w3c.dom.Document, XMLizable {
 
-    Document document = null;
+    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.";
 
+    protected final Document document;
+    
     /** Creates a new instance of DocmentWrapper */
     public DocumentWrapper(Document doc) {
         this.document = doc;
@@ -266,7 +271,7 @@
     public Element createElement(String tagName) throws DOMException {
         return this.document.createElement(tagName);
     }
-
+    
     /** Creates an element of the given qualified name and namespace URI.
      * @param namespaceURI The namespace URI of the element to create.
      * @param qualifiedName The qualified name of the element type to
@@ -814,13 +819,6 @@
         return this.document.removeChild(oldChild);
     }
 
-    /**
-     * @since DOM Level 3
-     */
-    public Node renameNode(Node node, String namespaceURI, String 
qualifiedName) throws DOMException {
-        throw new UnsupportedOperationException("This method was just added 
for providing future compatibility to JDK 1.5's DOM level 3 Document 
interface.");
-    }
-
     /** 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,
@@ -895,5 +893,193 @@
     public void setPrefix(String prefix) throws DOMException {
         this.document.setPrefix(prefix);
     }
+    
+    /**
+     * @since DOM Level 3
+     */
+    public Node renameNode(Node node, String namespaceURI, String 
qualifiedName) throws DOMException {
+        throw new UnsupportedOperationException(DOMLEVEL3_ERR_MSG);
+    }
+
+    /**
+     * @since DOM Level 3
+     */
+    public void normalizeDocument() {
+        throw new UnsupportedOperationException(DOMLEVEL3_ERR_MSG);
+    }
+
+    /**
+     * @since DOM Level 3
+     */
+    public DOMConfiguration getDomConfig() {
+        throw new UnsupportedOperationException(DOMLEVEL3_ERR_MSG);
+    }
+
+    /**
+     * @since DOM Level 3
+     */
+    public Node adoptNode(Node source) {
+        throw new UnsupportedOperationException(DOMLEVEL3_ERR_MSG);
+    }
+
+    /**
+     * @since DOM Level 3
+     */
+    public void setDocumentURI(String uri) {
+        throw new UnsupportedOperationException(DOMLEVEL3_ERR_MSG);
+    }
+
+    /**
+     * @since DOM Level 3
+     */
+    public String getDocumentURI() {
+        throw new UnsupportedOperationException(DOMLEVEL3_ERR_MSG);
+    }
+
+    /**
+     * @since DOM Level 3
+     */
+    public void setStrictErrorChecking(boolean value) {
+        throw new UnsupportedOperationException(DOMLEVEL3_ERR_MSG);
+    }
+
+    /**
+     * @since DOM Level 3
+     */
+    public boolean getStrictErrorChecking() {
+        throw new UnsupportedOperationException(DOMLEVEL3_ERR_MSG);
+    }
 
+    /**
+     * @since DOM Level 3
+     */
+    public void setXmlVersion(String version) {
+        throw new UnsupportedOperationException(DOMLEVEL3_ERR_MSG);
+    }
+
+    /**
+     * @since DOM Level 3
+     */
+    public String getXmlVersion() {
+        throw new UnsupportedOperationException(DOMLEVEL3_ERR_MSG);
+    }
+
+    /**
+     * @since DOM Level 3
+     */
+    public void setXmlStandalone(boolean value) {
+        throw new UnsupportedOperationException(DOMLEVEL3_ERR_MSG);
+    }
+
+    /**
+     * @since DOM Level 3
+     */
+    public boolean getXmlStandalone() {
+        throw new UnsupportedOperationException(DOMLEVEL3_ERR_MSG);
+    }
+    
+    /**
+     * @since DOM Level 3
+     */
+    public void setXmlEncoding(String version) {
+        throw new UnsupportedOperationException(DOMLEVEL3_ERR_MSG);
+    }
+
+    /**
+     * @since DOM Level 3
+     */
+    public String getXmlEncoding() {
+        throw new UnsupportedOperationException(DOMLEVEL3_ERR_MSG);
+    }
+
+    /**
+     * @since DOM Level 3
+     */
+    public String getInputEncoding() {
+        throw new UnsupportedOperationException(DOMLEVEL3_ERR_MSG);
+    }
+
+    /**
+     * @since DOM Level 3
+     */
+    public Object getUserData(String key) {
+        throw new UnsupportedOperationException(DOMLEVEL3_ERR_MSG);
+    }
+
+    /**
+     * @since DOM Level 3
+     */
+    public Object setUserData(String key, Object value, UserDataHandler 
handler) {
+        throw new UnsupportedOperationException(DOMLEVEL3_ERR_MSG);
+    }
+    
+    /**
+     * @since DOM Level 3
+     */
+    public Object getFeature(String feature, String version) { 
+        throw new UnsupportedOperationException(DOMLEVEL3_ERR_MSG);
+    }
+
+    /**
+     * @since DOM Level 3
+     */
+    public short compareDocumentPosition(Node other) throws DOMException {
+        throw new UnsupportedOperationException(DOMLEVEL3_ERR_MSG);
+    }
+
+    /**
+     * @since DOM Level 3
+     */
+    public String getBaseURI() {
+        throw new UnsupportedOperationException(DOMLEVEL3_ERR_MSG);
+    }
+
+    /**
+     * @since DOM Level 3
+     */
+    public String getTextContent() throws DOMException {
+        throw new UnsupportedOperationException(DOMLEVEL3_ERR_MSG);
+    }
+
+    /**
+     * @since DOM Level 3
+     */
+    public boolean isDefaultNamespace(String namespaceURI) {
+        throw new UnsupportedOperationException(DOMLEVEL3_ERR_MSG);
+    }
+
+    /**
+     * @since DOM Level 3
+     */
+    public boolean isEqualNode(Node arg) {
+        throw new UnsupportedOperationException(DOMLEVEL3_ERR_MSG);
+    }
+
+    /**
+     * @since DOM Level 3
+     */
+    public boolean isSameNode(Node other) {
+        throw new UnsupportedOperationException(DOMLEVEL3_ERR_MSG);
+    }
+
+    /**
+     * @since DOM Level 3
+     */
+    public String lookupNamespaceURI(String prefix) {
+        throw new UnsupportedOperationException(DOMLEVEL3_ERR_MSG);
+    }
+
+    /**
+     * @since DOM Level 3
+     */
+    public String lookupPrefix(String namespaceURI) {
+        throw new UnsupportedOperationException(DOMLEVEL3_ERR_MSG);
+    }
+
+    /**
+     * @since DOM Level 3
+     */
+    public void setTextContent(String textContent) throws DOMException {
+        throw new UnsupportedOperationException(DOMLEVEL3_ERR_MSG);
+    }
 }

Added: cocoon/trunk/src/mocks/org/w3c/dom/DOMConfiguration.java
URL: 
http://svn.apache.org/viewcvs/cocoon/trunk/src/mocks/org/w3c/dom/DOMConfiguration.java?view=auto&rev=156528
==============================================================================
--- cocoon/trunk/src/mocks/org/w3c/dom/DOMConfiguration.java (added)
+++ cocoon/trunk/src/mocks/org/w3c/dom/DOMConfiguration.java Tue Mar  8 
06:33:33 2005
@@ -0,0 +1,27 @@
+/*
+ * Copyright 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.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.w3c.dom;
+
+/**
+ * Mock class providing the declarations required to compile the Cocoon code 
when
+ * the actual library is not present. This class is required due to 
incompatible
+ * changes between JDK 1.4 and JDK 5.0 wrt the DOM interfaces (level 2 to 
level 3).
+ * 
+ * @version $Id$
+ */
+public interface DOMConfiguration {
+
+}

Propchange: cocoon/trunk/src/mocks/org/w3c/dom/DOMConfiguration.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cocoon/trunk/src/mocks/org/w3c/dom/DOMConfiguration.java
------------------------------------------------------------------------------
    svn:keywords = Id

Added: cocoon/trunk/src/mocks/org/w3c/dom/TypeInfo.java
URL: 
http://svn.apache.org/viewcvs/cocoon/trunk/src/mocks/org/w3c/dom/TypeInfo.java?view=auto&rev=156528
==============================================================================
--- cocoon/trunk/src/mocks/org/w3c/dom/TypeInfo.java (added)
+++ cocoon/trunk/src/mocks/org/w3c/dom/TypeInfo.java Tue Mar  8 06:33:33 2005
@@ -0,0 +1,27 @@
+/*
+ * Copyright 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.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.w3c.dom;
+
+/**
+ * Mock class providing the declarations required to compile the Cocoon code 
when
+ * the actual library is not present. This class is required due to 
incompatible
+ * changes between JDK 1.4 and JDK 5.0 wrt the DOM interfaces (level 2 to 
level 3).
+ * 
+ * @version $Id$
+ */
+public interface TypeInfo {
+
+}

Propchange: cocoon/trunk/src/mocks/org/w3c/dom/TypeInfo.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cocoon/trunk/src/mocks/org/w3c/dom/TypeInfo.java
------------------------------------------------------------------------------
    svn:keywords = Id

Added: cocoon/trunk/src/mocks/org/w3c/dom/UserDataHandler.java
URL: 
http://svn.apache.org/viewcvs/cocoon/trunk/src/mocks/org/w3c/dom/UserDataHandler.java?view=auto&rev=156528
==============================================================================
--- cocoon/trunk/src/mocks/org/w3c/dom/UserDataHandler.java (added)
+++ cocoon/trunk/src/mocks/org/w3c/dom/UserDataHandler.java Tue Mar  8 06:33:33 
2005
@@ -0,0 +1,27 @@
+/*
+ * Copyright 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.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.w3c.dom;
+
+/**
+ * Mock class providing the declarations required to compile the Cocoon code 
when
+ * the actual library is not present. This class is required due to 
incompatible
+ * changes between JDK 1.4 and JDK 5.0 wrt the DOM interfaces (level 2 to 
level 3).
+ * 
+ * @version $Id$
+ */
+public interface UserDataHandler {
+
+}

Propchange: cocoon/trunk/src/mocks/org/w3c/dom/UserDataHandler.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cocoon/trunk/src/mocks/org/w3c/dom/UserDataHandler.java
------------------------------------------------------------------------------
    svn:keywords = Id

Modified: cocoon/trunk/tools/src/anttasks/DocumentCache.java
URL: 
http://svn.apache.org/viewcvs/cocoon/trunk/tools/src/anttasks/DocumentCache.java?view=diff&r1=156527&r2=156528
==============================================================================
--- cocoon/trunk/tools/src/anttasks/DocumentCache.java (original)
+++ cocoon/trunk/tools/src/anttasks/DocumentCache.java Tue Mar  8 06:33:33 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.
@@ -15,6 +15,8 @@
  */
 
 import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
 import java.io.IOException;
 import java.io.StringReader;
 import java.util.HashMap;
@@ -134,8 +136,15 @@
         transformer.setOutputProperties(props);
         
         try {
+            StreamResult s = new StreamResult(file);
+            // for JDK 5.0 we explicitly have to set the output stream
+            // otherwise we get FileNotFoundExceptions (at least on
+            // windows)
+            s.setOutputStream(new FileOutputStream(file));
             transformer.transform(new DOMSource(document),
-                                  new StreamResult(file));
+                                  s);
+        } catch (FileNotFoundException e) {
+            throw new BuildException("FileNotFoundException: "+e);
         } catch (TransformerException e) {
             throw new BuildException("TransformerException: "+e);
         }


Reply via email to