cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From simonetrip...@apache.org
Subject svn commit: r934171 - in /cocoon/cocoon3/trunk/cocoon-sax/src: main/java/org/apache/cocoon/sax/component/ test/java/org/apache/cocoon/sax/component/ test/resources/
Date Wed, 14 Apr 2010 20:14:55 GMT
Author: simonetripodi
Date: Wed Apr 14 20:14:55 2010
New Revision: 934171

URL: http://svn.apache.org/viewvc?rev=934171&view=rev
Log:
COCOON3-54 LinkRewriterTransformer porting from Cocoon 2.X by Francesco Chicchiriccò

Added:
    cocoon/cocoon3/trunk/cocoon-sax/src/main/java/org/apache/cocoon/sax/component/LinkRewriter.java
  (with props)
    cocoon/cocoon3/trunk/cocoon-sax/src/main/java/org/apache/cocoon/sax/component/LinkRewriterTransformer.java
  (with props)
    cocoon/cocoon3/trunk/cocoon-sax/src/main/java/org/apache/cocoon/sax/component/LinkRewritingException.java
  (with props)
    cocoon/cocoon3/trunk/cocoon-sax/src/main/java/org/apache/cocoon/sax/component/ToRewrite.java
  (with props)
    cocoon/cocoon3/trunk/cocoon-sax/src/test/java/org/apache/cocoon/sax/component/LinkRewriterTransformerTest.java
  (with props)
    cocoon/cocoon3/trunk/cocoon-sax/src/test/resources/apache_home.html   (with props)

Added: cocoon/cocoon3/trunk/cocoon-sax/src/main/java/org/apache/cocoon/sax/component/LinkRewriter.java
URL: http://svn.apache.org/viewvc/cocoon/cocoon3/trunk/cocoon-sax/src/main/java/org/apache/cocoon/sax/component/LinkRewriter.java?rev=934171&view=auto
==============================================================================
--- cocoon/cocoon3/trunk/cocoon-sax/src/main/java/org/apache/cocoon/sax/component/LinkRewriter.java
(added)
+++ cocoon/cocoon3/trunk/cocoon-sax/src/main/java/org/apache/cocoon/sax/component/LinkRewriter.java
Wed Apr 14 20:14:55 2010
@@ -0,0 +1,29 @@
+/*
+ * 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.cocoon.sax.component;
+
+public interface LinkRewriter {
+
+    String rewrite(String elementNamespace,
+            String elementName,
+            String atributeNamespace,
+            String attributeName,
+            String link) throws LinkRewritingException;
+
+}

Propchange: cocoon/cocoon3/trunk/cocoon-sax/src/main/java/org/apache/cocoon/sax/component/LinkRewriter.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cocoon/cocoon3/trunk/cocoon-sax/src/main/java/org/apache/cocoon/sax/component/LinkRewriter.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: cocoon/cocoon3/trunk/cocoon-sax/src/main/java/org/apache/cocoon/sax/component/LinkRewriter.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: cocoon/cocoon3/trunk/cocoon-sax/src/main/java/org/apache/cocoon/sax/component/LinkRewriterTransformer.java
URL: http://svn.apache.org/viewvc/cocoon/cocoon3/trunk/cocoon-sax/src/main/java/org/apache/cocoon/sax/component/LinkRewriterTransformer.java?rev=934171&view=auto
==============================================================================
--- cocoon/cocoon3/trunk/cocoon-sax/src/main/java/org/apache/cocoon/sax/component/LinkRewriterTransformer.java
(added)
+++ cocoon/cocoon3/trunk/cocoon-sax/src/main/java/org/apache/cocoon/sax/component/LinkRewriterTransformer.java
Wed Apr 14 20:14:55 2010
@@ -0,0 +1,110 @@
+/*
+ * 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.cocoon.sax.component;
+
+import org.apache.cocoon.pipeline.caching.CacheKey;
+import org.apache.cocoon.pipeline.caching.SimpleCacheKey;
+import org.apache.cocoon.pipeline.component.CachingPipelineComponent;
+import org.apache.cocoon.sax.AbstractSAXTransformer;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.xml.sax.Attributes;
+import org.xml.sax.SAXException;
+import org.xml.sax.helpers.AttributesImpl;
+
+public class LinkRewriterTransformer extends AbstractSAXTransformer implements CachingPipelineComponent
{
+
+    private final Log log = LogFactory.getLog(this.getClass());
+
+    private final LinkRewriter linkRewriter;
+
+    private final ToRewrite toRewrite;
+
+    public LinkRewriterTransformer(LinkRewriter linkRewriter, ToRewrite toRewrite) {
+        this.linkRewriter = linkRewriter;
+        this.toRewrite = toRewrite;
+    }
+
+    @Override
+    public void startElement(String uri, String localName, String name, Attributes atts)
+            throws SAXException {
+
+        if (log.isDebugEnabled()) {
+            log.debug("Processing ("
+                    + uri
+                    + ","
+                    + localName
+                    + ","
+                    + name
+                    + ","
+                    + atts
+                    + ")");
+        }
+
+        String attributeNamespace = null;
+        String attributeName = null;
+        String attributeValue = null;
+        for (int i = 0; i < atts.getLength(); i++) {
+            attributeNamespace = atts.getURI(i);
+            attributeName = atts.getLocalName(i);
+            if (this.log.isDebugEnabled()) {
+                this.log.debug("Examining attribute " + attributeName);
+            }
+
+            if (this.toRewrite.contains(uri, name, attributeNamespace, attributeName)) {
+                if (this.log.isDebugEnabled()) {
+                    this.log.debug("Element has attributes to rewrite");
+                }
+
+                attributeValue = atts.getValue(i);
+                atts = new AttributesImpl(atts);
+                try {
+                    ((AttributesImpl) atts).setValue(i,
+                            this.linkRewriter.rewrite(uri, name, attributeNamespace, attributeName,
attributeValue));
+                } catch (LinkRewritingException e) {
+                    this.log.error("While rewriting link '"
+                            + attributeValue
+                            + "' ("
+                            + name
+                            + "/@"
+                            + attributeName
+                            + ")", e);
+                }
+            }
+        }
+
+        if (this.log.isDebugEnabled()) {
+            this.log.debug("Finished processing ("
+                    + uri
+                    + ","
+                    + localName
+                    + ","
+                    + name
+                    + ","
+                    + atts
+                    + ")");
+        }
+
+        super.startElement(uri, localName, name, atts);
+    }
+
+    public CacheKey constructCacheKey() {
+        return new SimpleCacheKey();
+    }
+}

Propchange: cocoon/cocoon3/trunk/cocoon-sax/src/main/java/org/apache/cocoon/sax/component/LinkRewriterTransformer.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cocoon/cocoon3/trunk/cocoon-sax/src/main/java/org/apache/cocoon/sax/component/LinkRewriterTransformer.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: cocoon/cocoon3/trunk/cocoon-sax/src/main/java/org/apache/cocoon/sax/component/LinkRewriterTransformer.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: cocoon/cocoon3/trunk/cocoon-sax/src/main/java/org/apache/cocoon/sax/component/LinkRewritingException.java
URL: http://svn.apache.org/viewvc/cocoon/cocoon3/trunk/cocoon-sax/src/main/java/org/apache/cocoon/sax/component/LinkRewritingException.java?rev=934171&view=auto
==============================================================================
--- cocoon/cocoon3/trunk/cocoon-sax/src/main/java/org/apache/cocoon/sax/component/LinkRewritingException.java
(added)
+++ cocoon/cocoon3/trunk/cocoon-sax/src/main/java/org/apache/cocoon/sax/component/LinkRewritingException.java
Wed Apr 14 20:14:55 2010
@@ -0,0 +1,34 @@
+/*
+ * 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.cocoon.sax.component;
+
+import org.apache.cocoon.pipeline.ProcessingException;
+
+public class LinkRewritingException extends ProcessingException {
+
+    private static final long serialVersionUID = 1L;
+
+    public LinkRewritingException(String message) {
+        super(message);
+    }
+
+    public LinkRewritingException(String message, Throwable cause) {
+        super(message, cause);
+    }
+}

Propchange: cocoon/cocoon3/trunk/cocoon-sax/src/main/java/org/apache/cocoon/sax/component/LinkRewritingException.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cocoon/cocoon3/trunk/cocoon-sax/src/main/java/org/apache/cocoon/sax/component/LinkRewritingException.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: cocoon/cocoon3/trunk/cocoon-sax/src/main/java/org/apache/cocoon/sax/component/LinkRewritingException.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: cocoon/cocoon3/trunk/cocoon-sax/src/main/java/org/apache/cocoon/sax/component/ToRewrite.java
URL: http://svn.apache.org/viewvc/cocoon/cocoon3/trunk/cocoon-sax/src/main/java/org/apache/cocoon/sax/component/ToRewrite.java?rev=934171&view=auto
==============================================================================
--- cocoon/cocoon3/trunk/cocoon-sax/src/main/java/org/apache/cocoon/sax/component/ToRewrite.java
(added)
+++ cocoon/cocoon3/trunk/cocoon-sax/src/main/java/org/apache/cocoon/sax/component/ToRewrite.java
Wed Apr 14 20:14:55 2010
@@ -0,0 +1,135 @@
+/*
+ * 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.cocoon.sax.component;
+
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Set;
+
+public final class ToRewrite {
+
+    final private Map<Element, Set<Element>> elements;
+
+    public ToRewrite() {
+        elements = new HashMap<Element, Set<Element>>();
+    }
+
+    public void addElement(String elementNamespace,
+            String elementName,
+            String atributeNamespace,
+            String attributeName) {
+        if (elementName == null) {
+            throw new IllegalArgumentException("Parameter 'elementName' must not be null");
+        }
+        if (attributeName == null) {
+            throw new IllegalArgumentException("Parameter 'attributeName' must not be null");
+        }
+        Element key = new Element(elementNamespace, elementName);
+        Set<Element> attributes;
+        if (this.elements.containsKey(key)) {
+            attributes = this.elements.get(key);
+        } else {
+            attributes = new HashSet<Element>();
+            this.elements.put(key, attributes);
+        }
+        attributes.add(new Element(atributeNamespace, attributeName));
+    }
+
+    public boolean contains(String elementNamespace,
+            String elementName,
+            String atributeNamespace,
+            String attributeName) {
+        Element element = new Element(elementNamespace, elementName);
+        return this.elements.containsKey(element) &&
+                this.elements.get(element).contains(new Element(atributeNamespace, attributeName));
+    }
+
+    private final class Element {
+
+        private static final String EMPTY = "";
+
+        private final String namespace;
+
+        private final String name;
+
+        public Element(String namespace, String name) {
+            if (namespace != null) {
+                this.namespace = namespace;
+            } else {
+                this.namespace = EMPTY;
+            }
+            this.name = name;
+        }
+
+        public String getNamespace() {
+            return namespace;
+        }
+
+        public String getName() {
+            return name;
+        }
+
+        @Override
+        public int hashCode() {
+            final int prime = 97;
+            int result = 7;
+            result = prime * result + ((namespace == null) ? 0 : namespace.hashCode());
+            result = prime * result + ((name == null) ? 0 : name.hashCode());
+            return result;
+        }
+
+        @Override
+        public boolean equals(Object obj) {
+            if (this == obj) {
+                return true;
+            }
+
+            if (obj == null) {
+                return false;
+            }
+
+            if (this.getClass() != obj.getClass()) {
+                return false;
+            }
+
+            Element other = (Element) obj;
+
+            if (this.namespace == null) {
+                if (other.getNamespace() != null) {
+                    return false;
+                }
+            } else if (!this.namespace.equals(other.getNamespace())) {
+                return false;
+            }
+
+            if (this.name == null) {
+                if (other.getName() != null) {
+                    return false;
+                }
+            } else if (!this.name.equals(other.getName())) {
+                return false;
+            }
+
+            return true;
+        }
+
+    }
+
+}

Propchange: cocoon/cocoon3/trunk/cocoon-sax/src/main/java/org/apache/cocoon/sax/component/ToRewrite.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cocoon/cocoon3/trunk/cocoon-sax/src/main/java/org/apache/cocoon/sax/component/ToRewrite.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: cocoon/cocoon3/trunk/cocoon-sax/src/main/java/org/apache/cocoon/sax/component/ToRewrite.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: cocoon/cocoon3/trunk/cocoon-sax/src/test/java/org/apache/cocoon/sax/component/LinkRewriterTransformerTest.java
URL: http://svn.apache.org/viewvc/cocoon/cocoon3/trunk/cocoon-sax/src/test/java/org/apache/cocoon/sax/component/LinkRewriterTransformerTest.java?rev=934171&view=auto
==============================================================================
--- cocoon/cocoon3/trunk/cocoon-sax/src/test/java/org/apache/cocoon/sax/component/LinkRewriterTransformerTest.java
(added)
+++ cocoon/cocoon3/trunk/cocoon-sax/src/test/java/org/apache/cocoon/sax/component/LinkRewriterTransformerTest.java
Wed Apr 14 20:14:55 2010
@@ -0,0 +1,142 @@
+/*
+ * 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.cocoon.sax.component;
+
+import static junit.framework.Assert.assertTrue;
+
+import java.io.BufferedReader;
+import java.io.ByteArrayOutputStream;
+import java.io.InputStreamReader;
+import java.net.URL;
+
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.parsers.SAXParserFactory;
+
+import org.apache.cocoon.pipeline.NonCachingPipeline;
+import org.apache.cocoon.pipeline.Pipeline;
+import org.apache.cocoon.sax.SAXPipelineComponent;
+import org.custommonkey.xmlunit.Diff;
+import org.custommonkey.xmlunit.XMLUnit;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+public final class LinkRewriterTransformerTest {
+
+    @BeforeClass
+    public static void setUp() {
+        XMLUnit.setIgnoreWhitespace(true);
+        XMLUnit.setIgnoreComments(true);
+        XMLUnit.setIgnoreAttributeOrder(true);
+
+        SAXParserFactory saxParserFactory = SAXParserFactory.newInstance();
+        saxParserFactory.setValidating(false);
+        try {
+            saxParserFactory.setFeature(
+                    "http://apache.org/xml/features/nonvalidating/load-external-dtd",
+                    false);
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        XMLUnit.setSAXParserFactory(saxParserFactory);
+
+        DocumentBuilderFactory documentBuilderfactory =
+                DocumentBuilderFactory.newInstance();
+        documentBuilderfactory.setNamespaceAware(true);
+        documentBuilderfactory.setValidating(false);
+        try {
+            documentBuilderfactory.setFeature(
+                    "http://apache.org/xml/features/nonvalidating/load-external-dtd",
+                    false);
+        } catch (ParserConfigurationException e) {
+        }
+        XMLUnit.setControlDocumentBuilderFactory(documentBuilderfactory);
+        XMLUnit.setTestDocumentBuilderFactory(documentBuilderfactory);
+    }
+
+    /**
+     * Test that all non-absolute HTTP links are rewritten as absolute links.
+     */
+    @Test
+    public void testXhtmlLinkRewriting() throws Exception {
+        URL source = this.getClass().getResource("/apache_home.html");
+
+        ToRewrite toRewrite = new ToRewrite();
+        toRewrite.addElement("http://www.w3.org/1999/xhtml",
+                "a",
+                "",
+                "href");
+        toRewrite.addElement("http://www.w3.org/1999/xhtml",
+                "link",
+                null,
+                "href");
+
+        Pipeline<SAXPipelineComponent> pipeline = new NonCachingPipeline<SAXPipelineComponent>();
+        pipeline.addComponent(new XMLGenerator(source));
+        pipeline.addComponent(new LinkRewriterTransformer(new AbsoluteRewriter(),
+                toRewrite));
+        pipeline.addComponent(new XMLSerializer());
+
+        ByteArrayOutputStream baos = new ByteArrayOutputStream();
+        pipeline.setup(baos);
+        pipeline.execute();
+
+        String actualDocument = new String(baos.toByteArray(), "UTF-8");
+
+        StringBuffer expectedDocumentBuffer = new StringBuffer();
+        BufferedReader in = new BufferedReader(
+                new InputStreamReader(
+                source.openStream()));
+        String inputLine;
+        while ((inputLine = in.readLine()) != null) {
+            expectedDocumentBuffer.append(inputLine);
+            expectedDocumentBuffer.append("\n");
+        }
+        in.close();
+
+        String expectedDocument = expectedDocumentBuffer.toString();
+        expectedDocument = expectedDocument.replaceAll(
+                "href=\"/", "href=\"http://www.apache.org/").replaceAll(
+                "href=\"\\./", "href=\"http://www.apache.org/").replaceAll(
+                "href=\"foundation", "href=\"http://www.apache.org/foundation");
+
+        Diff diff = new Diff(expectedDocument, actualDocument);
+
+        assertTrue("LinkRewrite transformation didn't work as expected " + diff,
+                diff.identical());
+    }
+
+    class AbsoluteRewriter implements LinkRewriter {
+
+        public String rewrite(String elementNamespace,
+                String elementName,
+                String atributeNamespace,
+                String attributeName,
+                String link) throws LinkRewritingException {
+
+            String rewrittenLink = link;
+            if (!link.startsWith("http")) {
+                rewrittenLink = "http://www.apache.org"
+                        + (link.startsWith(".")
+                        ? link.substring(1) : (!link.startsWith("/")
+                        ? "/" + link : link));
+            }
+            return rewrittenLink;
+        }
+    }
+
+}

Propchange: cocoon/cocoon3/trunk/cocoon-sax/src/test/java/org/apache/cocoon/sax/component/LinkRewriterTransformerTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cocoon/cocoon3/trunk/cocoon-sax/src/test/java/org/apache/cocoon/sax/component/LinkRewriterTransformerTest.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: cocoon/cocoon3/trunk/cocoon-sax/src/test/java/org/apache/cocoon/sax/component/LinkRewriterTransformerTest.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: cocoon/cocoon3/trunk/cocoon-sax/src/test/resources/apache_home.html
URL: http://svn.apache.org/viewvc/cocoon/cocoon3/trunk/cocoon-sax/src/test/resources/apache_home.html?rev=934171&view=auto
==============================================================================
--- cocoon/cocoon3/trunk/cocoon-sax/src/test/resources/apache_home.html (added)
+++ cocoon/cocoon3/trunk/cocoon-sax/src/test/resources/apache_home.html Wed Apr 14 20:14:55
2010
@@ -0,0 +1,255 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+               "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.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 xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+   <!--
+      XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
+            This file is generated from XML source: DO NOT EDIT!
+      XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
+   -->
+	<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
+	<link rel="stylesheet" href="./style/compressed.css" type="text/css" media="screen, projection"/>
+	<link rel="stylesheet" href="./style/style.css" type="text/css" media="screen, projection"/>
+	<!--[if IE]><link rel="stylesheet" href="./style/ie.css" type="text/css" media="screen,
projection"/><![endif]-->
+<link rel="alternate" title="announce@apache.org Archives" type="application/atom+xml"
href="http://mail-archives.apache.org/mod_mbox/www-announce/?format=atom" />
+     <meta name="author" content="The Apache Software Foundation" /><meta name="email"
content="apache.AT.apache.DOT.org" />
+    <title>Welcome! - The Apache Software Foundation</title>
+  
+ </head>
+ <body>
+ 	<div class="navigation">
+		<ul>
+			<li><a href="./foundation" title="About the Foundation">Foundation</a></li>
+			<li><a href="http://projects.apache.org" title="Apache Projects">Projects</a></li>
+			<li><a href="http://people.apache.org" title="Apache People">People</a></li>
+			<li><a href="./foundation/getinvolved.html" title="Get involved in Apache">Get
Involved</a></li>
+			<li><a href="./foundation/sponsorship.html" title="Support the mission of Apache">Support
Apache</a></li>			
+			<li class="dlink"><a href="./dyn/closer.cgi" title="Download Apache projects">Download</a></li>
+			<li><a href="http://blogs.apache.org/foundation/" title="Foundation Blog">ASF
Blog</a></li>
+			<li><a href="http://blogs.apache.org" title="Project Blogs">Project Blogs</a></li>
+		</ul>
+	</div>
+	<div class="container">
+	<hr class="space col"/>
+	<div class="block">
+		<div class="column span-24">
+      <div id="header">
+                          <h1>The Apache Software Foundation<br />
+  <span class="alt"><small>Celebrating a Decade of Open Source Leadership.</small></span></h1><p
class="blurb">The Apache Software Foundation provides support for the Apache community
of open-source software projects.  The <a href="http://projects.apache.org/">Apache
projects</a> are characterized by a collaborative, consensus based development process,
an open and pragmatic software license, and a desire to create high quality software that
leads the way in its field.</p><p class="highlight">We are more than a group of
projects sharing a server, we are a <em>community</em> of developers and users.</p>
+               </div>
+      </div>
+	</div>
+	<hr/>
+	<div class="block">
+    		<div class="column span-15 first append-1">
+			<h3>
+                          Latest News
+              </h3>
+		</div>
+		<div class="column span-8 las search">
+    			<form action="http://www.google.com/search" method="get">
+		         <input value="*.apache.org" name="sitesearch" type="hidden"/>
+		         <input size="10" name="q" id="query" type="text"/>
+		         <input name="Search" value="Go" type="submit"/>
+	       </form>
+		</div>
+	</div>
+	<div class="block content">
+		<div class="column span-15 colborder">
+                            
+<div class="section-content">
+<p><em>If you would like to keep up with news and announcements from the foundation
and all its projects, you can subscribe to the <a href="foundation/mailinglists.html#foundation-announce">Apache
Announcements List</a> or you can visit <a href="https://blogs.apache.org/foundation/">our
foundation blog</a></em>. Latest blog entries:</p>
+<p>
+<a href="https://blogs.apache.org/foundation/entry/the_apache_software_foundation_receives">
Oracle agrees to purchase the IP and all assets of The Apache Software Foundation for $1.5
Billion.</a>
+<br /><i>Posted at: 10:00 PM Apr 1, 2010</i></p>
+<p>
+<a href="https://blogs.apache.org/foundation/entry/the_apache_software_foundation_announces2">The
Apache Software Foundation Announces the 15th Anniversary of the Apache HTTP Web Server</a>
+<br /><i>Posted at: 2:00 PM Feb 23, 2010</i></p>
+<p>
+<a href="https://blogs.apache.org/foundation/entry/the_apache_software_foundation_announces1">The
Apache Software Foundation Announces Apache SpamAssassin Version 3.3.0</a>
+<br /><i>Posted at: 3:04 PM Jan 26, 2010</i></p>
+<p>
+<a href="https://blogs.apache.org/foundation/entry/the_apache_software_foundation_announces">The
Apache Software Foundation Announces Apache Pivot as Top-Level Project</a>
+<br /><i>Posted at: 11:11 AM Jan 20, 2010</i></p>
+<p>
+<a href="https://blogs.apache.org/foundation/entry/the_apache_software_foundation_welcomes">The
Apache Software Foundation Welcomes Facebook as its Newest Sponsor</a>
+<br /><i>Posted at: 6:00 PM Jan 12, 2010</i></p>
+<p>
+<a href="https://blogs.apache.org/foundation/entry/notice_apache_spamassassin_y2k10_rule">NOTICE:
Apache SpamAssassin Y2K10 Rule Bug - Update Your Rules Now!</a>
+<br /><i>Posted at: 4:56 PM Jan 2, 2010</i></p>
+</div>
+         </div>
+    <div class="column span-8 last">
+      <div class="block">
+        <div class="nav column span-11">
+          <div>
+               <div class="menuheader"><a 
+href="http://projects.apache.org/">Apache Projects</a></div> 
+  <ul>
+          <li><a href="http://httpd.apache.org/" title="Apache Web Server (httpd)">HTTP
Server</a></li> 
+          <li><a href="http://abdera.apache.org/" title="Atom Publishing Protocol
Implementation">Abdera</a></li> 
+          <li><a href="http://activemq.apache.org/" title="Distributed Messaging
System">ActiveMQ</a></li> 
+          <li><a href="http://ant.apache.org/" title="Java-based build tool">Ant</a></li>

+          <li><a href="http://apr.apache.org/" title="Apache Portable Runtime libraries">APR</a></li>

+          <li><a href="http://archiva.apache.org/" title="Build Artifact Repository
Manager">Archiva</a></li> 
+          <li><a href="http://buildr.apache.org/" title="Simple and intuitive build
system for Java applications">Buildr</a></li> 
+          <li><a href="http://camel.apache.org/" title="Spring based Integration
Framework which implements the Enterprise Integration Patterns">Camel</a></li>

+          <li><a href="http://cayenne.apache.org/" title="User-friendly Java ORM
with Tools">Cayenne</a></li> 
+          <li><a href="http://click.apache.org/" title="User-friendly page and component
oriented web framework">Click</a></li> 
+          <li><a href="http://cocoon.apache.org/" title="Web development framework:
separation of concerns, component-based">Cocoon</a></li> 
+          <li><a href="http://commons.apache.org/" title="Reusable Java components">Commons</a></li>

+          <li><a href="http://continuum.apache.org/" title="Continuous Integration
and Build Server">Continuum</a></li> 
+          <li><a href="http://couchdb.apache.org/" title="RESTful document database">CouchDB</a></li>

+          <li><a href="http://cxf.apache.org/" title="Service Framework">CXF</a></li>

+          <li><a href="http://db.apache.org/" title="Database access">DB</a></li>

+          <li><a href="http://directory.apache.org/" title="Apache Directory Server">Directory</a></li>

+          <li><a href="http://excalibur.apache.org/" title="Embeddable software
libraries related to component and service management access">Excalibur</a></li>

+          <li><a href="http://felix.apache.org/" title="OSGi Framework and components.">Felix</a></li>

+          <li><a href="http://forrest.apache.org/" title="Aggregated multi-channel
documentation, separation of concerns">Forrest</a></li> 
+          <li><a href="http://geronimo.apache.org/" title="Java2, Enterprise Edition
(J2EE) container">Geronimo</a></li> 
+          <li><a href="http://gump.apache.org/" title="Continuous integration of
open source projects">Gump</a></li> 
+          <li><a href="http://hadoop.apache.org/" title="Distributed computing platform">Hadoop</a></li>

+          <li><a href="http://harmony.apache.org/" title="Open source implementation
of Java SE">Harmony</a></li> 
+          <li><a href="http://hc.apache.org/" title="Java toolset of low level HTTP
components">HttpComponents</a></li> 
+          <li><a href="http://ibatis.apache.org/" title="SQL Data Mapper for Java
and .NET">iBATIS</a></li> 
+          <li><a href="http://incubator.apache.org/" title="Shepherd for new projects">Incubator</a></li>

+          <li><a href="http://jackrabbit.apache.org/" title="Content Repository
for Java">Jackrabbit</a></li> 
+          <li><a href="http://jakarta.apache.org/" title="Server-side Java">Jakarta</a></li>

+          <li><a href="http://james.apache.org/" title="Java Apache Mail Enterprise
Server">James</a></li> 
+          <li><a href="http://labs.apache.org/" title="The Innovation Laboratories
of the Apache Software Foundation">Labs</a></li> 
+          <li><a href="http://lenya.apache.org/" title="Content Management System">Lenya</a></li>

+          <li><a href="http://logging.apache.org/" title="Cross-language logging
services">Logging</a></li> 
+          <li><a href="http://lucene.apache.org/" title="Search engine library">Lucene</a></li>

+          <li><a href="http://maven.apache.org/" title="Java project management
and comprehension tools">Maven</a></li> 
+          <li><a href="http://mina.apache.org/" title="Multipurpose Infrastructure
for Network Application">Mina</a></li> 
+          <li><a href="http://myfaces.apache.org/" title="JavaServer(tm) Faces implementation
and components">MyFaces</a></li> 
+          <li><a href="http://ode.apache.org/" title="Orchestration Director Engine:
Business Process Management (BPM), Process Orchestration and Workflow through service compositioni.">ODE</a></li>

+          <li><a href="http://ofbiz.apache.org/" title="Open for Business: enterprise
automation software">OFBiz</a></li> 
+          <li><a href="http://openejb.apache.org/" title="OpenEJB: a modular, configurable,
and extendable EJB Container System and Server">OpenEJB</a></li> 
+          <li><a href="http://openjpa.apache.org/" title="OpenJPA: Object Relational
Mapping for Java">OpenJPA</a></li> 
+          <li><a href="http://openwebbeans.apache.org/" title="OpenWebBeans: JSR-299
Context and Dependency Injection for Java EE Platform Implementation">OpenWebBeans</a></li>

+          <li><a href="http://pdfbox.apache.org/" title="Java library for working
with PDF documents">PDFBox</a></li> 
+          <li><a href="http://perl.apache.org/" title="Dynamic websites using Perl">Perl</a></li>

+          <li><a href="http://pivot.apache.org/" title="Rich Internet applications
in Java">Pivot</a></li> 
+          <li><a href="http://poi.apache.org/" title="Java API for OLE 2 Compound
Documents">POI</a></li> 
+          <li><a href="http://portals.apache.org/" title="Portal technology">Portals</a></li>

+          <li><a href="http://qpid.apache.org/" title="Multiple language implementation
of the latest Advanced Message Queuing Protocol (AMQP)">Qpid</a></li> 
+          <li><a href="http://roller.apache.org/" title="Java blog server">Roller</a></li>

+          <li><a href="http://santuario.apache.org/" title="XML Security in Java
and C++">Santuario</a></li> 
+          <li><a href="http://servicemix.apache.org/" title="Enterprise Service
Bus">ServiceMix</a></li> 
+          <li><a href="http://shindig.apache.org/" title="Opensocial Reference Implementation">Shindig</a></li>

+          <li><a href="http://sling.apache.org/" title="Web Framework for JCR Content
Repositories">Sling</a></li> 
+          <li><a href="http://spamassassin.apache.org/" title="Mail filter to identify
spam">SpamAssassin</a></li> 
+          <li><a href="http://stdcxx.apache.org/" title="Apache C++ Standard Library">STDCXX</a></li>

+          <li><a href="http://struts.apache.org/" title="Model 2 framework for building
Java web applications">Struts</a></li> 
+          <li><a href="http://subversion.apache.org/" title="Version Control">Subversion</a></li>

+          <li><a href="http://synapse.apache.org/" title="Enterprise Service Bus
and Mediation Framework">Synapse</a></li> 
+          <li><a href="http://tapestry.apache.org/" title="Component-based Java
Web Application Framework">Tapestry</a></li> 
+          <li><a href="http://tcl.apache.org/" title="Dynamic websites using TCL">TCL</a></li>

+          <li><a href="http://tiles.apache.org/" title="A templating framework for
web application user interfaces">Tiles</a></li> 
+          <li><a href="http://tomcat.apache.org/" title="A Java Servlet and JSP
Container">Tomcat</a></li> 
+          <li><a href="http://turbine.apache.org/" title="A Java Servlet Web Application
Framework and associated component library">Turbine</a></li> 
+          <li><a href="http://tuscany.apache.org/" title="An SCA based Service Composition
Framework">Tuscany</a></li> 
+          <li><a href="http://velocity.apache.org/" title="A Java Templating Engine">Velocity</a></li>

+          <li><a href="http://wicket.apache.org/" title="Component-based Java Web
Application Framework.">Wicket</a></li> 
+          <li><a href="http://ws.apache.org/">Web Services</a></li>

+          <li><a href="http://xalan.apache.org/" title="XSLT processors in Java
and C++">Xalan</a></li> 
+          <li><a href="http://xerces.apache.org/" title="XML parsers in Java, C++
and Perl">Xerces</a></li> 
+          <li><a href="http://xml.apache.org/" title="XML solutions focused on the
web">XML</a></li> 
+          <li><a href="http://xmlbeans.apache.org/" title="XML-Java binding tool">XMLBeans</a></li>

+          <li><a href="http://xmlgraphics.apache.org/" title="Conversion from XML
to graphical output">XML Graphics</a></li> 
+          <li><a href="http://attic.apache.org/" title="Inactive project repository">Attic</a></li>

+      </ul>
+          </div>
+        </div>
+        <div class="nav column prepend-1 span-12 last">
+               <h6><a 
+href="/foundation/">Foundation</a></h6>
+  <ul>
+          <li><a href="/foundation/faq.html">FAQ</a></li> 
+          <li><a href="/licenses/">Licenses</a></li> 
+          <li><a href="/foundation/news.html">News</a></li> 
+          <li><a href="/press/">Press Inquiries</a></li> 
+          <li><a href="/foundation/records/">Public Records</a></li>

+          <li><a href="/foundation/sponsorship.html">Sponsorship</a></li>

+          <li><a href="/foundation/contributing.html">Donations</a></li>

+          <li><a href="/foundation/buy_stuff.html">Buy Stuff</a></li>

+          <li><a href="/foundation/thanks.html">Thanks</a></li> 
+          <li><a href="/foundation/contact.html">Contact</a></li>

+      </ul>
+      <h6>Foundation Projects</h6>
+  <ul>
+          <li><a href="/foundation/conferences.html" title="Meetings of developers
and users">Conferences</a></li> 
+          <li><a href="/dev/" title="ASF Infrastructure: Operations and howto documents
for PMCs and contributors">Infrastructure</a></li> 
+          <li><a href="/jcp/" title="Apache and the Java Community Process">JCP</a></li>

+          <li><a href="/legal/" title="Legal Affairs">Legal Affairs</a></li>

+          <li><a href="/press/" title="Public Relations">Public Relations</a></li>

+          <li><a href="/security/" title="Security">Security</a></li>

+          <li><a href="/travel/" title="Travel Assistance">Travel Assistance</a></li>

+      </ul>
+      <h6>How it works</h6>
+  <ul>
+          <li><a href="/foundation/how-it-works.html">Introduction</a></li>

+          <li><a href="/foundation/how-it-works.html#meritocracy">Meritocracy</a></li>

+          <li><a href="/foundation/how-it-works.html#structure">Structure</a></li>

+          <li><a href="/foundation/how-it-works.html#roles">Roles</a></li>

+          <li><a href="/foundation/how-it-works.html#management">Collaboration</a></li>

+          <li><a href="/foundation/how-it-works.html#infrastructure">Infrastructure</a></li>

+          <li><a href="/foundation/how-it-works.html#incubator">Incubator</a></li>

+          <li><a href="/press/">Public Relations Committee</a></li>

+          <li><a href="/foundation/how-it-works.html#other">Other entities</a></li>

+          <li><a href="/foundation/glossary.html">Glossary</a></li>

+          <li><a href="/foundation/voting.html">Voting</a></li> 
+      </ul>
+      <h6><a 
+href="/foundation/getinvolved.html">Get Involved</a></h6>
+  <ul>
+          <li><a href="/foundation/mailinglists.html">Mailing Lists</a></li>

+          <li><a href="/dev/version-control.html">Version Control</a></li>

+          <li><a href="/dev/">Developer Info</a></li> 
+      </ul>
+      <h6>Download</h6>
+  <ul>
+          <li><a href="/dyn/closer.cgi">from a mirror</a></li> 
+      </ul>
+      <h6>Community</h6>
+  <ul>
+          <li><a href="/memorials/">Memorials</a></li> 
+      </ul>
+      <h6>Related Sites</h6>
+  <ul>
+          <li><a href="http://apachecon.com/" title="Official Apache Conference">ApacheCon</a></li>

+          <li><a href="http://feathercast.org/" title="Apache Podcasts">Feathercast</a></li>

+          <li><a href="http://planet.apache.org/committers/" title="Apache Committers'
Blogs">PlanetApache</a></li> 
+      </ul>
+        </div>
+      </div>
+    </div>
+    <div class="column span-24 footer">
+      <hr/>
+        <p>Copyright &#169; 2010 The Apache Software Foundation, Licensed under
the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.<br/>
+        Apache and the Apache feather logo are trademarks of The Apache Software Foundation.</p>
+      </div>
+    </div>
+  </div>
+</body>
+</html>
+

Propchange: cocoon/cocoon3/trunk/cocoon-sax/src/test/resources/apache_home.html
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cocoon/cocoon3/trunk/cocoon-sax/src/test/resources/apache_home.html
------------------------------------------------------------------------------
    svn:keywords = Date Revision Author HeadURL Id

Propchange: cocoon/cocoon3/trunk/cocoon-sax/src/test/resources/apache_home.html
------------------------------------------------------------------------------
    svn:mime-type = text/html



Mime
View raw message