cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From reinh...@apache.org
Subject svn commit: r639645 [6/7] - in /cocoon/whiteboard/corona/trunk: ./ corona-core/ corona-core/src/ corona-core/src/main/ corona-core/src/main/java/ corona-core/src/main/java/org/ corona-core/src/main/java/org/apache/ corona-core/src/main/java/org/apache/...
Date Fri, 21 Mar 2008 13:55:20 GMT
Added: cocoon/whiteboard/corona/trunk/corona-servlet/src/main/java/org/apache/excalibur/sourceresolve/jnet/source/SourceFactoriesManager.java
URL: http://svn.apache.org/viewvc/cocoon/whiteboard/corona/trunk/corona-servlet/src/main/java/org/apache/excalibur/sourceresolve/jnet/source/SourceFactoriesManager.java?rev=639645&view=auto
==============================================================================
--- cocoon/whiteboard/corona/trunk/corona-servlet/src/main/java/org/apache/excalibur/sourceresolve/jnet/source/SourceFactoriesManager.java (added)
+++ cocoon/whiteboard/corona/trunk/corona-servlet/src/main/java/org/apache/excalibur/sourceresolve/jnet/source/SourceFactoriesManager.java Fri Mar 21 06:54:32 2008
@@ -0,0 +1,70 @@
+/*
+ * 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.
+ */
+package org.apache.excalibur.sourceresolve.jnet.source;
+
+import java.util.Collections;
+import java.util.Map;
+
+public abstract class SourceFactoriesManager {
+
+    protected static final ThreadLocal<CompositeMap> FACTORIES = new InheritableThreadLocal<CompositeMap>();
+
+    protected static Map GLOBAL_FACTORIES;
+
+    public static synchronized void setGlobalFactories(Map factories) {
+        GLOBAL_FACTORIES = factories;
+    }
+
+    public static void pushFactories(Map factories) {
+        // no need to synchronize as we use a thread local
+        CompositeMap factoryMap = FACTORIES.get();
+        if (factoryMap == null) {
+            factoryMap = new CompositeMap();
+            FACTORIES.set(factoryMap);
+        }
+        factoryMap.pushMap(factories);
+    }
+
+    public static void popFactories() {
+        // no need to synchronize as we use a thread local
+        CompositeMap factoryMap = FACTORIES.get();
+        if (factoryMap != null) {
+            factoryMap.popMap();
+            if (factoryMap.getMapCount() == 0) {
+                FACTORIES.set(null);
+            }
+        } else {
+            throw new IllegalStateException("The factories stack is already empty.");
+        }
+    }
+
+    public static synchronized Map getCurrentFactories() {
+        Map factories = FACTORIES.get();
+        if (factories == null) {
+            factories = GLOBAL_FACTORIES;
+            if (factories == null) {
+                factories = Collections.EMPTY_MAP;
+            }
+        } else if (GLOBAL_FACTORIES != null) {
+            CompositeMap cm = new CompositeMap();
+            cm.pushMap(GLOBAL_FACTORIES);
+            cm.pushMap(factories);
+            factories = cm;
+        }
+        return factories;
+    }
+}

Propchange: cocoon/whiteboard/corona/trunk/corona-servlet/src/main/java/org/apache/excalibur/sourceresolve/jnet/source/SourceFactoriesManager.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cocoon/whiteboard/corona/trunk/corona-servlet/src/main/java/org/apache/excalibur/sourceresolve/jnet/source/SourceFactoriesManager.java
------------------------------------------------------------------------------
    svn:keywords = Id

Propchange: cocoon/whiteboard/corona/trunk/corona-servlet/src/main/java/org/apache/excalibur/sourceresolve/jnet/source/SourceFactoriesManager.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: cocoon/whiteboard/corona/trunk/corona-servlet/src/main/java/org/apache/excalibur/sourceresolve/jnet/source/SourceIOInputStream.java
URL: http://svn.apache.org/viewvc/cocoon/whiteboard/corona/trunk/corona-servlet/src/main/java/org/apache/excalibur/sourceresolve/jnet/source/SourceIOInputStream.java?rev=639645&view=auto
==============================================================================
--- cocoon/whiteboard/corona/trunk/corona-servlet/src/main/java/org/apache/excalibur/sourceresolve/jnet/source/SourceIOInputStream.java (added)
+++ cocoon/whiteboard/corona/trunk/corona-servlet/src/main/java/org/apache/excalibur/sourceresolve/jnet/source/SourceIOInputStream.java Fri Mar 21 06:54:32 2008
@@ -0,0 +1,129 @@
+/*
+ * 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.
+ */
+package org.apache.excalibur.sourceresolve.jnet.source;
+
+import java.io.IOException;
+import java.io.InputStream;
+
+import org.apache.excalibur.source.Source;
+import org.apache.excalibur.source.SourceFactory;
+
+public class SourceIOInputStream extends InputStream {
+
+    protected final InputStream delegate;
+
+    protected final Source source;
+
+    protected boolean closed;
+
+    protected final SourceFactory factory;
+
+    public SourceIOInputStream(SourceFactory factory, Source source) throws IOException {
+        this.source = source;
+        this.delegate = source.getInputStream();
+        this.factory = factory;
+        this.closed = false;
+    }
+
+    /**
+     * @see java.io.InputStream#available()
+     */
+    public int available() throws IOException {
+        this.check();
+        return this.delegate.available();
+    }
+
+    /**
+     * @see java.io.InputStream#close()
+     */
+    public void close() throws IOException {
+        if ( !this.closed ) {
+            this.closed = true;
+            IOException e = null;
+            try {
+                this.delegate.close();
+            } catch (IOException i) {
+                e = i;
+            } finally {
+                this.factory.release(this.source);
+            }
+            if ( e != null ) {
+                throw e;
+            }
+        }
+    }
+
+    /**
+     * @see java.io.InputStream#mark(int)
+     */
+    public void mark(int arg0) {
+        this.delegate.mark(arg0);
+    }
+
+    /**
+     * @see java.io.InputStream#markSupported()
+     */
+    public boolean markSupported() {
+        return this.delegate.markSupported();
+    }
+
+    /**
+     * @see java.io.InputStream#read()
+     */
+    public int read() throws IOException {
+        this.check();
+        return this.delegate.read();
+    }
+
+    /**
+     * @see java.io.InputStream#read(byte[], int, int)
+     */
+    public int read(byte[] arg0, int arg1, int arg2) throws IOException {
+        this.check();
+        return this.delegate.read(arg0, arg1, arg2);
+    }
+
+    /**
+     * @see java.io.InputStream#read(byte[])
+     */
+    public int read(byte[] arg0) throws IOException {
+        this.check();
+        return this.delegate.read(arg0);
+    }
+
+    /**
+     * @see java.io.InputStream#reset()
+     */
+    public void reset() throws IOException {
+        this.check();
+        this.delegate.reset();
+    }
+
+    /**
+     * @see java.io.InputStream#skip(long)
+     */
+    public long skip(long arg0) throws IOException {
+        this.check();
+        return this.delegate.skip(arg0);
+    }
+
+    protected void check() throws IOException {
+        if ( this.closed ) {
+            throw new IOException("Input stream has already been closed.");
+        }
+    }
+}

Propchange: cocoon/whiteboard/corona/trunk/corona-servlet/src/main/java/org/apache/excalibur/sourceresolve/jnet/source/SourceIOInputStream.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cocoon/whiteboard/corona/trunk/corona-servlet/src/main/java/org/apache/excalibur/sourceresolve/jnet/source/SourceIOInputStream.java
------------------------------------------------------------------------------
    svn:keywords = Id

Propchange: cocoon/whiteboard/corona/trunk/corona-servlet/src/main/java/org/apache/excalibur/sourceresolve/jnet/source/SourceIOInputStream.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: cocoon/whiteboard/corona/trunk/corona-servlet/src/main/java/org/apache/excalibur/sourceresolve/jnet/source/SourceSAXResult.java
URL: http://svn.apache.org/viewvc/cocoon/whiteboard/corona/trunk/corona-servlet/src/main/java/org/apache/excalibur/sourceresolve/jnet/source/SourceSAXResult.java?rev=639645&view=auto
==============================================================================
--- cocoon/whiteboard/corona/trunk/corona-servlet/src/main/java/org/apache/excalibur/sourceresolve/jnet/source/SourceSAXResult.java (added)
+++ cocoon/whiteboard/corona/trunk/corona-servlet/src/main/java/org/apache/excalibur/sourceresolve/jnet/source/SourceSAXResult.java Fri Mar 21 06:54:32 2008
@@ -0,0 +1,59 @@
+/*
+ * 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.
+ */
+package org.apache.excalibur.sourceresolve.jnet.source;
+
+import javax.xml.transform.sax.SAXResult;
+
+import org.apache.excalibur.source.Source;
+import org.apache.excalibur.source.SourceFactory;
+import org.apache.excalibur.xml.sax.XMLizable;
+import org.xml.sax.ContentHandler;
+import org.xml.sax.SAXException;
+
+public class SourceSAXResult extends SAXResult {
+
+    protected final Source source;
+
+    protected final SourceFactory factory;
+
+    protected final XMLizable xmlizable;
+
+    protected boolean closed = false;
+
+    public SourceSAXResult(final SourceFactory f, final Source s, final XMLizable x) {
+        this.factory = f;
+        this.source = s;
+        this.xmlizable = x;
+    }
+
+    @Override
+    public void setHandler(ContentHandler handler) {
+        if (!this.closed) {
+            try {
+                this.xmlizable.toSAX(handler);
+            } catch (SAXException se) {
+                throw new RuntimeException(se);
+            } finally {
+                this.closed = true;
+                this.factory.release(this.source);
+            }
+        } else {
+            throw new RuntimeException("Source already closed.");
+        }
+    }
+
+}

Propchange: cocoon/whiteboard/corona/trunk/corona-servlet/src/main/java/org/apache/excalibur/sourceresolve/jnet/source/SourceSAXResult.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cocoon/whiteboard/corona/trunk/corona-servlet/src/main/java/org/apache/excalibur/sourceresolve/jnet/source/SourceSAXResult.java
------------------------------------------------------------------------------
    svn:keywords = Id

Propchange: cocoon/whiteboard/corona/trunk/corona-servlet/src/main/java/org/apache/excalibur/sourceresolve/jnet/source/SourceSAXResult.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: cocoon/whiteboard/corona/trunk/corona-servlet/src/main/java/org/apache/excalibur/sourceresolve/jnet/source/SourceURLConnection.java
URL: http://svn.apache.org/viewvc/cocoon/whiteboard/corona/trunk/corona-servlet/src/main/java/org/apache/excalibur/sourceresolve/jnet/source/SourceURLConnection.java?rev=639645&view=auto
==============================================================================
--- cocoon/whiteboard/corona/trunk/corona-servlet/src/main/java/org/apache/excalibur/sourceresolve/jnet/source/SourceURLConnection.java (added)
+++ cocoon/whiteboard/corona/trunk/corona-servlet/src/main/java/org/apache/excalibur/sourceresolve/jnet/source/SourceURLConnection.java Fri Mar 21 06:54:32 2008
@@ -0,0 +1,174 @@
+/*
+ * 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.
+ */
+package org.apache.excalibur.sourceresolve.jnet.source;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.URL;
+import java.net.URLConnection;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.xml.transform.sax.SAXResult;
+
+import org.apache.excalibur.source.Source;
+import org.apache.excalibur.source.SourceFactory;
+import org.apache.excalibur.xml.sax.XMLizable;
+
+public class SourceURLConnection extends URLConnection {
+
+    protected final SourceFactory factory;
+
+    protected final String url;
+
+    protected Source source;
+
+    protected Map requestProperties;
+
+    protected String contentType = "text/plain";
+
+    public SourceURLConnection(SourceFactory factory, URL url) {
+        super(url);
+        this.factory = factory;
+        this.url = url.toExternalForm();
+    }
+
+    /**
+     * @see java.net.URLConnection#connect()
+     */
+    @Override
+    public void connect() throws IOException {
+        if (this.source != null) {
+            this.factory.release(this.source);
+            this.source = null;
+            throw new IllegalStateException("Connection to " + this.url + " already established.");
+        }
+        this.source = this.factory.getSource(this.url, this.getRequestProperties());
+        this.connected = true;
+        final String contentType = this.source.getMimeType();
+        if (contentType == null) {
+            this.contentType = contentType;
+        }
+    }
+
+    /**
+     * @see java.net.URLConnection#getInputStream()
+     */
+    @Override
+    public InputStream getInputStream() throws IOException {
+        if (!this.connected) {
+            this.connect();
+        }
+        final InputStream is;
+        is = new SourceIOInputStream(this.factory, this.source);
+        return is;
+    }
+
+    /**
+     * @see java.net.URLConnection#addRequestProperty(java.lang.String,
+     *      java.lang.String)
+     */
+    @Override
+    public void addRequestProperty(String arg0, String arg1) {
+        this.setRequestProperty(arg0, arg1);
+    }
+
+    /**
+     * @see java.net.URLConnection#getRequestProperties()
+     */
+    @Override
+    public Map getRequestProperties() {
+        if (this.connected) {
+            throw new IllegalStateException("Already connected");
+        }
+        if (this.requestProperties == null) {
+            return Collections.EMPTY_MAP;
+        }
+        return this.requestProperties;
+    }
+
+    /**
+     * @see java.net.URLConnection#getRequestProperty(java.lang.String)
+     */
+    @Override
+    public String getRequestProperty(String key) {
+        if (this.connected) {
+            throw new IllegalStateException("Already connected");
+        }
+        if (key == null) {
+            throw new NullPointerException("key is null");
+        }
+        if (this.requestProperties == null) {
+            return null;
+        }
+        return (String) this.requestProperties.get(key);
+    }
+
+    /**
+     * @see java.net.URLConnection#setRequestProperty(java.lang.String,
+     *      java.lang.String)
+     */
+    @Override
+    public void setRequestProperty(String key, String value) {
+        if (this.connected) {
+            throw new IllegalStateException("Already connected");
+        }
+        if (key == null) {
+            throw new NullPointerException("key is null");
+        }
+        if (this.requestProperties == null) {
+            this.requestProperties = new HashMap();
+        }
+        if (value == null) {
+            this.requestProperties.remove(key);
+        } else {
+            this.requestProperties.put(key, value);
+        }
+    }
+
+    /**
+     * @see java.net.URLConnection#getContentType()
+     */
+    @Override
+    public String getContentType() {
+        return this.contentType;
+    }
+
+    @Override
+    public Object getContent(Class[] classes) throws IOException {
+        if (!this.connected) {
+            this.connect();
+        }
+        if (this.source instanceof XMLizable && classes != null) {
+            boolean found = false;
+            int index = 0;
+            while (!found && index < classes.length) {
+                if (classes[index].getName().equals(SAXResult.class.getName())) {
+                    found = true;
+                } else {
+                    index++;
+                }
+            }
+            if (found) {
+                return new SourceSAXResult(this.factory, this.source, (XMLizable) this.source);
+            }
+        }
+        return super.getContent(classes);
+    }
+
+}

Propchange: cocoon/whiteboard/corona/trunk/corona-servlet/src/main/java/org/apache/excalibur/sourceresolve/jnet/source/SourceURLConnection.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cocoon/whiteboard/corona/trunk/corona-servlet/src/main/java/org/apache/excalibur/sourceresolve/jnet/source/SourceURLConnection.java
------------------------------------------------------------------------------
    svn:keywords = Id

Propchange: cocoon/whiteboard/corona/trunk/corona-servlet/src/main/java/org/apache/excalibur/sourceresolve/jnet/source/SourceURLConnection.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: cocoon/whiteboard/corona/trunk/corona-servlet/src/main/java/org/apache/excalibur/sourceresolve/jnet/source/SourceURLStreamHandler.java
URL: http://svn.apache.org/viewvc/cocoon/whiteboard/corona/trunk/corona-servlet/src/main/java/org/apache/excalibur/sourceresolve/jnet/source/SourceURLStreamHandler.java?rev=639645&view=auto
==============================================================================
--- cocoon/whiteboard/corona/trunk/corona-servlet/src/main/java/org/apache/excalibur/sourceresolve/jnet/source/SourceURLStreamHandler.java (added)
+++ cocoon/whiteboard/corona/trunk/corona-servlet/src/main/java/org/apache/excalibur/sourceresolve/jnet/source/SourceURLStreamHandler.java Fri Mar 21 06:54:32 2008
@@ -0,0 +1,47 @@
+/*
+ * 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.
+ */
+package org.apache.excalibur.sourceresolve.jnet.source;
+
+import java.io.IOException;
+import java.net.Proxy;
+import java.net.URL;
+import java.net.URLConnection;
+import java.net.URLStreamHandler;
+
+import org.apache.excalibur.source.SourceFactory;
+
+public class SourceURLStreamHandler extends URLStreamHandler {
+
+    protected final SourceFactory sourceFactory;
+
+    public SourceURLStreamHandler(SourceFactory factory) {
+        this.sourceFactory = factory;
+    }
+
+    protected URLConnection openConnection(URL url) throws IOException {
+        return new SourceURLConnection(this.sourceFactory, url);
+    }
+
+    /**
+     * @see java.net.URLStreamHandler#openConnection(java.net.URL, java.net.Proxy)
+     */
+    protected URLConnection openConnection(URL url, Proxy proxy) throws IOException {
+        return this.openConnection(url);
+    }
+
+
+}

Propchange: cocoon/whiteboard/corona/trunk/corona-servlet/src/main/java/org/apache/excalibur/sourceresolve/jnet/source/SourceURLStreamHandler.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cocoon/whiteboard/corona/trunk/corona-servlet/src/main/java/org/apache/excalibur/sourceresolve/jnet/source/SourceURLStreamHandler.java
------------------------------------------------------------------------------
    svn:keywords = Id

Propchange: cocoon/whiteboard/corona/trunk/corona-servlet/src/main/java/org/apache/excalibur/sourceresolve/jnet/source/SourceURLStreamHandler.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: cocoon/whiteboard/corona/trunk/corona-servlet/src/main/java/org/apache/excalibur/sourceresolve/jnet/source/SourceURLStreamHandlerFactory.java
URL: http://svn.apache.org/viewvc/cocoon/whiteboard/corona/trunk/corona-servlet/src/main/java/org/apache/excalibur/sourceresolve/jnet/source/SourceURLStreamHandlerFactory.java?rev=639645&view=auto
==============================================================================
--- cocoon/whiteboard/corona/trunk/corona-servlet/src/main/java/org/apache/excalibur/sourceresolve/jnet/source/SourceURLStreamHandlerFactory.java (added)
+++ cocoon/whiteboard/corona/trunk/corona-servlet/src/main/java/org/apache/excalibur/sourceresolve/jnet/source/SourceURLStreamHandlerFactory.java Fri Mar 21 06:54:32 2008
@@ -0,0 +1,40 @@
+/*
+ * 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.
+ */
+package org.apache.excalibur.sourceresolve.jnet.source;
+
+import java.net.URLStreamHandler;
+import java.util.Map;
+
+import org.apache.excalibur.source.SourceFactory;
+import org.apache.excalibur.sourceresolve.jnet.ParentAwareURLStreamHandlerFactory;
+
+public class SourceURLStreamHandlerFactory extends ParentAwareURLStreamHandlerFactory {
+
+    /**
+     * @see org.apache.excalibur.sourceresolve.jnet.ParentAwareURLStreamHandlerFactory#create(java.lang.String)
+     */
+    @Override
+    protected URLStreamHandler create(String protocol) {
+        final Map factories = SourceFactoriesManager.getCurrentFactories();
+        final SourceFactory factory = (SourceFactory) factories.get(protocol);
+        if (factory != null) {
+            return new SourceURLStreamHandler(factory);
+        }
+        return null;
+    }
+
+}

Propchange: cocoon/whiteboard/corona/trunk/corona-servlet/src/main/java/org/apache/excalibur/sourceresolve/jnet/source/SourceURLStreamHandlerFactory.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cocoon/whiteboard/corona/trunk/corona-servlet/src/main/java/org/apache/excalibur/sourceresolve/jnet/source/SourceURLStreamHandlerFactory.java
------------------------------------------------------------------------------
    svn:keywords = Id

Propchange: cocoon/whiteboard/corona/trunk/corona-servlet/src/main/java/org/apache/excalibur/sourceresolve/jnet/source/SourceURLStreamHandlerFactory.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: cocoon/whiteboard/corona/trunk/corona-servlet/src/main/java/org/apache/excalibur/sourceresolve/test/FileSource.java
URL: http://svn.apache.org/viewvc/cocoon/whiteboard/corona/trunk/corona-servlet/src/main/java/org/apache/excalibur/sourceresolve/test/FileSource.java?rev=639645&view=auto
==============================================================================
--- cocoon/whiteboard/corona/trunk/corona-servlet/src/main/java/org/apache/excalibur/sourceresolve/test/FileSource.java (added)
+++ cocoon/whiteboard/corona/trunk/corona-servlet/src/main/java/org/apache/excalibur/sourceresolve/test/FileSource.java Fri Mar 21 06:54:32 2008
@@ -0,0 +1,488 @@
+/*
+ * 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.
+ */
+package org.apache.excalibur.sourceresolve.test;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.net.MalformedURLException;
+import java.net.URLConnection;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.ConcurrentModificationException;
+
+import org.apache.excalibur.source.ModifiableSource;
+import org.apache.excalibur.source.ModifiableTraversableSource;
+import org.apache.excalibur.source.MoveableSource;
+import org.apache.excalibur.source.Source;
+import org.apache.excalibur.source.SourceException;
+import org.apache.excalibur.source.SourceNotFoundException;
+import org.apache.excalibur.source.SourceUtil;
+import org.apache.excalibur.source.SourceValidity;
+
+/**
+ * A {@link ModifiableTraversableSource} for filesystem objects.
+ * 
+ * @author <a href="mailto:dev@avalon.apache.org">Avalon Development Team</a>
+ * @version $Id$
+ */
+
+public class FileSource implements ModifiableTraversableSource, MoveableSource {
+
+    /** The file */
+    private File m_file;
+
+    /** The scheme */
+    private String m_scheme;
+
+    /** The URI of this source */
+    private String m_uri;
+
+    /**
+     * Builds a FileSource given an URI, which doesn't necessarily have to start
+     * with "file:"
+     * 
+     * @param uri
+     * @throws SourceException
+     * @throws MalformedURLException
+     */
+    public FileSource(String uri) throws SourceException, MalformedURLException {
+        int pos = SourceUtil.indexOfSchemeColon(uri);
+        if (pos == -1) {
+            throw new MalformedURLException("Invalid URI : " + uri);
+        }
+
+        String scheme = uri.substring(0, pos);
+        String fileName = uri.substring(pos + 1);
+        fileName = SourceUtil.decodePath(fileName);
+        this.init(scheme, new File(fileName));
+    }
+
+    /**
+     * Builds a FileSource, given an URI scheme and a File.
+     * 
+     * @param scheme
+     * @param file
+     * @throws SourceException
+     */
+    public FileSource(String scheme, File file) throws SourceException {
+        this.init(scheme, file);
+    }
+
+    private void init(String scheme, File file) throws SourceException {
+        this.m_scheme = scheme;
+
+        String uri;
+        try {
+            uri = file.toURL().toExternalForm();
+            // toExternalForm() is buggy, see e.g.
+            // http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4924415
+            // therefore we check if file: is followed by just one slash
+            // TODO when we move to JDK 1.4+, we should use
+            // file.toURI().toASCIIString() instead.
+            if (uri.length() > 6 && uri.startsWith("file:/") && uri.charAt(6) != '/') {
+                uri = "file:///" + uri.substring(6);
+            }
+        } catch (MalformedURLException mue) {
+            // Can this really happen ?
+            throw new SourceException("Failed to get URL for file " + file, mue);
+        }
+
+        if (!uri.startsWith(scheme)) {
+            // Scheme is not "file:"
+            uri = scheme + ':' + uri.substring(uri.indexOf(':') + 1);
+        }
+
+        this.m_uri = uri;
+
+        this.m_file = file;
+    }
+
+    /**
+     * Get the associated file
+     */
+    public File getFile() {
+        return this.m_file;
+    }
+
+    // ----------------------------------------------------------------------------------
+    // Source interface methods
+    // ----------------------------------------------------------------------------------
+
+    /**
+     * @see org.apache.excalibur.source.Source#getContentLength()
+     */
+    public long getContentLength() {
+        return this.m_file.length();
+    }
+
+    /**
+     * @see org.apache.excalibur.source.Source#getInputStream()
+     */
+    public InputStream getInputStream() throws IOException, SourceNotFoundException {
+        try {
+            return new FileInputStream(this.m_file);
+        } catch (FileNotFoundException fnfe) {
+            throw new SourceNotFoundException(this.m_uri + " doesn't exist.", fnfe);
+        }
+    }
+
+    /**
+     * @see org.apache.excalibur.source.Source#getLastModified()
+     */
+    public long getLastModified() {
+        return this.m_file.lastModified();
+    }
+
+    /**
+     * @see org.apache.excalibur.source.Source#getMimeType()
+     */
+    public String getMimeType() {
+        return URLConnection.getFileNameMap().getContentTypeFor(this.m_file.getName());
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.apache.excalibur.source.Source#getScheme()
+     */
+    public String getScheme() {
+        return this.m_scheme;
+
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.apache.excalibur.source.Source#getURI()
+     */
+    public String getURI() {
+        return this.m_uri;
+    }
+
+    /*
+     * FIXME don't use specific SourceValidity stuff here!
+     */
+    /**
+     * Return a validity object based on the file's modification date.
+     * 
+     * @see org.apache.excalibur.source.Source#getValidity()
+     */
+    public SourceValidity getValidity() {
+        return null;
+    }
+
+    /**
+     * @see org.apache.excalibur.source.Source#refresh()
+     */
+    public void refresh() {
+        // Nothing to do...
+    }
+
+    /**
+     * Does this source actually exist ?
+     * 
+     * @return true if the resource exists.
+     */
+    public boolean exists() {
+        return this.getFile().exists();
+    }
+
+    // ----------------------------------------------------------------------------------
+    // TraversableSource interface methods
+    // ----------------------------------------------------------------------------------
+
+    /**
+     * @see org.apache.excalibur.source.TraversableSource#getChild(java.lang.String)
+     */
+    public Source getChild(String name) throws SourceException {
+        if (!this.m_file.isDirectory()) {
+            throw new SourceException(this.getURI() + " is not a directory");
+        }
+
+        return new FileSource(this.getScheme(), new File(this.m_file, name));
+
+    }
+
+    /**
+     * @see org.apache.excalibur.source.TraversableSource#getChildren()
+     */
+    public Collection getChildren() throws SourceException {
+
+        if (!this.m_file.isDirectory()) {
+            throw new SourceException(this.getURI() + " is not a directory");
+        }
+
+        // Build a FileSource object for each of the children
+        File[] files = this.m_file.listFiles();
+
+        FileSource[] children = new FileSource[files.length];
+        for (int i = 0; i < files.length; i++) {
+            children[i] = new FileSource(this.getScheme(), files[i]);
+        }
+
+        // Return it as a list
+        return Arrays.asList(children);
+    }
+
+    /**
+     * @see org.apache.excalibur.source.TraversableSource#getName()
+     */
+    public String getName() {
+        return this.m_file.getName();
+    }
+
+    /**
+     * @see org.apache.excalibur.source.TraversableSource#getParent()
+     */
+    public Source getParent() throws SourceException {
+        return new FileSource(this.getScheme(), this.m_file.getParentFile());
+    }
+
+    /**
+     * @see org.apache.excalibur.source.TraversableSource#isCollection()
+     */
+    public boolean isCollection() {
+        return this.m_file.isDirectory();
+    }
+
+    // ----------------------------------------------------------------------------------
+    // ModifiableSource interface methods
+    // ----------------------------------------------------------------------------------
+
+    /**
+     * Get an <code>InputStream</code> where raw bytes can be written to. The
+     * signification of these bytes is implementation-dependent and is not
+     * restricted to a serialized XML document.
+     * 
+     * The output stream returned actually writes to a temp file that replaces
+     * the real one on close. This temp file is used as lock to forbid multiple
+     * simultaneous writes. The real file is updated atomically when the output
+     * stream is closed.
+     * 
+     * The returned stream must be closed or cancelled by the calling code.
+     * 
+     * @return a stream to write to
+     * @throws ConcurrentModificationException
+     *             if another thread is currently writing to this file.
+     */
+    public OutputStream getOutputStream() throws IOException {
+        // Create a temp file. It will replace the right one when writing
+        // terminates,
+        // and serve as a lock to prevent concurrent writes.
+        File tmpFile = new File(this.getFile().getPath() + ".tmp");
+
+        // Ensure the directory exists
+        tmpFile.getParentFile().mkdirs();
+
+        // Can we write the file ?
+        if (this.getFile().exists() && !this.getFile().canWrite()) {
+            throw new IOException("Cannot write to file " + this.getFile().getPath());
+        }
+
+        // Check if it temp file already exists, meaning someone else currently
+        // writing
+        if (!tmpFile.createNewFile()) {
+            throw new ConcurrentModificationException("File " + this.getFile().getPath()
+                    + " is already being written by another thread");
+        }
+
+        // Return a stream that will rename the temp file on close.
+        return new FileSourceOutputStream(tmpFile, this);
+    }
+
+    /**
+     * Can the data sent to an <code>OutputStream</code> returned by
+     * {@link #getOutputStream()} be cancelled ?
+     * 
+     * @return true if the stream can be cancelled
+     */
+    public boolean canCancel(OutputStream stream) {
+        if (stream instanceof FileSourceOutputStream) {
+            FileSourceOutputStream fsos = (FileSourceOutputStream) stream;
+            if (fsos.getSource() == this) {
+                return fsos.canCancel();
+            }
+        }
+
+        // Not a valid stream for this source
+        throw new IllegalArgumentException("The stream is not associated to this source");
+    }
+
+    /**
+     * Cancel the data sent to an <code>OutputStream</code> returned by
+     * {@link #getOutputStream()}.
+     * <p>
+     * After cancel, the stream should no more be used.
+     */
+    public void cancel(OutputStream stream) throws SourceException {
+        if (stream instanceof FileSourceOutputStream) {
+            FileSourceOutputStream fsos = (FileSourceOutputStream) stream;
+            if (fsos.getSource() == this) {
+                try {
+                    fsos.cancel();
+                } catch (Exception e) {
+                    throw new SourceException("Exception during cancel.", e);
+                }
+                return;
+            }
+        }
+
+        // Not a valid stream for this source
+        throw new IllegalArgumentException("The stream is not associated to this source");
+    }
+
+    /**
+     * Delete the source.
+     */
+    public void delete() throws SourceException {
+        if (!this.m_file.exists()) {
+            throw new SourceNotFoundException("Cannot delete non-existing file " + this.m_file.toString());
+        }
+
+        if (!this.m_file.delete()) {
+            throw new SourceException("Could not delete " + this.m_file.toString() + " (unknown reason)");
+        }
+    }
+
+    // ----------------------------------------------------------------------------------
+    // ModifiableTraversableSource interface methods
+    // ----------------------------------------------------------------------------------
+
+    /**
+     * @see org.apache.excalibur.source.ModifiableTraversableSource#makeCollection()
+     */
+    public void makeCollection() throws SourceException {
+        this.m_file.mkdirs();
+    }
+
+    // ----------------------------------------------------------------------------------
+    // MoveableSource interface methods
+    // ----------------------------------------------------------------------------------
+
+    /**
+     * @see org.apache.excalibur.source.MoveableSource#copyTo(org.apache.excalibur.source.Source)
+     */
+    public void copyTo(Source destination) throws SourceException {
+        try {
+            SourceUtil.copy(this.getInputStream(), ((ModifiableSource) destination).getOutputStream());
+        } catch (IOException ioe) {
+            throw new SourceException("Couldn't copy " + this.getURI() + " to " + destination.getURI(), ioe);
+        }
+    }
+
+    /**
+     * @see org.apache.excalibur.source.MoveableSource#moveTo(org.apache.excalibur.source.Source)
+     */
+    public void moveTo(Source destination) throws SourceException {
+        if (destination instanceof FileSource) {
+            final File dest = ((FileSource) destination).getFile();
+            final File parent = dest.getParentFile();
+
+            if (parent != null) {
+                parent.mkdirs(); // ensure parent directories exist
+            }
+
+            if (!this.m_file.renameTo(dest)) {
+                throw new SourceException("Couldn't move " + this.getURI() + " to " + destination.getURI());
+            }
+        } else {
+            SourceUtil.move(this, destination);
+        }
+
+    }
+
+    // ----------------------------------------------------------------------------------
+    // Private helper class for ModifiableSource implementation
+    // ----------------------------------------------------------------------------------
+
+    /**
+     * A file outputStream that will rename the temp file to the destination
+     * file upon close() and discard the temp file upon cancel().
+     */
+    private static class FileSourceOutputStream extends FileOutputStream {
+
+        private File m_tmpFile;
+
+        private boolean m_isClosed = false;
+
+        private FileSource m_source;
+
+        public FileSourceOutputStream(File tmpFile, FileSource source) throws IOException {
+            super(tmpFile);
+            this.m_tmpFile = tmpFile;
+            this.m_source = source;
+        }
+
+        @Override
+        public void close() throws IOException {
+            if (!this.m_isClosed) {
+                super.close();
+                try {
+                    // Delete destination file
+                    if (this.m_source.getFile().exists()) {
+                        this.m_source.getFile().delete();
+                    }
+                    // Rename temp file to destination file
+                    if (!this.m_tmpFile.renameTo(this.m_source.getFile())) {
+                        throw new IOException("Could not rename " + this.m_tmpFile.getAbsolutePath() + " to "
+                                + this.m_source.getFile().getAbsolutePath());
+                    }
+
+                } finally {
+                    // Ensure temp file is deleted, ie lock is released.
+                    // If there was a failure above, written data is lost.
+                    if (this.m_tmpFile.exists()) {
+                        this.m_tmpFile.delete();
+                    }
+                    this.m_isClosed = true;
+                }
+            }
+
+        }
+
+        public boolean canCancel() {
+            return !this.m_isClosed;
+        }
+
+        public void cancel() throws Exception {
+            if (this.m_isClosed) {
+                throw new IllegalStateException("Cannot cancel : outputstrem is already closed");
+            }
+
+            this.m_isClosed = true;
+            super.close();
+            this.m_tmpFile.delete();
+        }
+
+        @Override
+        public void finalize() {
+            if (!this.m_isClosed && this.m_tmpFile.exists()) {
+                // Something wrong happened while writing : delete temp file
+                this.m_tmpFile.delete();
+            }
+        }
+
+        public FileSource getSource() {
+            return this.m_source;
+        }
+    }
+}

Propchange: cocoon/whiteboard/corona/trunk/corona-servlet/src/main/java/org/apache/excalibur/sourceresolve/test/FileSource.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cocoon/whiteboard/corona/trunk/corona-servlet/src/main/java/org/apache/excalibur/sourceresolve/test/FileSource.java
------------------------------------------------------------------------------
    svn:keywords = Id

Propchange: cocoon/whiteboard/corona/trunk/corona-servlet/src/main/java/org/apache/excalibur/sourceresolve/test/FileSource.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: cocoon/whiteboard/corona/trunk/corona-servlet/src/main/java/org/apache/excalibur/sourceresolve/test/FileSourceFactory.java
URL: http://svn.apache.org/viewvc/cocoon/whiteboard/corona/trunk/corona-servlet/src/main/java/org/apache/excalibur/sourceresolve/test/FileSourceFactory.java?rev=639645&view=auto
==============================================================================
--- cocoon/whiteboard/corona/trunk/corona-servlet/src/main/java/org/apache/excalibur/sourceresolve/test/FileSourceFactory.java (added)
+++ cocoon/whiteboard/corona/trunk/corona-servlet/src/main/java/org/apache/excalibur/sourceresolve/test/FileSourceFactory.java Fri Mar 21 06:54:32 2008
@@ -0,0 +1,62 @@
+/*
+ * 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.
+ */
+package org.apache.excalibur.sourceresolve.test;
+
+import java.io.IOException;
+import java.net.MalformedURLException;
+import java.util.Map;
+
+import org.apache.excalibur.source.Source;
+import org.apache.excalibur.source.SourceFactory;
+import org.apache.excalibur.source.SourceUtil;
+import org.apache.excalibur.source.URIAbsolutizer;
+
+/**
+ * A factory for filesystem-based sources (see {@link FileSource}).
+ * 
+ * @author <a href="mailto:dev@avalon.apache.org">Avalon Development Team</a>
+ * @version $Id$
+ */
+public class FileSourceFactory implements SourceFactory, URIAbsolutizer {
+
+    /**
+     * @see org.apache.excalibur.source.SourceFactory#getSource(java.lang.String,
+     *      java.util.Map)
+     */
+    public Source getSource(String location, Map parameters) throws IOException, MalformedURLException {
+        return new FileSource(location);
+    }
+
+    /**
+     * Does nothing, since {@link FileSource}s don't need to be released.
+     * 
+     * @see org.apache.excalibur.source.SourceFactory#release(org.apache.excalibur.source.Source)
+     */
+    public void release(Source source) {
+        // Nothing to do here
+    }
+
+    public String absolutize(String baseURI, String location) {
+        // Call the absolutize utility method with false for the normalizePath
+        // argument.
+        // This avoids the removal of "../" from the path.
+        // This way, the "../" will be resolved by the operating system, which
+        // might
+        // do things differently e.g. in case of symbolic links.
+        return SourceUtil.absolutize(baseURI, location, false, false);
+    }
+}

Propchange: cocoon/whiteboard/corona/trunk/corona-servlet/src/main/java/org/apache/excalibur/sourceresolve/test/FileSourceFactory.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cocoon/whiteboard/corona/trunk/corona-servlet/src/main/java/org/apache/excalibur/sourceresolve/test/FileSourceFactory.java
------------------------------------------------------------------------------
    svn:keywords = Id

Propchange: cocoon/whiteboard/corona/trunk/corona-servlet/src/main/java/org/apache/excalibur/sourceresolve/test/FileSourceFactory.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: cocoon/whiteboard/corona/trunk/corona-servlet/src/main/java/org/apache/excalibur/sourceresolve/test/Test.java
URL: http://svn.apache.org/viewvc/cocoon/whiteboard/corona/trunk/corona-servlet/src/main/java/org/apache/excalibur/sourceresolve/test/Test.java?rev=639645&view=auto
==============================================================================
--- cocoon/whiteboard/corona/trunk/corona-servlet/src/main/java/org/apache/excalibur/sourceresolve/test/Test.java (added)
+++ cocoon/whiteboard/corona/trunk/corona-servlet/src/main/java/org/apache/excalibur/sourceresolve/test/Test.java Fri Mar 21 06:54:32 2008
@@ -0,0 +1,49 @@
+/*
+ * 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.
+ */
+package org.apache.excalibur.sourceresolve.test;
+
+import java.io.InputStream;
+import java.net.URL;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.apache.excalibur.source.SourceFactory;
+import org.apache.excalibur.sourceresolve.jnet.Installer;
+import org.apache.excalibur.sourceresolve.jnet.source.SourceFactoriesManager;
+import org.apache.excalibur.sourceresolve.jnet.source.SourceURLStreamHandlerFactory;
+
+public class Test {
+
+    public static void main(String[] args) {
+        try {
+            Installer.setURLStreamHandlerFactory(new SourceURLStreamHandlerFactory());
+            Installer.setURLStreamHandlerFactory(new SourceURLStreamHandlerFactory());
+            final Map<String, SourceFactory> factories = new HashMap<String, SourceFactory>();
+            factories.put("carsten", new FileSourceFactory());
+            SourceFactoriesManager.setGlobalFactories(factories);
+            final URL url = new URL("carsten:///F:/os/cocoon/trunk/pom.xml");
+            final InputStream is = (InputStream) url.getContent();
+            final byte[] b = new byte[100];
+            int l = is.read(b);
+            System.out.println(new String(b, 0, l));
+            is.close();
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+    }
+
+}

Propchange: cocoon/whiteboard/corona/trunk/corona-servlet/src/main/java/org/apache/excalibur/sourceresolve/test/Test.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cocoon/whiteboard/corona/trunk/corona-servlet/src/main/java/org/apache/excalibur/sourceresolve/test/Test.java
------------------------------------------------------------------------------
    svn:keywords = Id

Propchange: cocoon/whiteboard/corona/trunk/corona-servlet/src/main/java/org/apache/excalibur/sourceresolve/test/Test.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: cocoon/whiteboard/corona/trunk/corona-servlet/src/main/java/org/apache/excalibur/xml/sax/XMLizable.java
URL: http://svn.apache.org/viewvc/cocoon/whiteboard/corona/trunk/corona-servlet/src/main/java/org/apache/excalibur/xml/sax/XMLizable.java?rev=639645&view=auto
==============================================================================
--- cocoon/whiteboard/corona/trunk/corona-servlet/src/main/java/org/apache/excalibur/xml/sax/XMLizable.java (added)
+++ cocoon/whiteboard/corona/trunk/corona-servlet/src/main/java/org/apache/excalibur/xml/sax/XMLizable.java Fri Mar 21 06:54:32 2008
@@ -0,0 +1,28 @@
+/*
+ * 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.
+ */
+package org.apache.excalibur.xml.sax;
+
+import org.xml.sax.ContentHandler;
+import org.xml.sax.SAXException;
+
+public interface XMLizable {
+
+    void toSAX(ContentHandler handler) throws SAXException;
+
+}

Propchange: cocoon/whiteboard/corona/trunk/corona-servlet/src/main/java/org/apache/excalibur/xml/sax/XMLizable.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cocoon/whiteboard/corona/trunk/corona-servlet/src/main/java/org/apache/excalibur/xml/sax/XMLizable.java
------------------------------------------------------------------------------
    svn:keywords = Id

Propchange: cocoon/whiteboard/corona/trunk/corona-servlet/src/main/java/org/apache/excalibur/xml/sax/XMLizable.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: cocoon/whiteboard/corona/trunk/corona-servlet/src/main/resources/COB-INF/sitemap.xmap
URL: http://svn.apache.org/viewvc/cocoon/whiteboard/corona/trunk/corona-servlet/src/main/resources/COB-INF/sitemap.xmap?rev=639645&view=auto
==============================================================================
--- cocoon/whiteboard/corona/trunk/corona-servlet/src/main/resources/COB-INF/sitemap.xmap (added)
+++ cocoon/whiteboard/corona/trunk/corona-servlet/src/main/resources/COB-INF/sitemap.xmap Fri Mar 21 06:54:32 2008
@@ -0,0 +1,218 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<map:sitemap xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://apache.org/cocoon/sitemap/1.0 http://cocoon.apache.org/schema/sitemap/cocoon-sitemap-1.0.xsd"
+  xmlns:map="http://apache.org/cocoon/sitemap/1.0">
+
+  <map:flow language="it-controller" />
+
+  <map:pipelines>
+    <!-- ~~~~~~~~~~~~~~~~ map:read ~~~~~~~~~~~~~~~ -->
+    <map:pipeline id="read">
+      <map:match pattern="">
+        <map:read src="overview.html" />
+      </map:match>
+      <map:match pattern="read/javascript-resource-explicit">
+        <map:read src="read/javascript-resource" mime-type="text/javascript" />
+      </map:match>
+      <map:match pattern="read/javascript-resource-implicit">
+        <map:read src="read/javascript-resource.js" />
+      </map:match>
+    </map:pipeline>
+
+    <!-- ~~~~~~~~~~~~~~~~ sax pipelines ~~~~~~~~~~~~~~~ -->
+    <map:pipeline id="sax-pipelines">
+      <map:match pattern="sax-pipeline/simple">
+        <map:generate src="sax-pipeline/simple.xml" />
+        <map:transform src="sax-pipeline/simple.xslt">
+          <map:parameter name="myParam" value="1" />
+        </map:transform>
+        <map:serialize />
+      </map:match>
+      <map:match pattern="sax-pipeline/simple-xhtml">
+        <map:generate src="sax-pipeline/simple.xml" />
+        <map:transform src="sax-pipeline/simple.xslt">
+          <map:parameter name="myParam" value="2" />
+        </map:transform>
+        <map:serialize type="xhtml" />
+      </map:match>
+      <map:match pattern="sax-pipeline/simple-xml">
+        <map:generate src="sax-pipeline/simple.xml" />
+        <map:transform src="sax-pipeline/simple.xslt">
+          <map:parameter name="myParam" value="3" />
+        </map:transform>
+        <map:serialize type="xml" />
+      </map:match>
+      <map:match pattern="sax-pipeline/unauthorized">
+        <map:generate src="sax-pipeline/unauthorized.xml" />
+        <map:serialize type="xhtml" status-code="401" />
+      </map:match>
+    </map:pipeline>
+
+    <!-- ~~~~~~~~~~~~~~~~ caching of pipelines ~~~~~~~~~~~~~~~ -->
+    <map:pipeline id="caching-pipeline-on">
+      <map:match pattern="caching-pipeline/on">
+        <map:generate type="date" />
+        <map:serialize type="xml" />
+      </map:match>
+    </map:pipeline>
+
+    <map:pipeline id="caching-pipeline-off" type="noncaching">
+      <map:match pattern="caching-pipeline/off">
+        <map:generate type="date" />
+        <map:serialize type="xml" />
+      </map:match>
+    </map:pipeline>
+
+    <!-- ~~~~~~~~~~~~~~~~ servlet service framework ~~~~~~~~~~~~~~~ -->
+    <map:pipeline id="ssf">
+      <map:match pattern="ssf/local">
+        <map:generate src="servlet:/sax-pipeline/simple-xml" />
+        <map:serialize type="xml" />
+      </map:match>
+    </map:pipeline>
+
+    <!-- ~~~~~~~~~~~~~~~~ expression language ~~~~~~~~~~~~~~~ -->
+    <map:pipeline id="expression-language">
+      <map:match pattern="expression-language/jexl">
+        <map:generate src="sax-pipeline/{jexl:cocoon.request.fileName}.xml" />
+        <map:serialize type="xml" />
+      </map:match>
+      <map:match pattern="expression-language/jxpath">
+        <map:generate src="sax-pipeline/{$cocoon/request/parameters/fileName}.xml" />
+        <map:serialize type="xml" />
+      </map:match>
+      <map:match pattern="expression-language/map/*">
+        <map:generate src="sax-pipeline/{map:1}.xml" />
+        <map:serialize type="xml" />
+      </map:match>
+      <map:match pattern="**">
+        <map:match pattern="expression-language/*/*">
+          <map:match pattern="expression-language/nested/*">
+            <map:generate src="sax-pipeline/{map:../2}.xml" />
+            <map:serialize type="xml" />
+          </map:match>
+          <map:match pattern="expression-language/nested2/*">
+            <map:generate src="sax-pipeline/{map:1}.xml" />
+            <map:serialize type="xml" />
+          </map:match>
+        </map:match>
+      </map:match>
+      <map:match pattern="expression-language/**">
+        <map:match pattern="expression-language/nested3/*">
+          <map:generate src="sax-pipeline/{map:1}.xml" />
+          <map:serialize type="xml" />
+        </map:match>
+      </map:match>
+    </map:pipeline>
+
+    <!-- ~~~~~~~~~~~~~~~~ aggregation ~~~~~~~~~~~~~~~ -->
+    <map:pipeline id="aggregation">
+      <map:match pattern="aggregation/include-transformer">
+        <map:generate src="aggregation/include.xml" />
+        <map:transform type="include" />
+        <map:serialize type="xml" />
+      </map:match>
+      <map:match pattern="aggregation/sub-request">
+        <map:generate src="aggregation/sub.xml" />
+        <map:serialize type="xml" />
+      </map:match>
+    </map:pipeline>
+
+    <!-- ~~~~~~~~~~~~~~~~ xslt ~~~~~~~~~~~~~~~ -->
+    <map:pipeline id="xslt">
+      <map:match pattern="xslt/main">
+        <map:generate src="sax-pipeline/simple.xml" />
+        <map:transform src="xslt/main.xslt" />
+        <map:serialize type="xml" />
+      </map:match>
+      <map:match pattern="xslt/sub-servlet.xslt">
+        <map:generate src="xslt/sub-servlet.xslt" />
+        <map:serialize type="xml" />
+      </map:match>
+    </map:pipeline>
+
+    <!-- ~~~~~~~~~~~~~~~~ matcher: parameter passing ~~~~~~~~~~~~~~~ -->
+    <map:pipeline id="parameter-passing">
+      <map:match pattern="parameter-passing/failing">
+        <map:match type="parameter-passing" pattern="empty">
+          <map:generate src="sax-pipeline/simple.xml" />
+          <map:serialize />
+        </map:match>
+      </map:match>
+      <map:match pattern="parameter-passing/working">
+        <map:match type="parameter-passing">
+          <map:generate src="sax-pipeline/simple.xml" />
+          <map:serialize type="xml" />
+        </map:match>
+      </map:match>
+    </map:pipeline>
+
+    <!-- ~~~~~~~~~~~~~~~~ object model ~~~~~~~~~~~~~~~ -->
+    <map:pipeline id="object-model">
+      <map:match pattern="object-model/request-parameters">
+        <map:generate type="request-parameters" />
+        <map:serialize type="xml" />
+      </map:match>
+    </map:pipeline>
+
+    <!-- ~~~~~~~~~~~~~~~~ controller ~~~~~~~~~~~~~~~ -->
+    <map:pipeline id="controller">
+      <map:match pattern="controller/invoke">
+        <map:call function="any-function" />
+      </map:match>
+      <map:match pattern="controller/continue">
+        <map:call continuation="any-continuation" />
+      </map:match>
+    </map:pipeline>
+
+    <!-- ~~~~~~~~~~~~~~~~ redirect ~~~~~~~~~~~~~~~ -->
+    <map:pipeline id="redirect">
+      <map:match pattern="redirect/www.orf.at">
+        <map:redirect-to uri="http://www.orf.at" />
+      </map:match>
+      <!-- Redirecting to a servlet service doesn't work -->
+      <!--map:match pattern="redirect/sax-pipeline/simple-xml">
+        <map:redirect-to uri="servlet:/sax-pipeline/simple-xml"/>
+        </map:match-->
+    </map:pipeline>
+
+    <!-- ~~~~~~~~~~~~~~~~ error handling ~~~~~~~~~~~~~~~ -->
+    <map:pipeline id="error-handling-1">
+      <map:match pattern="error-handling/custom-error">
+        <map:act type="error-throwing" />
+        <map:generate src="sax-pipeline/simple.xml" />
+        <map:serialize type="xml" />
+      </map:match>
+    </map:pipeline>
+    <!-- doesn't work: when this per pipeline error handler is active, it catches ALL error and
+      the per-sitemap error handler will never be reached. -->
+    <map:pipeline id="error-handling-2">
+      <map:match pattern="error-handling/custom-error-per-pipeline-error-handling">
+        <map:act type="error-throwing" />
+        <map:generate src="sax-pipeline/simple.xml" />
+        <map:serialize type="xml" />
+      </map:match>
+      <map:handle-errors>
+        <map:generate src="error-handling/501.xml" />
+        <map:serialize type="xhtml" status-code="501" />
+      </map:handle-errors>
+    </map:pipeline>
+    <map:handle-errors>
+      <map:select type="custom-exception">
+        <map:when test="not-found">
+          <map:generate src="error-handling/404.xml" />
+          <map:serialize type="xhtml" status-code="404" />
+        </map:when>
+        <map:when test="custom-exception">
+          <map:generate src="error-handling/500.xml" />
+          <map:serialize type="xhtml" status-code="500" />
+        </map:when>
+        <map:otherwise>
+          <map:generate type="exception" src="error-handling/503.xml" />
+          <map:serialize type="xhtml" status-code="503" />
+        </map:otherwise>
+      </map:select>
+    </map:handle-errors>
+  </map:pipelines>
+
+</map:sitemap>

Propchange: cocoon/whiteboard/corona/trunk/corona-servlet/src/main/resources/COB-INF/sitemap.xmap
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cocoon/whiteboard/corona/trunk/corona-servlet/src/main/resources/COB-INF/sitemap.xmap
------------------------------------------------------------------------------
    svn:keywords = Id

Propchange: cocoon/whiteboard/corona/trunk/corona-servlet/src/main/resources/COB-INF/sitemap.xmap
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: cocoon/whiteboard/corona/trunk/corona-servlet/src/main/resources/META-INF/cocoon/spring/servlet-service.xml
URL: http://svn.apache.org/viewvc/cocoon/whiteboard/corona/trunk/corona-servlet/src/main/resources/META-INF/cocoon/spring/servlet-service.xml?rev=639645&view=auto
==============================================================================
--- cocoon/whiteboard/corona/trunk/corona-servlet/src/main/resources/META-INF/cocoon/spring/servlet-service.xml (added)
+++ cocoon/whiteboard/corona/trunk/corona-servlet/src/main/resources/META-INF/cocoon/spring/servlet-service.xml Fri Mar 21 06:54:32 2008
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  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
+  und
+-->
+<!-- $Id$ -->
+<beans xmlns="http://www.springframework.org/schema/beans"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xmlns:servlet="http://cocoon.apache.org/schema/servlet"
+  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
+  http://cocoon.apache.org/schema/servlet http://cocoon.apache.org/schema/servlet/cocoon-servlet-1.0.xsd">
+
+  <bean id="org.apache.cocoon.corona.demo.servlet" class="org.apache.cocoon.corona.servlet.SitemapServlet">
+    <servlet:context mount-path="" context-path="blockcontext:/corona-servlet/"/>
+  </bean>
+
+</beans>

Propchange: cocoon/whiteboard/corona/trunk/corona-servlet/src/main/resources/META-INF/cocoon/spring/servlet-service.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cocoon/whiteboard/corona/trunk/corona-servlet/src/main/resources/META-INF/cocoon/spring/servlet-service.xml
------------------------------------------------------------------------------
    svn:keywords = Id

Propchange: cocoon/whiteboard/corona/trunk/corona-servlet/src/main/resources/META-INF/cocoon/spring/servlet-service.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: cocoon/whiteboard/corona/trunk/corona-servlet/src/main/resources/aggregation/include.xml
URL: http://svn.apache.org/viewvc/cocoon/whiteboard/corona/trunk/corona-servlet/src/main/resources/aggregation/include.xml?rev=639645&view=auto
==============================================================================
--- cocoon/whiteboard/corona/trunk/corona-servlet/src/main/resources/aggregation/include.xml (added)
+++ cocoon/whiteboard/corona/trunk/corona-servlet/src/main/resources/aggregation/include.xml Fri Mar 21 06:54:32 2008
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  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.
+-->
+<sample>
+  <i:include xmlns:i="http://apache.org/cocoon/include/1.0"
+    src="servlet:/aggregation/sub-request"/>
+</sample>

Propchange: cocoon/whiteboard/corona/trunk/corona-servlet/src/main/resources/aggregation/include.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cocoon/whiteboard/corona/trunk/corona-servlet/src/main/resources/aggregation/include.xml
------------------------------------------------------------------------------
    svn:keywords = Id

Propchange: cocoon/whiteboard/corona/trunk/corona-servlet/src/main/resources/aggregation/include.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: cocoon/whiteboard/corona/trunk/corona-servlet/src/main/resources/aggregation/sub.xml
URL: http://svn.apache.org/viewvc/cocoon/whiteboard/corona/trunk/corona-servlet/src/main/resources/aggregation/sub.xml?rev=639645&view=auto
==============================================================================
--- cocoon/whiteboard/corona/trunk/corona-servlet/src/main/resources/aggregation/sub.xml (added)
+++ cocoon/whiteboard/corona/trunk/corona-servlet/src/main/resources/aggregation/sub.xml Fri Mar 21 06:54:32 2008
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  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.
+-->
+<sub>sub</sub>

Propchange: cocoon/whiteboard/corona/trunk/corona-servlet/src/main/resources/aggregation/sub.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cocoon/whiteboard/corona/trunk/corona-servlet/src/main/resources/aggregation/sub.xml
------------------------------------------------------------------------------
    svn:keywords = Id

Propchange: cocoon/whiteboard/corona/trunk/corona-servlet/src/main/resources/aggregation/sub.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: cocoon/whiteboard/corona/trunk/corona-servlet/src/main/resources/error-handling/404.xml
URL: http://svn.apache.org/viewvc/cocoon/whiteboard/corona/trunk/corona-servlet/src/main/resources/error-handling/404.xml?rev=639645&view=auto
==============================================================================
--- cocoon/whiteboard/corona/trunk/corona-servlet/src/main/resources/error-handling/404.xml (added)
+++ cocoon/whiteboard/corona/trunk/corona-servlet/src/main/resources/error-handling/404.xml Fri Mar 21 06:54:32 2008
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  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.
+-->
+<html>
+  <head>
+    <title>404 Resource Not Available (Cocoon Integration Tests)</title>
+  </head>
+  <body>404 Resource Not Available (Cocoon Integration Tests)</body>
+</html>

Propchange: cocoon/whiteboard/corona/trunk/corona-servlet/src/main/resources/error-handling/404.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cocoon/whiteboard/corona/trunk/corona-servlet/src/main/resources/error-handling/404.xml
------------------------------------------------------------------------------
    svn:keywords = Id

Propchange: cocoon/whiteboard/corona/trunk/corona-servlet/src/main/resources/error-handling/404.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: cocoon/whiteboard/corona/trunk/corona-servlet/src/main/resources/error-handling/500.xml
URL: http://svn.apache.org/viewvc/cocoon/whiteboard/corona/trunk/corona-servlet/src/main/resources/error-handling/500.xml?rev=639645&view=auto
==============================================================================
--- cocoon/whiteboard/corona/trunk/corona-servlet/src/main/resources/error-handling/500.xml (added)
+++ cocoon/whiteboard/corona/trunk/corona-servlet/src/main/resources/error-handling/500.xml Fri Mar 21 06:54:32 2008
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  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.
+-->
+<html>
+  <head>
+    <title>Error 500 (Cocoon Integration Tests)</title>
+  </head>
+  <body>Error 500 (Cocoon Integration Tests)</body>
+</html>

Propchange: cocoon/whiteboard/corona/trunk/corona-servlet/src/main/resources/error-handling/500.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cocoon/whiteboard/corona/trunk/corona-servlet/src/main/resources/error-handling/500.xml
------------------------------------------------------------------------------
    svn:keywords = Id

Propchange: cocoon/whiteboard/corona/trunk/corona-servlet/src/main/resources/error-handling/500.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: cocoon/whiteboard/corona/trunk/corona-servlet/src/main/resources/error-handling/501.xml
URL: http://svn.apache.org/viewvc/cocoon/whiteboard/corona/trunk/corona-servlet/src/main/resources/error-handling/501.xml?rev=639645&view=auto
==============================================================================
--- cocoon/whiteboard/corona/trunk/corona-servlet/src/main/resources/error-handling/501.xml (added)
+++ cocoon/whiteboard/corona/trunk/corona-servlet/src/main/resources/error-handling/501.xml Fri Mar 21 06:54:32 2008
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  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.
+-->
+<html>
+  <head>
+    <title>Error 501 (Cocoon Integration Tests)</title>
+  </head>
+  <body>Error 501 (Cocoon Integration Tests)</body>
+</html>

Propchange: cocoon/whiteboard/corona/trunk/corona-servlet/src/main/resources/error-handling/501.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cocoon/whiteboard/corona/trunk/corona-servlet/src/main/resources/error-handling/501.xml
------------------------------------------------------------------------------
    svn:keywords = Id

Propchange: cocoon/whiteboard/corona/trunk/corona-servlet/src/main/resources/error-handling/501.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: cocoon/whiteboard/corona/trunk/corona-servlet/src/main/resources/error-handling/503.xml
URL: http://svn.apache.org/viewvc/cocoon/whiteboard/corona/trunk/corona-servlet/src/main/resources/error-handling/503.xml?rev=639645&view=auto
==============================================================================
--- cocoon/whiteboard/corona/trunk/corona-servlet/src/main/resources/error-handling/503.xml (added)
+++ cocoon/whiteboard/corona/trunk/corona-servlet/src/main/resources/error-handling/503.xml Fri Mar 21 06:54:32 2008
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  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.
+-->
+<html>
+  <head>
+    <title>Error 503 (Cocoon Integration Tests)</title>
+  </head>
+  <body>Error 503 (Cocoon Integration Tests)</body>
+</html>

Propchange: cocoon/whiteboard/corona/trunk/corona-servlet/src/main/resources/error-handling/503.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cocoon/whiteboard/corona/trunk/corona-servlet/src/main/resources/error-handling/503.xml
------------------------------------------------------------------------------
    svn:keywords = Id

Propchange: cocoon/whiteboard/corona/trunk/corona-servlet/src/main/resources/error-handling/503.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: cocoon/whiteboard/corona/trunk/corona-servlet/src/main/resources/overview.html
URL: http://svn.apache.org/viewvc/cocoon/whiteboard/corona/trunk/corona-servlet/src/main/resources/overview.html?rev=639645&view=auto
==============================================================================
--- cocoon/whiteboard/corona/trunk/corona-servlet/src/main/resources/overview.html (added)
+++ cocoon/whiteboard/corona/trunk/corona-servlet/src/main/resources/overview.html Fri Mar 21 06:54:32 2008
@@ -0,0 +1,82 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!--
+  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.
+-->
+<html>
+  <head>
+    <title>Micro Cocoon Integration Tests: Overview</title>
+  <base target="_blank"/>
+  </head>
+  <body>
+    <h1>Micro Cocoon Integration Tests</h1>
+  <h2>map:read</h2>
+  <ul>
+    <li><a href="read/javascript-resource-explicit">Javascript Resource</a>: Test explicit setting of mime-type.</li>
+    <li><a href="read/javascript-resource-implicit">Javascript Resource</a>: Test automatic setting of mime-type.</li>
+  </ul>
+  <h2>SAX Pipelines</h2>
+  <ul>
+    <li><a href="sax-pipeline/simple">SAX Pipeline</a>: Simplest possible pipeline that has a generator, transformer and serializer.</li>
+    <li><a href="sax-pipeline/simple-xhtml">SAX Pipeline</a>: Same as before but creates XHTML as output format.</li>
+    <li><a href="sax-pipeline/simple-xml">SAX Pipeline</a>: Same as before but creates XML as output format.</li>
+    <li><a href="sax-pipeline/unauthorized">Status code</a>: Set status code '401' at pipeline.</li>
+  </ul>
+  <h2>Error handling</h2>
+  <ul>
+    <li><a href="123456789123456789">ResourceNotFound</a>: The error handler catches all exceptions, in this case no matcher matches.</li>
+    <li><a href="error-handling/custom-error">Custom error - Sitemap</a>: Catch a custom error in the sitemap.</li>
+    <li><a href="error-handling/custom-error-per-pipeline-error-handling">
+      Custom error - Pipeline</a>: Catch a custom error using a per-pipeline error handler. <b>*** doesn't work ***</b></li>
+  </ul>
+  <h2>Servlet-Service-Components and servlet: protocol</h2>
+  <ul>
+    <li><a href="ssf/local">servlet:/</a>: Using a local servlet service.</li>
+  </ul>
+  <h2>Expression language</h2>
+  <ul>
+    <li><a href="expression-language/jexl?fileName=simple">request attribute (jexl)</a>: Accessing a request attribute using Jexl.</li>
+    <li><a href="expression-language/jxpath?fileName=simple">request attribute (jxpath)</a>: Accessing a request attribute using JXPath.</li>
+    <li><a href="expression-language/map/simple">sitemap parameter</a>: Accessing a sitemap parameter.</li>
+    <li><a href="expression-language/nested/simple">nested matchers</a>: Accessing a parameter from one level above.</li>
+  </ul>
+  <h2>Redirects</h2>
+  <ul>
+    <li><a href="redirect/www.orf.at">Temporary (302)</a>: Temporary redirect to orf.at.</li>
+  </ul>
+  <h2>Object Model</h2>
+  <ul>
+    <li><a href="object-model/request-parameters?a=1&b=2&c=3">All request parameters</a>: Print all request parameters.</li>
+  </ul>
+  <h2>Aggregation</h2>
+  <ul>
+    <li><a href="aggregation/include-transformer">Include-Transformer</a>: Aggregate XML using the IncludeTransformer.</li>
+  </ul>
+  <h2>XSLT</h2>
+  <ul>
+    <li><a href="xslt/main">XSLT Transformation</a>: An XSLT transformation that includes stylesheets via file and servlet protocol.</li>
+  </ul>
+  <h2>Parameter passing</h2>
+  <ul>
+    <li><a href="parameter-passing/working">Matching Matcher</a>: Passing a named parameter from a matcher to the sitemap.</li>
+    <li><a href="parameter-passing/failing">Not-Matching Matcher</a>: Passing null from a matcher to the sitemap.</li>
+  </ul>
+  <h2>Controller</h2>
+  <ul>
+    <li><a href="controller/invoke">Invoke a controller</a>: Invoke a controller (the first time). (returns 201)</li>
+    <li><a href="controller/continue">Continue</a>: Continue a controller. (returns 202)</li>
+  </ul>
+  </body>
+</html>

Propchange: cocoon/whiteboard/corona/trunk/corona-servlet/src/main/resources/overview.html
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cocoon/whiteboard/corona/trunk/corona-servlet/src/main/resources/overview.html
------------------------------------------------------------------------------
    svn:mime-type = text/html

Added: cocoon/whiteboard/corona/trunk/corona-servlet/src/main/resources/read/javascript-resource
URL: http://svn.apache.org/viewvc/cocoon/whiteboard/corona/trunk/corona-servlet/src/main/resources/read/javascript-resource?rev=639645&view=auto
==============================================================================
--- cocoon/whiteboard/corona/trunk/corona-servlet/src/main/resources/read/javascript-resource (added)
+++ cocoon/whiteboard/corona/trunk/corona-servlet/src/main/resources/read/javascript-resource Fri Mar 21 06:54:32 2008
@@ -0,0 +1,20 @@
+/*
+ * 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.
+ */
+
+function x() {
+  alert('x');
+}
\ No newline at end of file

Added: cocoon/whiteboard/corona/trunk/corona-servlet/src/main/resources/read/javascript-resource.js
URL: http://svn.apache.org/viewvc/cocoon/whiteboard/corona/trunk/corona-servlet/src/main/resources/read/javascript-resource.js?rev=639645&view=auto
==============================================================================
--- cocoon/whiteboard/corona/trunk/corona-servlet/src/main/resources/read/javascript-resource.js (added)
+++ cocoon/whiteboard/corona/trunk/corona-servlet/src/main/resources/read/javascript-resource.js Fri Mar 21 06:54:32 2008
@@ -0,0 +1,20 @@
+/*
+ * 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.
+ */
+
+function x() {
+  alert('x');
+}

Propchange: cocoon/whiteboard/corona/trunk/corona-servlet/src/main/resources/read/javascript-resource.js
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cocoon/whiteboard/corona/trunk/corona-servlet/src/main/resources/read/javascript-resource.js
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: cocoon/whiteboard/corona/trunk/corona-servlet/src/main/resources/sax-pipeline/simple.xml
URL: http://svn.apache.org/viewvc/cocoon/whiteboard/corona/trunk/corona-servlet/src/main/resources/sax-pipeline/simple.xml?rev=639645&view=auto
==============================================================================
--- cocoon/whiteboard/corona/trunk/corona-servlet/src/main/resources/sax-pipeline/simple.xml (added)
+++ cocoon/whiteboard/corona/trunk/corona-servlet/src/main/resources/sax-pipeline/simple.xml Fri Mar 21 06:54:32 2008
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  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.
+-->
+<simple>simple-text</simple>

Propchange: cocoon/whiteboard/corona/trunk/corona-servlet/src/main/resources/sax-pipeline/simple.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cocoon/whiteboard/corona/trunk/corona-servlet/src/main/resources/sax-pipeline/simple.xml
------------------------------------------------------------------------------
    svn:keywords = Id

Propchange: cocoon/whiteboard/corona/trunk/corona-servlet/src/main/resources/sax-pipeline/simple.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml



Mime
View raw message