cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r728704 [1/2] - in /cocoon/whiteboard/xml-utils: ./ src/ src/main/ src/main/java/ src/main/java/org/ src/main/java/org/apache/ src/main/java/org/apache/cocoon/ src/main/java/org/apache/cocoon/xml/ src/main/java/org/apache/cocoon/xml/util/ s...
Date Mon, 22 Dec 2008 14:50:00 GMT
Author: cziegeler
Date: Mon Dec 22 06:49:59 2008
New Revision: 728704

URL: http://svn.apache.org/viewvc?rev=728704&view=rev
Log:
Copy xml util code from trunk to whiteboard project, add osgi bundle informationen, update to java 1.5

Added:
    cocoon/whiteboard/xml-utils/LICENSE.txt   (with props)
    cocoon/whiteboard/xml-utils/NOTICE.txt   (with props)
    cocoon/whiteboard/xml-utils/pom.xml   (with props)
    cocoon/whiteboard/xml-utils/src/
    cocoon/whiteboard/xml-utils/src/main/
    cocoon/whiteboard/xml-utils/src/main/java/
    cocoon/whiteboard/xml-utils/src/main/java/org/
    cocoon/whiteboard/xml-utils/src/main/java/org/apache/
    cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/
    cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/
    cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/util/
    cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/util/AbstractXMLConsumer.java   (with props)
    cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/util/AbstractXMLPipe.java   (with props)
    cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/util/AbstractXMLProducer.java   (with props)
    cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/util/AttributeTypes.java   (with props)
    cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/util/AttributesImpl.java   (with props)
    cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/util/DefaultLexicalHandler.java   (with props)
    cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/util/EmbeddedXMLPipe.java   (with props)
    cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/util/ImmutableAttributesImpl.java   (with props)
    cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/util/NamespacesTable.java   (with props)
    cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/util/SaxBuffer.java   (with props)
    cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/util/XMLUtils.java   (with props)
    cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/util/dom/
    cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/util/dom/DOMBuilder.java   (with props)
    cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/util/dom/DOMStreamer.java   (with props)
Modified:
    cocoon/whiteboard/xml-utils/   (props changed)

Propchange: cocoon/whiteboard/xml-utils/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Mon Dec 22 06:49:59 2008
@@ -0,0 +1,5 @@
+.classpath
+
+.project
+
+target

Added: cocoon/whiteboard/xml-utils/LICENSE.txt
URL: http://svn.apache.org/viewvc/cocoon/whiteboard/xml-utils/LICENSE.txt?rev=728704&view=auto
==============================================================================
--- cocoon/whiteboard/xml-utils/LICENSE.txt (added)
+++ cocoon/whiteboard/xml-utils/LICENSE.txt Mon Dec 22 06:49:59 2008
@@ -0,0 +1,201 @@
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.

Propchange: cocoon/whiteboard/xml-utils/LICENSE.txt
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cocoon/whiteboard/xml-utils/LICENSE.txt
------------------------------------------------------------------------------
    svn:keywords = Id

Propchange: cocoon/whiteboard/xml-utils/LICENSE.txt
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: cocoon/whiteboard/xml-utils/NOTICE.txt
URL: http://svn.apache.org/viewvc/cocoon/whiteboard/xml-utils/NOTICE.txt?rev=728704&view=auto
==============================================================================
--- cocoon/whiteboard/xml-utils/NOTICE.txt (added)
+++ cocoon/whiteboard/xml-utils/NOTICE.txt Mon Dec 22 06:49:59 2008
@@ -0,0 +1,5 @@
+Apache Cocoon
+Copyright 1999-2008 The Apache Software Foundation.
+
+This product includes software developed at
+The Apache Software Foundation (http://www.apache.org/).

Propchange: cocoon/whiteboard/xml-utils/NOTICE.txt
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cocoon/whiteboard/xml-utils/NOTICE.txt
------------------------------------------------------------------------------
    svn:keywords = Id

Propchange: cocoon/whiteboard/xml-utils/NOTICE.txt
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: cocoon/whiteboard/xml-utils/pom.xml
URL: http://svn.apache.org/viewvc/cocoon/whiteboard/xml-utils/pom.xml?rev=728704&view=auto
==============================================================================
--- cocoon/whiteboard/xml-utils/pom.xml (added)
+++ cocoon/whiteboard/xml-utils/pom.xml Mon Dec 22 06:49:59 2008
@@ -0,0 +1,89 @@
+<?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.
+-->
+<!--+
+    | @version $Id$
+    +-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <parent>
+    <artifactId>cocoon-core-modules</artifactId>
+    <groupId>org.apache.cocoon</groupId>
+    <version>5</version>
+  </parent>
+  <modelVersion>4.0.0</modelVersion>
+  <artifactId>cocoon-xml-util</artifactId>
+  <version>2.0.0-SNAPSHOT</version>
+  <packaging>bundle</packaging>
+  <name>Cocoon XML Utilities</name>
+  <description>
+    Various utilities classes.
+  </description>
+  <url>http://cocoon.apache.org/${docs.m.xml-util.relPath}</url>    
+  
+  <properties>
+    <docs.name>${project.name}</docs.name>    
+    <docs.version>${docs.m.xml-util.version}</docs.version>
+  </properties>  
+  
+  <distributionManagement>
+    <site>
+      <id>website</id>
+      <url>${docs.deploymentBaseUrl}/${docs.m.xml-util.relPath}</url>
+    </site>
+  </distributionManagement>    
+  
+  <dependencies>
+    <dependency>
+      <groupId>xml-apis</groupId>
+      <artifactId>xml-apis</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <scope>test</scope>
+    </dependency>
+  </dependencies>
+
+  <build>
+    <plugins>
+      <plugin>
+        <artifactId>maven-compiler-plugin</artifactId>
+        <version>2.0.2</version>
+        <configuration>
+          <source>1.5</source>
+          <target>1.5</target>
+        </configuration>
+      </plugin>  
+      <plugin>
+        <groupId>org.apache.felix</groupId>
+        <artifactId>maven-bundle-plugin</artifactId>
+        <version>1.4.3</version>
+        <extensions>true</extensions>
+        <configuration>
+          <instructions>
+            <Export-Package>
+              org.apache.cocoon.xml.util,
+              org.apache.cocoon.xml.util.dom
+            </Export-Package>
+          </instructions>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+</project>

Propchange: cocoon/whiteboard/xml-utils/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cocoon/whiteboard/xml-utils/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Id

Propchange: cocoon/whiteboard/xml-utils/pom.xml
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/util/AbstractXMLConsumer.java
URL: http://svn.apache.org/viewvc/cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/util/AbstractXMLConsumer.java?rev=728704&view=auto
==============================================================================
--- cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/util/AbstractXMLConsumer.java (added)
+++ cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/util/AbstractXMLConsumer.java Mon Dec 22 06:49:59 2008
@@ -0,0 +1,214 @@
+/*
+ * 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.xml.util;
+
+import org.xml.sax.Attributes;
+import org.xml.sax.ContentHandler;
+import org.xml.sax.Locator;
+import org.xml.sax.SAXException;
+import org.xml.sax.ext.LexicalHandler;
+
+/**
+ * This abstract class provides default implementation of the methods specified
+ * by the <code>ContentHandler</code> and the <code>LexicalHandler</code> interface.
+ *
+ * @version $Id$
+ */
+public abstract class AbstractXMLConsumer implements ContentHandler, LexicalHandler {
+
+    /**
+     * Receive an object for locating the origin of SAX document events.
+     *
+     * @param locator An object that can return the location of any SAX
+     *                document event.
+     */
+    public void setDocumentLocator(Locator locator) {
+    }
+
+    /**
+     * Receive notification of the beginning of a document.
+     */
+    public void startDocument()
+    throws SAXException {
+    }
+
+    /**
+     * Receive notification of the end of a document.
+     */
+    public void endDocument()
+    throws SAXException {
+    }
+
+    /**
+     * Begin the scope of a prefix-URI Namespace mapping.
+     *
+     * @param prefix The Namespace prefix being declared.
+     * @param uri The Namespace URI the prefix is mapped to.
+     */
+    public void startPrefixMapping(String prefix, String uri)
+    throws SAXException {
+    }
+
+    /**
+     * End the scope of a prefix-URI mapping.
+     *
+     * @param prefix The prefix that was being mapping.
+     */
+    public void endPrefixMapping(String prefix)
+    throws SAXException {
+    }
+
+    /**
+     * Receive notification of the beginning of an element.
+     *
+     * @param uri The Namespace URI, or the empty string if the element has no
+     *            Namespace URI or if Namespace
+     *            processing is not being performed.
+     * @param loc The local name (without prefix), or the empty string if
+     *            Namespace processing is not being performed.
+     * @param raw The raw XML 1.0 name (with prefix), or the empty string if
+     *            raw names are not available.
+     * @param a The attributes attached to the element. If there are no
+     *          attributes, it shall be an empty Attributes object.
+     */
+    public void startElement(String uri, String loc, String raw, Attributes a)
+    throws SAXException {
+    }
+
+
+    /**
+     * Receive notification of the end of an element.
+     *
+     * @param uri The Namespace URI, or the empty string if the element has no
+     *            Namespace URI or if Namespace
+     *            processing is not being performed.
+     * @param loc The local name (without prefix), or the empty string if
+     *            Namespace processing is not being performed.
+     * @param raw The raw XML 1.0 name (with prefix), or the empty string if
+     *            raw names are not available.
+     */
+    public void endElement(String uri, String loc, String raw)
+    throws SAXException {
+    }
+
+    /**
+     * Receive notification of character data.
+     *
+     * @param ch The characters from the XML document.
+     * @param start The start position in the array.
+     * @param len The number of characters to read from the array.
+     */
+    public void characters(char ch[], int start, int len)
+    throws SAXException {
+    }
+
+    /**
+     * Receive notification of ignorable whitespace in element content.
+     *
+     * @param ch The characters from the XML document.
+     * @param start The start position in the array.
+     * @param len The number of characters to read from the array.
+     */
+    public void ignorableWhitespace(char ch[], int start, int len)
+    throws SAXException {
+    }
+
+    /**
+     * Receive notification of a processing instruction.
+     *
+     * @param target The processing instruction target.
+     * @param data The processing instruction data, or null if none was
+     *             supplied.
+     */
+    public void processingInstruction(String target, String data)
+    throws SAXException {
+    }
+
+    /**
+     * Receive notification of a skipped entity.
+     *
+     * @param name The name of the skipped entity.  If it is a  parameter
+     *             entity, the name will begin with '%'.
+     */
+    public void skippedEntity(String name)
+    throws SAXException {
+    }
+
+    /**
+     * Report the start of DTD declarations, if any.
+     *
+     * @param name The document type name.
+     * @param publicId The declared public identifier for the external DTD
+     *                 subset, or null if none was declared.
+     * @param systemId The declared system identifier for the external DTD
+     *                 subset, or null if none was declared.
+     */
+    public void startDTD(String name, String publicId, String systemId)
+    throws SAXException {
+    }
+
+    /**
+     * Report the end of DTD declarations.
+     */
+    public void endDTD()
+    throws SAXException {
+    }
+
+    /**
+     * Report the beginning of an entity.
+     *
+     * @param name The name of the entity. If it is a parameter entity, the
+     *             name will begin with '%'.
+     */
+    public void startEntity(String name)
+    throws SAXException {
+    }
+
+    /**
+     * Report the end of an entity.
+     *
+     * @param name The name of the entity that is ending.
+     */
+    public void endEntity(String name)
+    throws SAXException {
+    }
+
+    /**
+     * Report the start of a CDATA section.
+     */
+    public void startCDATA()
+    throws SAXException {
+    }
+
+    /**
+     * Report the end of a CDATA section.
+     */
+    public void endCDATA()
+    throws SAXException {
+    }
+
+    /**
+     * Report an XML comment anywhere in the document.
+     *
+     * @param ch An array holding the characters in the comment.
+     * @param start The starting position in the array.
+     * @param len The number of characters to use from the array.
+     */
+    public void comment(char ch[], int start, int len)
+    throws SAXException {
+    }
+}

Propchange: cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/util/AbstractXMLConsumer.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/util/AbstractXMLConsumer.java
------------------------------------------------------------------------------
    svn:keywords = author date id revision rev url

Propchange: cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/util/AbstractXMLConsumer.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/util/AbstractXMLPipe.java
URL: http://svn.apache.org/viewvc/cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/util/AbstractXMLPipe.java?rev=728704&view=auto
==============================================================================
--- cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/util/AbstractXMLPipe.java (added)
+++ cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/util/AbstractXMLPipe.java Mon Dec 22 06:49:59 2008
@@ -0,0 +1,234 @@
+/*
+ * 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.xml.util;
+
+import org.xml.sax.Attributes;
+import org.xml.sax.ContentHandler;
+import org.xml.sax.Locator;
+import org.xml.sax.SAXException;
+import org.xml.sax.ext.LexicalHandler;
+
+/**
+ * This class provides a bridge class to connect to existing content
+ * handlers and lexical handlers.
+ *
+ * @version $Id$
+ */
+public abstract class AbstractXMLPipe
+    extends AbstractXMLProducer
+    implements ContentHandler, LexicalHandler {
+
+    /**
+     * Receive an object for locating the origin of SAX document events.
+     *
+     * @param locator An object that can return the location of any SAX
+     *                document event.
+     */
+    public void setDocumentLocator(Locator locator) {
+        contentHandler.setDocumentLocator(locator);
+    }
+
+    /**
+     * Receive notification of the beginning of a document.
+     */
+    public void startDocument()
+    throws SAXException {
+        contentHandler.startDocument();
+    }
+
+    /**
+     * Receive notification of the end of a document.
+     */
+    public void endDocument()
+    throws SAXException {
+        contentHandler.endDocument();
+    }
+
+    /**
+     * Begin the scope of a prefix-URI Namespace mapping.
+     *
+     * @param prefix The Namespace prefix being declared.
+     * @param uri The Namespace URI the prefix is mapped to.
+     */
+    public void startPrefixMapping(String prefix, String uri)
+    throws SAXException {
+        contentHandler.startPrefixMapping(prefix, uri);
+    }
+
+    /**
+     * End the scope of a prefix-URI mapping.
+     *
+     * @param prefix The prefix that was being mapping.
+     */
+    public void endPrefixMapping(String prefix)
+    throws SAXException {
+        contentHandler.endPrefixMapping(prefix);
+    }
+
+    /**
+     * Receive notification of the beginning of an element.
+     *
+     * @param uri The Namespace URI, or the empty string if the element has no
+     *            Namespace URI or if Namespace
+     *            processing is not being performed.
+     * @param loc The local name (without prefix), or the empty string if
+     *            Namespace processing is not being performed.
+     * @param raw The raw XML 1.0 name (with prefix), or the empty string if
+     *            raw names are not available.
+     * @param a The attributes attached to the element. If there are no
+     *          attributes, it shall be an empty Attributes object.
+     */
+    public void startElement(String uri, String loc, String raw, Attributes a)
+    throws SAXException {
+        contentHandler.startElement(uri, loc, raw, a);
+    }
+
+
+    /**
+     * Receive notification of the end of an element.
+     *
+     * @param uri The Namespace URI, or the empty string if the element has no
+     *            Namespace URI or if Namespace
+     *            processing is not being performed.
+     * @param loc The local name (without prefix), or the empty string if
+     *            Namespace processing is not being performed.
+     * @param raw The raw XML 1.0 name (with prefix), or the empty string if
+     *            raw names are not available.
+     */
+    public void endElement(String uri, String loc, String raw)
+    throws SAXException {
+        contentHandler.endElement(uri, loc, raw);
+    }
+
+    /**
+     * Receive notification of character data.
+     *
+     * @param c The characters from the XML document.
+     * @param start The start position in the array.
+     * @param len The number of characters to read from the array.
+     */
+    public void characters(char c[], int start, int len)
+    throws SAXException {
+        contentHandler.characters(c, start, len);
+    }
+
+    /**
+     * Receive notification of ignorable whitespace in element content.
+     *
+     * @param c The characters from the XML document.
+     * @param start The start position in the array.
+     * @param len The number of characters to read from the array.
+     */
+    public void ignorableWhitespace(char c[], int start, int len)
+    throws SAXException {
+        contentHandler.ignorableWhitespace(c, start, len);
+    }
+
+    /**
+     * Receive notification of a processing instruction.
+     *
+     * @param target The processing instruction target.
+     * @param data The processing instruction data, or null if none was
+     *             supplied.
+     */
+    public void processingInstruction(String target, String data)
+    throws SAXException {
+        contentHandler.processingInstruction(target, data);
+    }
+
+    /**
+     * Receive notification of a skipped entity.
+     *
+     * @param name The name of the skipped entity.  If it is a  parameter
+     *             entity, the name will begin with '%'.
+     */
+    public void skippedEntity(String name)
+    throws SAXException {
+        contentHandler.skippedEntity(name);
+    }
+
+    /**
+     * Report the start of DTD declarations, if any.
+     *
+     * @param name The document type name.
+     * @param publicId The declared public identifier for the external DTD
+     *                 subset, or null if none was declared.
+     * @param systemId The declared system identifier for the external DTD
+     *                 subset, or null if none was declared.
+     */
+    public void startDTD(String name, String publicId, String systemId)
+    throws SAXException {
+        lexicalHandler.startDTD(name, publicId, systemId);
+    }
+
+    /**
+     * Report the end of DTD declarations.
+     */
+    public void endDTD()
+    throws SAXException {
+        lexicalHandler.endDTD();
+    }
+
+    /**
+     * Report the beginning of an entity.
+     *
+     * @param name The name of the entity. If it is a parameter entity, the
+     *             name will begin with '%'.
+     */
+    public void startEntity(String name)
+    throws SAXException {
+        lexicalHandler.startEntity(name);
+    }
+
+    /**
+     * Report the end of an entity.
+     *
+     * @param name The name of the entity that is ending.
+     */
+    public void endEntity(String name)
+    throws SAXException {
+        lexicalHandler.endEntity(name);
+    }
+
+    /**
+     * Report the start of a CDATA section.
+     */
+    public void startCDATA()
+    throws SAXException {
+        lexicalHandler.startCDATA();
+    }
+
+    /**
+     * Report the end of a CDATA section.
+     */
+    public void endCDATA()
+    throws SAXException {
+        lexicalHandler.endCDATA();
+    }
+
+    /**
+     * Report an XML comment anywhere in the document.
+     *
+     * @param ch An array holding the characters in the comment.
+     * @param start The starting position in the array.
+     * @param len The number of characters to use from the array.
+     */
+    public void comment(char ch[], int start, int len)
+    throws SAXException {
+        lexicalHandler.comment(ch, start, len);
+    }
+}

Propchange: cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/util/AbstractXMLPipe.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/util/AbstractXMLPipe.java
------------------------------------------------------------------------------
    svn:keywords = author date id revision rev url

Propchange: cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/util/AbstractXMLPipe.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/util/AbstractXMLProducer.java
URL: http://svn.apache.org/viewvc/cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/util/AbstractXMLProducer.java?rev=728704&view=auto
==============================================================================
--- cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/util/AbstractXMLProducer.java (added)
+++ cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/util/AbstractXMLProducer.java Mon Dec 22 06:49:59 2008
@@ -0,0 +1,79 @@
+/*
+ * 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.xml.util;
+
+import org.xml.sax.ContentHandler;
+import org.xml.sax.ext.LexicalHandler;
+import org.xml.sax.helpers.DefaultHandler;
+
+/**
+ * This abstract class provides default implementation of the methods specified
+ * by the <code>XMLProducer</code> interface.
+ *
+ * @version $Id$
+ */
+public abstract class AbstractXMLProducer  {
+
+    /** Empty, do-nothing content handler */
+    protected static final ContentHandler EMPTY_CONTENT_HANDLER = new DefaultHandler();
+
+    /** The <code>ContentHandler</code> receiving SAX events. */
+    protected ContentHandler contentHandler = EMPTY_CONTENT_HANDLER;
+
+    /** The <code>LexicalHandler</code> receiving SAX events. */
+    protected LexicalHandler lexicalHandler = DefaultLexicalHandler.NULL_HANDLER;
+
+    /**
+     * Set the <code>ContentHandler</code> that will receive XML data.
+     *
+     * <p>Subclasses may retrieve this <code>ContentHandler</code> instance
+     * accessing the protected <code>super.contentHandler</code> field.
+     *
+     * @param handler content handler, should never be null.
+     */
+    public void setContentHandler(ContentHandler handler) {
+        this.contentHandler = handler;
+        if ( handler instanceof LexicalHandler ) {
+            this.setLexicalHandler((LexicalHandler)handler);
+        }
+    }
+
+    /**
+     * Set the <code>LexicalHandler</code> that will receive XML data.
+     *
+     * <p>Subclasses may retrieve this <code>LexicalHandler</code> instance
+     * accessing the protected <code>super.lexicalHandler</code> field.
+     *
+     * @param handler lexical handler, should never be null.
+     */
+    public void setLexicalHandler(LexicalHandler handler) {
+        if ( handler == null ) {
+            this.lexicalHandler = DefaultLexicalHandler.NULL_HANDLER;
+        } else {
+            this.lexicalHandler = handler;
+        }
+    }
+
+    /**
+     * Recycle the producer by removing references, and resetting handlers to
+     * null (empty) implementations.
+     */
+    public void recycle() {
+        this.contentHandler = EMPTY_CONTENT_HANDLER;
+        this.lexicalHandler = DefaultLexicalHandler.NULL_HANDLER;
+    }
+}

Propchange: cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/util/AbstractXMLProducer.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/util/AbstractXMLProducer.java
------------------------------------------------------------------------------
    svn:keywords = author date id revision rev url

Propchange: cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/util/AbstractXMLProducer.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/util/AttributeTypes.java
URL: http://svn.apache.org/viewvc/cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/util/AttributeTypes.java?rev=728704&view=auto
==============================================================================
--- cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/util/AttributeTypes.java (added)
+++ cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/util/AttributeTypes.java Mon Dec 22 06:49:59 2008
@@ -0,0 +1,41 @@
+/*
+ * 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.xml.util;
+
+/**
+ * Insert the type's description here.
+ * 
+ * @version $Id$
+ */
+public interface AttributeTypes {
+
+    String CDATA = "CDATA";
+    String ENTITY = "ENTITY";
+    String ENTITIES = "ENTITIES";
+    String ID = "ID";
+    String IDREF = "IDREF";
+    String IDREFS = "IDREFS";
+    String NAME = "NAME";
+    String NAMES = "NAMES";
+    String NMTOKEN = "NMTOKEN";
+    String NMTOKENS = "NMTOKENS";
+    String NOTATION = "NOTATION";
+    String NUMBER = "NUMBER";
+    String NUMBERS = "NUMBERS";
+    String NUTOKEN = "NUTOKEN";
+    String NUTOKENS = "NUTOKENS";
+}

Propchange: cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/util/AttributeTypes.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/util/AttributeTypes.java
------------------------------------------------------------------------------
    svn:keywords = author date id revision rev url

Propchange: cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/util/AttributeTypes.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/util/AttributesImpl.java
URL: http://svn.apache.org/viewvc/cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/util/AttributesImpl.java?rev=728704&view=auto
==============================================================================
--- cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/util/AttributesImpl.java (added)
+++ cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/util/AttributesImpl.java Mon Dec 22 06:49:59 2008
@@ -0,0 +1,114 @@
+/*
+ * 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.xml.util;
+
+import org.xml.sax.Attributes;
+
+/**
+ * A helper Class creating SAX Attributes
+ * 
+ * @version $Id$
+ */
+public class AttributesImpl extends org.xml.sax.helpers.AttributesImpl {
+
+    /**
+     * Constructor
+     */
+    public AttributesImpl() {
+        super();
+    }
+
+    /**
+     *  Constructor
+     */
+    public AttributesImpl(Attributes attr) {
+        super(attr);
+    }
+
+	/**
+	 * Add an attribute of type CDATA with empty Namespace to the end of the list.
+	 *
+	 * <p>For the sake of speed, this method does no checking
+	 * to see if the attribute is already in the list: that is
+	 * the responsibility of the application.</p>
+	 *
+	 * @param localName The local name.
+	 * @param value The attribute value.
+	 */
+	public void addCDATAAttribute(String localName, String value) {
+		addAttribute("", localName, localName, AttributeTypes.CDATA, value);
+	}
+    
+    /**
+     * Add an attribute of type CDATA with the namespace to the end of the list.
+     *
+     * <p>For the sake of speed, this method does no checking
+     * to see if the attribute is already in the list: that is
+     * the responsibility of the application.</p>
+     *
+     * @param namespace The namespace.
+     * @param localName The local name.
+     * @param value The attribute value.
+     */
+    public void addCDATAAttribute(String namespace, String localName, String value) {
+        addAttribute(namespace, localName, localName, AttributeTypes.CDATA, value);
+    }
+
+    /**
+	 * Add an attribute of type CDATA to the end of the list.
+	 *
+	 * <p>For the sake of speed, this method does no checking
+	 * to see if the attribute is already in the list: that is
+	 * the responsibility of the application.</p>
+	 *
+	 * @param uri The Namespace URI, or the empty string if
+	 *        none is available or Namespace processing is not
+	 *        being performed.
+	 * @param localName The local name, or the empty string if
+	 *        Namespace processing is not being performed.
+	 * @param qName The qualified (prefixed) name, or the empty string
+	 *        if qualified names are not available.
+	 * @param value The attribute value.
+	 */
+	public void addCDATAAttribute(String uri,
+                            		String localName,
+                            		String qName,
+                            		String value) {
+		addAttribute(uri, localName, qName, AttributeTypes.CDATA, value);
+	}
+    
+    /**
+     * Remove an attribute
+     */
+    public void removeAttribute(String localName) {
+        final int index = this.getIndex(localName);
+        if ( index != -1 ) {
+            this.removeAttribute(index);
+        }
+    }
+
+    /**
+     * Remove an attribute
+     */
+    public void removeAttribute(String uri, String localName) {
+        final int index = this.getIndex(uri, localName);
+        if ( index != -1 ) {
+            this.removeAttribute(index);
+        }
+    }
+}
+  
\ No newline at end of file

Propchange: cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/util/AttributesImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/util/AttributesImpl.java
------------------------------------------------------------------------------
    svn:keywords = author date id revision rev url

Propchange: cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/util/AttributesImpl.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/util/DefaultLexicalHandler.java
URL: http://svn.apache.org/viewvc/cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/util/DefaultLexicalHandler.java?rev=728704&view=auto
==============================================================================
--- cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/util/DefaultLexicalHandler.java (added)
+++ cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/util/DefaultLexicalHandler.java Mon Dec 22 06:49:59 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.cocoon.xml.util;
+
+import org.xml.sax.SAXException;
+import org.xml.sax.ext.LexicalHandler;
+
+/**
+ * Default implementation of SAX's <code>LexicalHandler</code> interface. Empty implementation
+ * of all methods so that you only have to redefine the ones of interest.
+ *
+ * @version $Id$
+ */
+public class DefaultLexicalHandler implements LexicalHandler {
+    
+    /**
+     * Shared instance that can be used when lexical events should be ignored.
+     */
+    public static final LexicalHandler NULL_HANDLER = new DefaultLexicalHandler();
+
+    public void startDTD(String name, String publicId, String systemId) throws SAXException {
+        // nothing
+    }
+
+    public void endDTD() throws SAXException {
+        // nothing
+    }
+
+    public void startEntity(String name) throws SAXException {
+        // nothing
+    }
+
+    public void endEntity(String name) throws SAXException {
+        // nothing
+    }
+
+    public void startCDATA() throws SAXException {
+        // nothing
+    }
+
+    public void endCDATA() throws SAXException {
+        // nothing
+    }
+
+    public void comment(char[] ch, int start, int length) throws SAXException {
+        // nothing
+    }
+}
\ No newline at end of file

Propchange: cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/util/DefaultLexicalHandler.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/util/DefaultLexicalHandler.java
------------------------------------------------------------------------------
    svn:keywords = author date id revision rev url

Propchange: cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/util/DefaultLexicalHandler.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/util/EmbeddedXMLPipe.java
URL: http://svn.apache.org/viewvc/cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/util/EmbeddedXMLPipe.java?rev=728704&view=auto
==============================================================================
--- cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/util/EmbeddedXMLPipe.java (added)
+++ cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/util/EmbeddedXMLPipe.java Mon Dec 22 06:49:59 2008
@@ -0,0 +1,104 @@
+/*
+ * 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.xml.util;
+
+import org.xml.sax.ContentHandler;
+import org.xml.sax.SAXException;
+import org.xml.sax.ext.LexicalHandler;
+
+/**
+ * This class implements a ContentHandler for embedding a full SAX
+ * event stream into an existing stream of SAX events. An instance of
+ * this class will pass unmodified all the SAX events to the linked
+ * ContentHandler, but it will ignore the startDocument/endDocument
+ * and startDTD/endDTD events, as well as all comment events within
+ * the DTD.
+ *
+ * @version $Id$
+ */
+public class EmbeddedXMLPipe extends AbstractXMLPipe {
+
+    private boolean inDTD;
+
+    /**
+     * Creates an EmbeddedXMLPipe that writes into the given ContentHandler.
+     */
+    public EmbeddedXMLPipe(ContentHandler handler) {
+        setContentHandler(handler);
+        if (handler instanceof LexicalHandler) {
+            setLexicalHandler((LexicalHandler) handler);
+        }
+    }
+
+    /**
+     * Creates an EmbeddedXMLPipe that writes into the given ContentHandler.
+     */
+    public EmbeddedXMLPipe(ContentHandler contentHandler, LexicalHandler lexicalHandler) {
+        setContentHandler(contentHandler);
+        setLexicalHandler(lexicalHandler);
+    }
+
+    /**
+     * Ignore the <code>startDocument</code> event: this method does nothing.
+     *
+     * @exception SAXException if an error occurs
+     */
+    public void startDocument() throws SAXException {
+    }
+
+    /**
+     * Ignore the <code>endDocument</code> event: this method does nothing.
+     *
+     * @exception SAXException if an error occurs
+     */
+    public void endDocument() throws SAXException {
+    }
+
+    /**
+     * Ignore the <code>startDTD</code> event: this method does nothing.
+     *
+     * @exception SAXException if an error occurs
+     */
+    public void startDTD(String name, String publicId, String systemId)
+    throws SAXException {
+        // Ignored
+        this.inDTD = true;
+    }
+
+    /**
+     * Ignore the <code>endDTD</code> event: this method does nothing.
+     *
+     * @exception SAXException if an error occurs
+     */
+    public void endDTD() throws SAXException {
+        // Ignored
+        this.inDTD = false;
+    }
+
+    /**
+     * Ignore all <code>comment</code> events if between
+     * startDTD/endDTD events.
+     *
+     * @exception SAXException if an error occurs
+     */
+    public void comment(char ch[], int start, int len)
+    throws SAXException {
+        if (!inDTD) {
+            super.comment(ch, start, len);
+        }
+    }
+}

Propchange: cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/util/EmbeddedXMLPipe.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/util/EmbeddedXMLPipe.java
------------------------------------------------------------------------------
    svn:keywords = author date id revision rev url

Propchange: cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/util/EmbeddedXMLPipe.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/util/ImmutableAttributesImpl.java
URL: http://svn.apache.org/viewvc/cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/util/ImmutableAttributesImpl.java?rev=728704&view=auto
==============================================================================
--- cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/util/ImmutableAttributesImpl.java (added)
+++ cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/util/ImmutableAttributesImpl.java Mon Dec 22 06:49:59 2008
@@ -0,0 +1,75 @@
+/*
+ * 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.xml.util;
+
+import org.xml.sax.Attributes;
+
+/**
+ * Immutable attributes
+ *
+ * @version $Id$
+ */
+public class ImmutableAttributesImpl extends AttributesImpl {
+
+    public ImmutableAttributesImpl() {
+        super();
+    }
+
+    public ImmutableAttributesImpl(Attributes attrs) {
+        super(attrs);
+    }
+
+    public void clear() {
+        throw new UnsupportedOperationException("immutable attributes");
+    }
+
+    public void removeAttribute(int index) {
+        throw new UnsupportedOperationException("immutable attributes");
+    }
+
+    public void setLocalName(int index, String localName) {
+        throw new UnsupportedOperationException("immutable attributes");
+    }
+
+    public void setQName(int index, String qName) {
+        throw new UnsupportedOperationException("immutable attributes");
+    }
+
+    public void setType(int index, String type) {
+        throw new UnsupportedOperationException("immutable attributes");
+    }
+
+    public void setURI(int index, String uri) {
+        throw new UnsupportedOperationException("immutable attributes");
+    }
+
+    public void setValue(int index, String value) {
+        throw new UnsupportedOperationException("immutable attributes");
+    }
+
+    public void setAttributes(Attributes atts) {
+        throw new UnsupportedOperationException("immutable attributes");
+    }
+
+    public void setAttribute(int index, String uri, String localName, String qName, String type, String value) {
+        throw new UnsupportedOperationException("immutable attributes");
+    }
+
+    public void addAttribute(String uri, String localName, String qName, String type, String value) {
+        throw new UnsupportedOperationException("immutable attributes");
+    }
+}

Propchange: cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/util/ImmutableAttributesImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/util/ImmutableAttributesImpl.java
------------------------------------------------------------------------------
    svn:keywords = author date id revision rev url

Propchange: cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/util/ImmutableAttributesImpl.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/util/NamespacesTable.java
URL: http://svn.apache.org/viewvc/cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/util/NamespacesTable.java?rev=728704&view=auto
==============================================================================
--- cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/util/NamespacesTable.java (added)
+++ cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/util/NamespacesTable.java Mon Dec 22 06:49:59 2008
@@ -0,0 +1,536 @@
+/*
+ * 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.xml.util;
+
+import org.xml.sax.ContentHandler;
+import org.xml.sax.SAXException;
+
+/**
+ * Keeps track of namespaces declarations and resolve namespaces names.
+ * <p>
+ * This class also provides a very convenient and safe way of handling
+ * namespace declarations in SAX pipes. It also allows to filter duplicate namespace
+ * declarations that too often clutter up XML documents that went through
+ * several transformations, and avoid useless namespace declarations that aren't followed
+ * by element events.
+ * <p>
+ * Usage example in a SAX pipe:
+ * <pre>
+ *   NamespacesTable namespaces = new NamespacesTable();
+ *   ContentHandler nextHandler;
+ *
+ *   public void startPrefixMapping(String prefix, String uri) throws SAXException {
+ *       namespaces.addDeclaration(prefix, uri);
+ *   }
+ *
+ *   public void startElement(...) throws SAXException {
+ *       // automatically start mappings for this scope
+ *       namespaces.enterScope(nextHandler);
+ *       nextHandler.startElement(...);
+ *   }
+ *
+ *   public void endElement(...) throws SAXException {
+ *       nextHandler.endElement(...);
+ *       // automatically end mappings for this scope
+ *       namespaces.leaveScope(nextHandler);
+ *   }
+ *
+ *   public void endPrefixMapping(String prefix) throws SAXException {
+ *       // Ignore, it is handled by leaveScope()
+ *   }
+ * </pre>
+ *
+ * @version $Id$
+ */
+public class NamespacesTable {
+    /** The last namespace declaration. */
+    private Entry lastEntry;
+
+    /** The entry that start the prefix mappings for the scope that's about to be entered
+     * or was just left.
+     */
+    private Entry lastDeclaredEntry;
+
+    private boolean usesScopes = false;
+
+    /**
+     * Construct a new <code>NamespacesTable</code> instance.
+     */
+    public NamespacesTable() {
+        clear();
+    }
+
+    /**
+     * Clear and reinitialize this namespace table before reuse.
+     *
+     * @since 2.1.8
+     */
+    public void clear() {
+        this.lastEntry = Entry.create("","");
+        this.addDeclaration("xml", "http://www.w3.org/XML/1998/namespace");
+        // Lock this scope
+        this.lastEntry.closedScopes = 1;
+    }
+
+    /**
+     * Declare a new namespace prefix-uri mapping.
+     *
+     * @return The newly added <code>Declaration</code>.
+     */
+    public Declaration addDeclaration(String prefix, String uri) {
+        // Find a previous declaration of the same prefix
+        Entry dup = this.lastEntry;
+        while (dup != null && !dup.prefix.equals(prefix)) {
+            dup = dup.previous;
+        }
+
+        if (dup != null) {
+            if (usesScopes && dup.uri.equals(uri)) {
+                return dup;
+            }
+            dup.overriden = true;
+        }
+
+        Entry e = Entry.create(prefix, uri);
+        e.previous = this.lastEntry;
+        e.overrides = dup;
+        this.lastEntry = e;
+        // this always starts the declared prefix chain
+        this.lastDeclaredEntry = e;
+        return e;
+    }
+
+    /**
+     * Undeclare a namespace prefix-uri mapping. If the prefix was previously declared
+     * mapping another URI, its value is restored.
+     * <p>
+     * When using {@link #enterScope()}/{@link #leaveScope()}, this method does nothing and always
+     * returns <code>null</code>, as declaration removal is handled in {@link #leaveScope()}.
+     *
+     * @return the removed <code>Declaration</code> or <b>null</b>.
+     */
+    public Declaration removeDeclaration(String prefix) {
+        if (usesScopes) {
+            // Automatically handled in leaveScope
+            return null; // or throw and IllegalStateException if enterScope(handler) was used?
+        }
+
+        Entry current = this.lastEntry;
+        Entry afterCurrent = null;
+        while(current != null) {
+            if (current.closedScopes > 0) {
+                // Don't undeclare mappings not declared in this scope
+                return null;
+            }
+
+            if (current.prefix.equals(prefix)) {
+                // Got it
+                // Remove it from the chain
+                if (afterCurrent != null) {
+                    afterCurrent.previous = current.previous;
+                }
+                // And report closed scopes on the previous entry
+                current.previous.closedScopes += current.closedScopes;
+                Entry overrides = current.overrides;
+                if (overrides != null) {
+                    // No more overriden
+                    overrides.overriden = false;
+                }
+
+                if (this.lastDeclaredEntry == current) {
+                    if (current.previous.closedScopes == 0) {
+                        this.lastDeclaredEntry = current.previous;
+                    } else {
+                        this.lastDeclaredEntry = null;
+                    }
+                }
+
+                if (this.lastEntry == current) {
+                    this.lastEntry = current.previous;
+                }
+
+                return current;
+            }
+
+            afterCurrent = current;
+            current = current.previous;
+        }
+
+        // Not found
+        return null;
+    }
+
+    /**
+     * Enter a new scope. This starts a new, empty list of declarations for the new scope.
+     * <p>
+     * Typically called in a SAX handler <em>before</em> sending a <code>startElement()</code>
+     * event.
+     *
+     * @since 2.1.8
+     */
+    public void enterScope() {
+        this.usesScopes = true;
+        this.lastEntry.closedScopes++;
+        this.lastDeclaredEntry = null;
+    }
+
+    /**
+     * Start all declared mappings of the current scope and enter a new scope.  This starts a new,
+     * empty list of declarations for the new scope.
+     * <p>
+     * Typically called in a SAX handler <em>before</em> sending a <code>startElement()</code>
+     * event.
+     *
+     * @param handler the handler that will receive startPrefixMapping events.
+     * @throws SAXException
+     * @since 2.1.8
+     */
+    public void enterScope(ContentHandler handler) throws SAXException {
+        this.usesScopes = true;
+        Entry current = this.lastEntry;
+        while (current != null && current.closedScopes == 0) {
+            handler.startPrefixMapping(current.prefix, current.uri);
+            current = current.previous;
+        }
+        this.lastEntry.closedScopes++;
+        this.lastDeclaredEntry = null;
+    }
+
+    /**
+     * Leave a scope. The namespace declarations that occured before the corresponding
+     * <code>enterScope()</code> are no more visible using the resolution methods, but
+     * still available using {@link #getCurrentScopeDeclarations()} until the next call
+     * to {@link #addDeclaration(String, String)} or {@link #enterScope()}.
+     * <p>
+     * Typically called in a SAX handler <em>after</em> sending a <code>endElement()</code>
+     * event.
+     *
+     * @since 2.1.8
+     */
+    public void leaveScope() {
+        Entry current = this.lastEntry;
+
+        // Purge declarations that were added but not included in a scope
+        while (current.closedScopes == 0) {
+            current = current.previous;
+        }
+
+        current.closedScopes--;
+
+        if (current.closedScopes == 0) {
+            this.lastDeclaredEntry = current;
+        } else {
+            // More than one scope closed here: no local declarations
+            this.lastDeclaredEntry = null;
+        }
+
+        while (current != null && current.closedScopes == 0) {
+            Entry overrides = current.overrides;
+            if (overrides != null) {
+                // No more overriden
+                overrides.overriden = false;
+            }
+            current = current.previous;
+        }
+        this.lastEntry = current;
+    }
+
+    /**
+     * Leave a scope. The namespace declarations that occured before the corresponding
+     * <code>enterScope()</code> are no more visible using the resolution methods, but
+     * still available using {@link #getCurrentScopeDeclarations()} until the next call
+     * to {@link #addDeclaration(String, String)} or {@link #enterScope()}.
+     * <p>
+     * Typically called in a SAX handler <em>after</em> sending a <code>endElement()</code>
+     * event.
+     *
+     * @param handler the handler that will receive endPrefixMapping events.
+     * @throws SAXException
+     * @since 2.1.8
+     */
+    public void leaveScope(ContentHandler handler) throws SAXException {
+        Entry current = this.lastEntry;
+
+        // Purge declarations that were added but not included in a scope
+        while (current.closedScopes == 0) {
+            current = current.previous;
+        }
+
+        current.closedScopes--;
+
+        if (current.closedScopes == 0) {
+            this.lastDeclaredEntry = current;
+        } else {
+            // More than one scope closed here: no local declarations
+            this.lastDeclaredEntry = null;
+        }
+
+        while (current != null && current.closedScopes == 0) {
+            handler.endPrefixMapping(current.prefix);
+            Entry overrides = current.overrides;
+            if (overrides != null) {
+                // No more overriden
+                overrides.overriden = false;
+            }
+            current = current.previous;
+        }
+
+        this.lastEntry = current;
+    }
+
+    private static final Declaration[] NO_DECLS = new Declaration[0];
+
+    /**
+     * Get the declarations that were declared within the current scope.
+     *
+     * @return the declarations (possibly empty, but never null)
+     * @since 2.1.8
+     */
+    public Declaration[] getCurrentScopeDeclarations() {
+        int count = 0;
+        Entry current = this.lastDeclaredEntry;
+        while (current != null && current.closedScopes == 0) {
+            count++;
+            current = current.previous;
+        }
+
+        if (count == 0) return NO_DECLS;
+
+        Declaration[] decls = new Declaration[count];
+        count = 0;
+        current = this.lastDeclaredEntry;
+        while (current != null && current.closedScopes == 0) {
+            decls[count++] = current;
+            current = current.previous;
+        }
+        return decls;
+    }
+
+    /**
+     * Return the URI associated with the given prefix or <b>null</b> if the
+     * prefix was not mapped.
+     */
+    public String getUri(String prefix) {
+        Entry current = this.lastEntry;
+        while (current != null) {
+            if (current.prefix.equals(prefix)) {
+                return current.uri;
+            }
+            current = current.previous;
+        }
+
+        // Not found
+        return null;
+    }
+
+    /**
+     * Return an array with all prefixes currently mapped to the specified URI.
+     * <br>
+     * The array length might be <b>zero</b> if no prefixes are associated with
+     * the specified uri.
+     *
+     * @return A <b>non-null</b> <code>String</code> array.
+     */
+    public String[] getPrefixes(String uri) {
+
+        Entry current=this.lastEntry;
+        int count=0;
+        while (current!=null) {
+            if(!current.overriden && current.uri.equals(uri))
+                count++;
+            current=current.previous;
+        }
+        if (count==0) return(new String[0]);
+
+        String prefixes[]=new String[count];
+        count=0;
+        current = this.lastEntry;
+        while (current!=null) {
+            if(!current.overriden && current.uri.equals(uri))
+                prefixes[count++] = current.prefix;
+            current = current.previous;
+        }
+        return prefixes;
+    }
+
+
+    /**
+     * Return one of the prefixes currently mapped to the specified URI or
+     * <b>null</b>.
+     */
+    public String getPrefix(String uri) {
+        Entry current = this.lastEntry;
+        while (current != null) {
+            if(!current.overriden && current.uri.equals(uri))
+                return current.prefix;
+            current = current.previous;
+        }
+        return null;
+    }
+
+    /**
+     * Resolve a namespace-aware name against the current namespaces
+     * declarations.
+     *
+     * @param uri The namespace URI or <b>null</b> if not known.
+     * @param raw The raw (complete) name or <b>null</b> if not known.
+     * @param prefix The namespace prefix or <b>null</b> if not known.
+     * @param local The local name or <b>null</b> if not known.
+     * @return A <b>non-null</b> <code>Name</code>.
+     * @exception SAXException If the name cannot be resolved.
+     */
+    public Name resolve(String uri, String raw, String prefix, String local)
+    throws SAXException {
+        if (uri==null) uri="";
+        if (raw==null) raw="";
+        if (prefix==null) prefix="";
+        if (local==null) local="";
+        // Start examining the URI
+        if (raw.length()>0) {
+            // The raw name was specified
+            int pos=raw.indexOf(':');
+            if (pos>0) {
+                // We have a namespace prefix:local separator
+                String pre=raw.substring(0,pos);
+                String loc=raw.substring(pos+1);
+                if (prefix.length()==0) prefix=pre;
+                else if (!prefix.equals(pre))
+                    throw new SAXException("Raw/Prefix mismatch");
+                if (local.length()==0) local=loc;
+                else if (!local.equals(loc))
+                    throw new SAXException("Raw/Local Name mismatch");
+            } else {
+                // We don't have a prefix:local separator
+                if (prefix.length()>0)
+                    throw new SAXException("Raw Name/Prefix mismatch");
+                if (local.length()==0) local=raw;
+                else if (!local.equals(raw))
+                    throw new SAXException("Raw Name/Local Name mismatch");
+            }
+        } else {
+            // The raw name was not specified
+            if (local.length()==0) throw new SAXException("No Raw/Local Name");
+            if (prefix.length()==0) raw=local;
+            else raw=prefix+':'+local;
+        }
+        // We have resolved and checked data between the raw, local, and
+        // prefix... We have to doublecheck the namespaces.
+        if (uri.length()>0) {
+            // We have a URI and a prefix, check them
+            if ((prefix.length()>0) &&  (!uri.equals(this.getUri(prefix)))) {
+                throw new SAXException("URI/Prefix mismatch [" + prefix + "," + uri + "]");
+            }
+            String temp=this.getPrefix(uri);
+            if (temp==null) throw new SAXException("URI not declared");
+            else if (temp.length()>0) {
+                prefix=temp;
+                raw=prefix+':'+local;
+            }
+        } else {
+            // We don't have a URI, check if we can find one from the prefix.
+            String temp=this.getUri(prefix);
+            if (temp==null) {
+                throw new SAXException("Prefix not declared");
+            }
+            uri=temp;
+        }
+        NameImpl name=new NameImpl();
+        if (uri.length() > 0) name.uri=uri;
+        else name.uri=null;
+        name.raw=raw;
+        name.prefix=prefix;
+        name.local=local;
+        return(name);
+    }
+
+    /** The internal entry structure for this table. */
+    private static class Entry implements Declaration {
+        /** The URI string. */
+        protected String uri="";
+        /** The prefix string. */
+        protected String prefix="";
+        /** The previous declaration. */
+        protected Entry previous;
+        protected Entry overrides;
+        protected int closedScopes = 0;
+        protected boolean overriden = false;
+
+        /** Create a new namespace declaration. */
+        protected static Entry create(String prefix, String uri) {
+            // Create a new entry
+            Entry e = new Entry();
+            // Set the prefix string.
+            if (prefix != null) e.prefix=prefix;
+            // Set the uri string.
+            if (uri != null) e.uri=uri;
+            // Return the entry
+            return e;
+        }
+
+        /** Return the namespace URI. */
+        public String getUri() { return this.uri; }
+        /** Return the namespace prefix. */
+        public String getPrefix() { return this.prefix; }
+    }
+
+    /** The default namespace-aware name declaration implementation */
+    private static class NameImpl implements Name {
+        /** The namespace URI. */
+        protected String uri;
+        /** The namespace prefix. */
+        protected String prefix;
+        /** The namespace local name. */
+        protected String local;
+        /** The namespace raw name. */
+        protected String raw;
+
+        /** Return the namespace URI. */
+        public String getUri() { return this.uri; }
+        /** Return the namespace prefix. */
+        public String getPrefix() { return this.prefix; }
+        /** Return the namespace local name. */
+        public String getLocalName() { return this.local; }
+        /** Return the namespace raw name. */
+        public String getQName() { return this.raw; }
+    }
+
+    /**
+     * A namespace-aware name. (This interface is used in conjunction
+     * with <code>NamespacesTable</code>).
+     */
+    public interface Name {
+        /** Return the namespace URI. */
+        String getUri();
+        /** Return the namespace prefix. */
+        String getPrefix();
+        /** Return the namespace local name. */
+        String getLocalName();
+        /** Return the namespace raw name. */
+        String getQName();
+    }
+
+    /**
+     * A namespace declaration. (This interface is used in conjunction
+     * with <code>NamespacesTable</code>).
+     */
+    public interface Declaration {
+        /** Return the namespace URI. */
+        String getUri();
+        /** Return the namespace prefix. */
+        String getPrefix();
+    }
+}

Propchange: cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/util/NamespacesTable.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/util/NamespacesTable.java
------------------------------------------------------------------------------
    svn:keywords = author date id revision rev url

Propchange: cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/util/NamespacesTable.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain



Mime
View raw message