cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r729283 - in /cocoon/whiteboard/xml-utils: ./ src/main/java/org/apache/cocoon/xml/dom/ src/main/java/org/apache/cocoon/xml/sax/ src/main/java/org/apache/cocoon/xml/util/ src/main/java/org/apache/cocoon/xml/util/dom/
Date Wed, 24 Dec 2008 09:25:22 GMT
Author: cziegeler
Date: Wed Dec 24 01:25:21 2008
New Revision: 729283

URL: http://svn.apache.org/viewvc?rev=729283&view=rev
Log:
Consistent naming of packages and classes

Added:
    cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/dom/
    cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/dom/DOMBuilder.java   (contents, props changed)
      - copied, changed from r728707, cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/util/dom/DOMBuilder.java
    cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/dom/DOMStreamer.java   (contents, props changed)
      - copied, changed from r728707, cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/util/dom/DOMStreamer.java
    cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/sax/
    cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/sax/AbstractSAXConsumer.java   (contents, props changed)
      - copied, changed from r728704, cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/util/AbstractXMLConsumer.java
    cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/sax/AbstractSAXPipe.java   (contents, props changed)
      - copied, changed from r728704, cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/util/AbstractXMLPipe.java
    cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/sax/AbstractSAXProducer.java   (contents, props changed)
      - copied, changed from r728707, cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/util/AbstractXMLProducer.java
    cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/sax/AttributeTypes.java   (contents, props changed)
      - copied, changed from r728704, cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/util/AttributeTypes.java
    cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/sax/AttributesImpl.java   (contents, props changed)
      - copied, changed from r728704, cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/util/AttributesImpl.java
    cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/sax/DefaultLexicalHandler.java   (contents, props changed)
      - copied, changed from r728704, cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/util/DefaultLexicalHandler.java
    cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/sax/EmbeddedSAXPipe.java   (contents, props changed)
      - copied, changed from r728707, cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/util/EmbeddedXMLPipe.java
    cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/sax/ImmutableAttributesImpl.java   (contents, props changed)
      - copied, changed from r728704, cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/util/ImmutableAttributesImpl.java
    cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/sax/NamespacesTable.java   (contents, props changed)
      - copied, changed from r728704, cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/util/NamespacesTable.java
    cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/sax/SAXBuffer.java   (with props)
    cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/sax/SAXUtils.java   (contents, props changed)
      - copied, changed from r728705, cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/util/XMLUtils.java
Removed:
    cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/util/AbstractXMLConsumer.java
    cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/util/AbstractXMLPipe.java
    cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/util/AbstractXMLProducer.java
    cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/util/AttributeTypes.java
    cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/util/AttributesImpl.java
    cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/util/DefaultLexicalHandler.java
    cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/util/EmbeddedXMLPipe.java
    cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/util/ImmutableAttributesImpl.java
    cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/util/NamespacesTable.java
    cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/util/XMLUtils.java
    cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/util/dom/DOMBuilder.java
    cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/util/dom/DOMStreamer.java
Modified:
    cocoon/whiteboard/xml-utils/pom.xml

Modified: cocoon/whiteboard/xml-utils/pom.xml
URL: http://svn.apache.org/viewvc/cocoon/whiteboard/xml-utils/pom.xml?rev=729283&r1=729282&r2=729283&view=diff
==============================================================================
--- cocoon/whiteboard/xml-utils/pom.xml (original)
+++ cocoon/whiteboard/xml-utils/pom.xml Wed Dec 24 01:25:21 2008
@@ -78,8 +78,8 @@
         <configuration>
           <instructions>
             <Export-Package>
-              org.apache.cocoon.xml.util,
-              org.apache.cocoon.xml.util.dom
+              org.apache.cocoon.xml.sax,
+              org.apache.cocoon.xml.dom
             </Export-Package>
           </instructions>
         </configuration>

Copied: cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/dom/DOMBuilder.java (from r728707, cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/util/dom/DOMBuilder.java)
URL: http://svn.apache.org/viewvc/cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/dom/DOMBuilder.java?p2=cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/dom/DOMBuilder.java&p1=cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/util/dom/DOMBuilder.java&r1=728707&r2=729283&rev=729283&view=diff
==============================================================================
--- cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/util/dom/DOMBuilder.java (original)
+++ cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/dom/DOMBuilder.java Wed Dec 24 01:25:21 2008
@@ -14,14 +14,14 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.cocoon.xml.util.dom;
+package org.apache.cocoon.xml.dom;
 
 import javax.xml.transform.TransformerFactory;
 import javax.xml.transform.dom.DOMResult;
 import javax.xml.transform.sax.SAXTransformerFactory;
 import javax.xml.transform.sax.TransformerHandler;
 
-import org.apache.cocoon.xml.util.AbstractXMLPipe;
+import org.apache.cocoon.xml.sax.AbstractSAXPipe;
 import org.w3c.dom.Document;
 import org.w3c.dom.Node;
 import org.xml.sax.SAXException;
@@ -32,7 +32,7 @@
  *
  * @version $Id$
  */
-public class DOMBuilder extends AbstractXMLPipe {
+public class DOMBuilder extends AbstractSAXPipe {
 
     /** The default transformer factory shared by all instances */
     protected static final SAXTransformerFactory FACTORY = (SAXTransformerFactory) TransformerFactory.newInstance();

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

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

Propchange: cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/dom/DOMBuilder.java
------------------------------------------------------------------------------
    svn:mergeinfo = 

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

Copied: cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/dom/DOMStreamer.java (from r728707, cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/util/dom/DOMStreamer.java)
URL: http://svn.apache.org/viewvc/cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/dom/DOMStreamer.java?p2=cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/dom/DOMStreamer.java&p1=cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/util/dom/DOMStreamer.java&r1=728707&r2=729283&rev=729283&view=diff
==============================================================================
--- cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/util/dom/DOMStreamer.java (original)
+++ cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/dom/DOMStreamer.java Wed Dec 24 01:25:21 2008
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.cocoon.xml.util.dom;
+package org.apache.cocoon.xml.dom;
 
 import java.util.HashMap;
 import java.util.Iterator;
@@ -27,8 +27,8 @@
 import javax.xml.transform.dom.DOMSource;
 import javax.xml.transform.sax.SAXResult;
 
-import org.apache.cocoon.xml.util.AbstractXMLProducer;
-import org.apache.cocoon.xml.util.EmbeddedXMLPipe;
+import org.apache.cocoon.xml.sax.AbstractSAXProducer;
+import org.apache.cocoon.xml.sax.EmbeddedSAXPipe;
 import org.w3c.dom.Attr;
 import org.w3c.dom.Comment;
 import org.w3c.dom.Element;
@@ -135,7 +135,7 @@
      * check that the "xml" prefix is not misused etc.
      *
      */
-    public static class NamespaceNormalizingDOMStreamer extends AbstractXMLProducer {
+    public static class NamespaceNormalizingDOMStreamer extends AbstractSAXProducer {
         /**
          * Information about the current element. Used to remember the localName, qName
          * and namespaceURI for generating the endElement event, and holds the namespaces
@@ -630,7 +630,7 @@
      * The <code>DefaultDOMStreamer</code> is a utility class that will generate SAX
      * events from a W3C DOM Document.
      */
-    public static class DefaultDOMStreamer extends AbstractXMLProducer {
+    public static class DefaultDOMStreamer extends AbstractSAXProducer {
 
         /** The private transformer for this instance */
         protected Transformer transformer;
@@ -655,7 +655,7 @@
                 handler = contentHandler;
             } else {
                 // Strip start/endDocument
-                handler = new EmbeddedXMLPipe(contentHandler);
+                handler = new EmbeddedSAXPipe(contentHandler);
             }
 
             SAXResult result = new SAXResult(handler);

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

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

Propchange: cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/dom/DOMStreamer.java
------------------------------------------------------------------------------
    svn:mergeinfo = 

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

Copied: cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/sax/AbstractSAXConsumer.java (from r728704, 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/sax/AbstractSAXConsumer.java?p2=cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/sax/AbstractSAXConsumer.java&p1=cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/util/AbstractXMLConsumer.java&r1=728704&r2=729283&rev=729283&view=diff
==============================================================================
--- cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/util/AbstractXMLConsumer.java (original)
+++ cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/sax/AbstractSAXConsumer.java Wed Dec 24 01:25:21 2008
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.cocoon.xml.util;
+package org.apache.cocoon.xml.sax;
 
 import org.xml.sax.Attributes;
 import org.xml.sax.ContentHandler;
@@ -28,7 +28,7 @@
  *
  * @version $Id$
  */
-public abstract class AbstractXMLConsumer implements ContentHandler, LexicalHandler {
+public abstract class AbstractSAXConsumer implements ContentHandler, LexicalHandler {
 
     /**
      * Receive an object for locating the origin of SAX document events.

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

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

Propchange: cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/sax/AbstractSAXConsumer.java
------------------------------------------------------------------------------
    svn:mergeinfo = 

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

Copied: cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/sax/AbstractSAXPipe.java (from r728704, 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/sax/AbstractSAXPipe.java?p2=cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/sax/AbstractSAXPipe.java&p1=cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/util/AbstractXMLPipe.java&r1=728704&r2=729283&rev=729283&view=diff
==============================================================================
--- cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/util/AbstractXMLPipe.java (original)
+++ cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/sax/AbstractSAXPipe.java Wed Dec 24 01:25:21 2008
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.cocoon.xml.util;
+package org.apache.cocoon.xml.sax;
 
 import org.xml.sax.Attributes;
 import org.xml.sax.ContentHandler;
@@ -28,8 +28,8 @@
  *
  * @version $Id$
  */
-public abstract class AbstractXMLPipe
-    extends AbstractXMLProducer
+public abstract class AbstractSAXPipe
+    extends AbstractSAXProducer
     implements ContentHandler, LexicalHandler {
 
     /**

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

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

Propchange: cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/sax/AbstractSAXPipe.java
------------------------------------------------------------------------------
    svn:mergeinfo = 

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

Copied: cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/sax/AbstractSAXProducer.java (from r728707, 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/sax/AbstractSAXProducer.java?p2=cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/sax/AbstractSAXProducer.java&p1=cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/util/AbstractXMLProducer.java&r1=728707&r2=729283&rev=729283&view=diff
==============================================================================
--- cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/util/AbstractXMLProducer.java (original)
+++ cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/sax/AbstractSAXProducer.java Wed Dec 24 01:25:21 2008
@@ -14,19 +14,19 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.cocoon.xml.util;
+package org.apache.cocoon.xml.sax;
 
 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.
+ * This abstract class provides utility methods to implement a producer
+ * for SAX events..
  *
  * @version $Id$
  */
-public abstract class AbstractXMLProducer  {
+public abstract class AbstractSAXProducer  {
 
     /** Empty, do-nothing content handler */
     protected static final ContentHandler EMPTY_CONTENT_HANDLER = new DefaultHandler();

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

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

Propchange: cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/sax/AbstractSAXProducer.java
------------------------------------------------------------------------------
    svn:mergeinfo = 

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

Copied: cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/sax/AttributeTypes.java (from r728704, 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/sax/AttributeTypes.java?p2=cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/sax/AttributeTypes.java&p1=cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/util/AttributeTypes.java&r1=728704&r2=729283&rev=729283&view=diff
==============================================================================
--- cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/util/AttributeTypes.java (original)
+++ cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/sax/AttributeTypes.java Wed Dec 24 01:25:21 2008
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.cocoon.xml.util;
+package org.apache.cocoon.xml.sax;
 
 /**
  * Insert the type's description here.

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

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

Propchange: cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/sax/AttributeTypes.java
------------------------------------------------------------------------------
    svn:mergeinfo = 

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

Copied: cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/sax/AttributesImpl.java (from r728704, 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/sax/AttributesImpl.java?p2=cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/sax/AttributesImpl.java&p1=cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/util/AttributesImpl.java&r1=728704&r2=729283&rev=729283&view=diff
==============================================================================
--- cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/util/AttributesImpl.java (original)
+++ cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/sax/AttributesImpl.java Wed Dec 24 01:25:21 2008
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.cocoon.xml.util;
+package org.apache.cocoon.xml.sax;
 
 import org.xml.sax.Attributes;
 

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

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

Propchange: cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/sax/AttributesImpl.java
------------------------------------------------------------------------------
    svn:mergeinfo = 

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

Copied: cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/sax/DefaultLexicalHandler.java (from r728704, 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/sax/DefaultLexicalHandler.java?p2=cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/sax/DefaultLexicalHandler.java&p1=cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/util/DefaultLexicalHandler.java&r1=728704&r2=729283&rev=729283&view=diff
==============================================================================
--- cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/util/DefaultLexicalHandler.java (original)
+++ cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/sax/DefaultLexicalHandler.java Wed Dec 24 01:25:21 2008
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.cocoon.xml.util;
+package org.apache.cocoon.xml.sax;
 
 import org.xml.sax.SAXException;
 import org.xml.sax.ext.LexicalHandler;

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

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

Propchange: cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/sax/DefaultLexicalHandler.java
------------------------------------------------------------------------------
    svn:mergeinfo = 

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

Copied: cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/sax/EmbeddedSAXPipe.java (from r728707, 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/sax/EmbeddedSAXPipe.java?p2=cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/sax/EmbeddedSAXPipe.java&p1=cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/util/EmbeddedXMLPipe.java&r1=728707&r2=729283&rev=729283&view=diff
==============================================================================
--- cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/util/EmbeddedXMLPipe.java (original)
+++ cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/sax/EmbeddedSAXPipe.java Wed Dec 24 01:25:21 2008
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.cocoon.xml.util;
+package org.apache.cocoon.xml.sax;
 
 import org.xml.sax.ContentHandler;
 import org.xml.sax.SAXException;
@@ -29,14 +29,14 @@
  *
  * @version $Id$
  */
-public class EmbeddedXMLPipe extends AbstractXMLPipe {
+public class EmbeddedSAXPipe extends AbstractSAXPipe {
 
     private boolean inDTD;
 
     /**
      * Creates an EmbeddedXMLPipe that writes into the given ContentHandler.
      */
-    public EmbeddedXMLPipe(ContentHandler handler) {
+    public EmbeddedSAXPipe(ContentHandler handler) {
         setContentHandler(handler);
     }
 

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

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

Propchange: cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/sax/EmbeddedSAXPipe.java
------------------------------------------------------------------------------
    svn:mergeinfo = 

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

Copied: cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/sax/ImmutableAttributesImpl.java (from r728704, 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/sax/ImmutableAttributesImpl.java?p2=cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/sax/ImmutableAttributesImpl.java&p1=cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/util/ImmutableAttributesImpl.java&r1=728704&r2=729283&rev=729283&view=diff
==============================================================================
--- cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/util/ImmutableAttributesImpl.java (original)
+++ cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/sax/ImmutableAttributesImpl.java Wed Dec 24 01:25:21 2008
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.cocoon.xml.util;
+package org.apache.cocoon.xml.sax;
 
 import org.xml.sax.Attributes;
 

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

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

Propchange: cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/sax/ImmutableAttributesImpl.java
------------------------------------------------------------------------------
    svn:mergeinfo = 

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

Copied: cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/sax/NamespacesTable.java (from r728704, 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/sax/NamespacesTable.java?p2=cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/sax/NamespacesTable.java&p1=cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/util/NamespacesTable.java&r1=728704&r2=729283&rev=729283&view=diff
==============================================================================
--- cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/util/NamespacesTable.java (original)
+++ cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/sax/NamespacesTable.java Wed Dec 24 01:25:21 2008
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.cocoon.xml.util;
+package org.apache.cocoon.xml.sax;
 
 import org.xml.sax.ContentHandler;
 import org.xml.sax.SAXException;

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

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

Propchange: cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/sax/NamespacesTable.java
------------------------------------------------------------------------------
    svn:mergeinfo = 

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

Added: cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/sax/SAXBuffer.java
URL: http://svn.apache.org/viewvc/cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/sax/SAXBuffer.java?rev=729283&view=auto
==============================================================================
--- cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/sax/SAXBuffer.java (added)
+++ cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/sax/SAXBuffer.java Wed Dec 24 01:25:21 2008
@@ -0,0 +1,563 @@
+/*
+ * 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.sax;
+
+import java.io.IOException;
+import java.io.Serializable;
+import java.io.Writer;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.List;
+
+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;
+
+/**
+ * A class that can record SAX events and replay them later.
+ *
+ * <p>Compared to the old Cocoon.XMLByteStreamCompiler,
+ * this class is many times faster at sending out the recorded SAX events since
+ * it doesn't need to convert between byte and char representations etc.
+ * On the other hand, its data structure is more complex then a simple byte array,
+ * making XMLByteStreamCompiler better in case the recorded SAX should be stored long-term.
+ *
+ * <p>Use this class if you need to frequently generate smaller amounts of SAX events,
+ * or replay a set of recorded start events immediately.</p>
+ *
+ * <p>Both {@link ContentHandler} and {@link LexicalHandler} are supported, the only
+ * exception is that the setDocumentLocator event is not recorded.</p>
+ *
+ * @version $Id$
+ */
+public class SAXBuffer implements Serializable {
+
+    /**
+     * Stores list of {@link SaxBit} objects.
+     */
+    protected List<SaxBit> saxbits;
+
+    /**
+     * Creates empty SaxBuffer
+     */
+    public SAXBuffer() {
+        this.saxbits = new ArrayList<SaxBit>();
+    }
+
+    /**
+     * Creates SaxBuffer based on the provided bits list.
+     */
+    public SAXBuffer(List<SaxBit> bits) {
+        this.saxbits = bits;
+    }
+
+    /**
+     * Creates copy of another SaxBuffer
+     */
+    public SAXBuffer(SAXBuffer saxBuffer) {
+        this.saxbits = new ArrayList<SaxBit>(saxBuffer.saxbits);
+    }
+
+    //
+    // ContentHandler Interface
+    //
+
+    public void skippedEntity(String name) throws SAXException {
+        saxbits.add(new SkippedEntity(name));
+    }
+
+    public void setDocumentLocator(Locator locator) {
+        // Don't record this event
+    }
+
+    public void ignorableWhitespace(char ch[], int start, int length) throws SAXException {
+        saxbits.add(new IgnorableWhitespace(ch, start, length));
+    }
+
+    public void processingInstruction(String target, String data) throws SAXException {
+        saxbits.add(new PI(target, data));
+    }
+
+    public void startDocument() throws SAXException {
+        saxbits.add(StartDocument.SINGLETON);
+    }
+
+    public void startElement(String namespaceURI, String localName, String qName, Attributes atts) throws SAXException {
+        saxbits.add(new StartElement(namespaceURI, localName, qName, atts));
+    }
+
+    public void endPrefixMapping(String prefix) throws SAXException {
+        saxbits.add(new EndPrefixMapping(prefix));
+    }
+
+    public void characters(char ch[], int start, int length) throws SAXException {
+        saxbits.add(new Characters(ch, start, length));
+    }
+
+    public void endElement(String namespaceURI, String localName, String qName) throws SAXException {
+        saxbits.add(new EndElement(namespaceURI, localName, qName));
+    }
+
+    public void endDocument() throws SAXException {
+        saxbits.add(EndDocument.SINGLETON);
+    }
+
+    public void startPrefixMapping(String prefix, String uri) throws SAXException {
+        saxbits.add(new StartPrefixMapping(prefix, uri));
+    }
+
+    //
+    // LexicalHandler Interface
+    //
+
+    public void endCDATA() throws SAXException {
+        saxbits.add(EndCDATA.SINGLETON);
+    }
+
+    public void comment(char ch[], int start, int length) throws SAXException {
+        saxbits.add(new Comment(ch, start, length));
+    }
+
+    public void startEntity(String name) throws SAXException {
+        saxbits.add(new StartEntity(name));
+    }
+
+    public void endDTD() throws SAXException {
+        saxbits.add(EndDTD.SINGLETON);
+    }
+
+    public void startDTD(String name, String publicId, String systemId) throws SAXException {
+        saxbits.add(new StartDTD(name, publicId, systemId));
+    }
+
+    public void startCDATA() throws SAXException {
+        saxbits.add(StartCDATA.SINGLETON);
+    }
+
+    public void endEntity(String name) throws SAXException {
+        saxbits.add(new EndEntity(name));
+    }
+
+    //
+    // Public Methods
+    //
+
+    /**
+     * Add a another buffer
+     */
+    public void saxBuffer(SAXBuffer xml) {
+        saxbits.add(new XMLizableBit(xml));
+    }
+
+    /**
+     * @return true if buffer is empty
+     */
+    public boolean isEmpty() {
+        return saxbits.isEmpty();
+    }
+
+    /**
+     * @return unmodifiable list of SAX bits
+     */
+    public List<SaxBit> getBits() {
+        return Collections.unmodifiableList(saxbits);
+    }
+
+    /**
+     * Stream this buffer into the provided content handler.
+     * If contentHandler object implements LexicalHandler, it will get lexical
+     * events as well.
+     */
+    public void toSAX(ContentHandler contentHandler) throws SAXException {
+        for (Iterator<SaxBit> i = saxbits.iterator(); i.hasNext();) {
+            SaxBit saxbit = i.next();
+            saxbit.send(contentHandler);
+        }
+    }
+
+    /**
+     * @return String value of the buffer
+     */
+    public String toString() {
+        // NOTE: This method is used in i18n XML bundle implementation
+        final StringBuffer value = new StringBuffer();
+        for (Iterator<SaxBit> i = saxbits.iterator(); i.hasNext();) {
+            final SaxBit saxbit = i.next();
+            if (saxbit instanceof Characters) {
+                ((Characters) saxbit).toString(value);
+            }
+        }
+
+        return value.toString();
+    }
+
+    /**
+     * Clear this buffer
+     */
+    public void recycle() {
+        saxbits.clear();
+    }
+
+    /**
+     * Dump buffer contents into the provided writer.
+     */
+    public void dump(Writer writer) throws IOException {
+        Iterator<SaxBit> i = saxbits.iterator();
+        while (i.hasNext()) {
+            final SaxBit saxbit = i.next();
+            saxbit.dump(writer);
+        }
+        writer.flush();
+    }
+
+    //
+    // Implementation Methods
+    //
+
+    /**
+     * Adds a SaxBit to the bits list
+     */
+    protected final void addBit(SaxBit bit) {
+        saxbits.add(bit);
+    }
+
+    /**
+     * Iterates through the bits list
+     */
+    protected final Iterator<SaxBit> bits() {
+        return saxbits.iterator();
+    }
+
+    /**
+     * SaxBit is a representation of the SAX event. Every SaxBit is immutable object.
+     */
+    interface SaxBit {
+        public void send(ContentHandler contentHandler) throws SAXException;
+        public void dump(Writer writer) throws IOException;
+    }
+
+    public final static class StartDocument implements SaxBit, Serializable {
+        public static final StartDocument SINGLETON = new StartDocument();
+
+        public void send(ContentHandler contentHandler) throws SAXException {
+            contentHandler.startDocument();
+        }
+
+        public void dump(Writer writer) throws IOException {
+            writer.write("[StartDocument]\n");
+        }
+    }
+
+    public final static class EndDocument implements SaxBit, Serializable {
+        public static final EndDocument SINGLETON = new EndDocument();
+
+        public void send(ContentHandler contentHandler) throws SAXException {
+            contentHandler.endDocument();
+        }
+
+        public void dump(Writer writer) throws IOException {
+            writer.write("[EndDocument]\n");
+        }
+    }
+
+    public final static class PI implements SaxBit, Serializable {
+        public final String target;
+        public final String data;
+
+        public PI(String target, String data) {
+            this.target = target;
+            this.data = data;
+        }
+
+        public void send(ContentHandler contentHandler) throws SAXException {
+            contentHandler.processingInstruction(target, data);
+        }
+
+        public void dump(Writer writer) throws IOException {
+            writer.write("[ProcessingInstruction] target=" + target + ",data=" + data + "\n");
+        }
+    }
+
+    public final static class StartDTD implements SaxBit, Serializable {
+        public final String name;
+        public final String publicId;
+        public final String systemId;
+
+        public StartDTD(String name, String publicId, String systemId) {
+            this.name = name;
+            this.publicId = publicId;
+            this.systemId = systemId;
+        }
+
+        public void send(ContentHandler contentHandler) throws SAXException {
+            if (contentHandler instanceof LexicalHandler)
+                ((LexicalHandler)contentHandler).startDTD(name, publicId, systemId);
+        }
+
+        public void dump(Writer writer) throws IOException {
+            writer.write("[StartDTD] name=" + name + ",publicId=" + publicId + ",systemId=" + systemId + "\n");
+        }
+    }
+
+    public final static class EndDTD implements SaxBit, Serializable {
+        public static final EndDTD SINGLETON = new EndDTD();
+
+        public void send(ContentHandler contentHandler) throws SAXException {
+            if (contentHandler instanceof LexicalHandler)
+                ((LexicalHandler)contentHandler).endDTD();
+        }
+
+        public void dump(Writer writer) throws IOException {
+            writer.write("[EndDTD]\n");
+        }
+    }
+
+    public final static class StartEntity implements SaxBit, Serializable {
+        public final String name;
+
+        public StartEntity(String name) {
+            this.name = name;
+        }
+
+        public void send(ContentHandler contentHandler) throws SAXException {
+            if (contentHandler instanceof LexicalHandler)
+                ((LexicalHandler)contentHandler).startEntity(name);
+        }
+
+        public void dump(Writer writer) throws IOException {
+            writer.write("[StartEntity] name=" + name + "\n");
+        }
+    }
+
+    public final static class EndEntity implements SaxBit, Serializable {
+        public final String name;
+
+        public EndEntity(String name) {
+            this.name = name;
+        }
+
+        public void send(ContentHandler contentHandler) throws SAXException {
+            if (contentHandler instanceof LexicalHandler)
+                ((LexicalHandler)contentHandler).endEntity(name);
+        }
+
+        public void dump(Writer writer) throws IOException {
+            writer.write("[EndEntity] name=" + name + "\n");
+        }
+    }
+
+    public final static class SkippedEntity implements SaxBit, Serializable {
+        public final String name;
+
+        public SkippedEntity(String name) {
+            this.name = name;
+        }
+
+        public void send(ContentHandler contentHandler) throws SAXException {
+            contentHandler.skippedEntity(name);
+        }
+
+        public void dump(Writer writer) throws IOException {
+            writer.write("[SkippedEntity] name=" + name + "\n");
+        }
+    }
+
+    public final static class StartPrefixMapping implements SaxBit, Serializable {
+        public final String prefix;
+        public final String uri;
+
+        public StartPrefixMapping(String prefix, String uri) {
+            this.prefix = prefix;
+            this.uri = uri;
+        }
+
+        public void send(ContentHandler contentHandler) throws SAXException {
+            contentHandler.startPrefixMapping(prefix, uri);
+        }
+
+        public void dump(Writer writer) throws IOException {
+            writer.write("[StartPrefixMapping] prefix=" + prefix + ",uri=" + uri + "\n");
+        }
+    }
+
+    public final static class EndPrefixMapping implements SaxBit, Serializable {
+        public final String prefix;
+
+        public EndPrefixMapping(String prefix) {
+            this.prefix = prefix;
+        }
+
+        public void send(ContentHandler contentHandler) throws SAXException {
+            contentHandler.endPrefixMapping(prefix);
+        }
+
+        public void dump(Writer writer) throws IOException {
+            writer.write("[EndPrefixMapping] prefix=" + prefix + "\n");
+        }
+    }
+
+    public final static class StartElement implements SaxBit, Serializable {
+        public final String namespaceURI;
+        public final String localName;
+        public final String qName;
+        public final Attributes attrs;
+
+        public StartElement(String namespaceURI, String localName, String qName, Attributes attrs) {
+            this.namespaceURI = namespaceURI;
+            this.localName = localName;
+            this.qName = qName;
+            this.attrs = new org.xml.sax.helpers.AttributesImpl(attrs);
+        }
+
+        public void send(ContentHandler contentHandler) throws SAXException {
+            contentHandler.startElement(namespaceURI, localName, qName, attrs);
+        }
+
+        public void dump(Writer writer) throws IOException {
+            writer.write("[StartElement] namespaceURI=" + namespaceURI + ",localName=" + localName + ",qName=" + qName + "\n");
+            for (int i = 0; i < attrs.getLength(); i++) {
+                writer.write("      [Attribute] namespaceURI=" + attrs.getURI(i) + ",localName=" + attrs.getLocalName(i) + ",qName=" + attrs.getQName(i) + ",type=" + attrs.getType(i) + ",value=" + attrs.getValue(i) + "\n");
+            }
+        }
+    }
+
+    public final static class EndElement implements SaxBit, Serializable {
+        public final String namespaceURI;
+        public final String localName;
+        public final String qName;
+
+        public EndElement(String namespaceURI, String localName, String qName) {
+            this.namespaceURI = namespaceURI;
+            this.localName = localName;
+            this.qName = qName;
+        }
+
+        public void send(ContentHandler contentHandler) throws SAXException {
+            contentHandler.endElement(namespaceURI, localName, qName);
+        }
+
+        public void dump(Writer writer) throws IOException {
+            writer.write("[EndElement] namespaceURI=" + namespaceURI + ",localName=" + localName + ",qName=" + qName + "\n");
+        }
+    }
+
+    public final static class Characters implements SaxBit, Serializable {
+        public final char[] ch;
+
+        public Characters(char[] ch, int start, int length) {
+            // make a copy so that we don't hold references to a potentially large array we don't control
+            this.ch = new char[length];
+            System.arraycopy(ch, start, this.ch, 0, length);
+        }
+
+        public void send(ContentHandler contentHandler) throws SAXException {
+            contentHandler.characters(ch, 0, ch.length);
+        }
+
+        public void toString(StringBuffer value) {
+            value.append(ch);
+        }
+
+        public void dump(Writer writer) throws IOException {
+            writer.write("[Characters] ch=" + new String(ch) + "\n");
+        }
+    }
+
+    public final static class Comment implements SaxBit, Serializable {
+        public final char[] ch;
+
+        public Comment(char[] ch, int start, int length) {
+            // make a copy so that we don't hold references to a potentially large array we don't control
+            this.ch = new char[length];
+            System.arraycopy(ch, start, this.ch, 0, length);
+        }
+
+        public void send(ContentHandler contentHandler) throws SAXException {
+            if (contentHandler instanceof LexicalHandler)
+                ((LexicalHandler)contentHandler).comment(ch, 0, ch.length);
+        }
+
+        public void dump(Writer writer) throws IOException {
+            writer.write("[Comment] ch=" + new String(ch) + "\n");
+        }
+    }
+
+    public final static class StartCDATA implements SaxBit, Serializable {
+        public static final StartCDATA SINGLETON = new StartCDATA();
+
+        public void send(ContentHandler contentHandler) throws SAXException {
+            if (contentHandler instanceof LexicalHandler)
+                ((LexicalHandler)contentHandler).startCDATA();
+        }
+
+        public void dump(Writer writer) throws IOException {
+            writer.write("[StartCDATA]\n");
+        }
+    }
+
+    public final static class EndCDATA implements SaxBit, Serializable {
+        public static final EndCDATA SINGLETON = new EndCDATA();
+
+        public void send(ContentHandler contentHandler) throws SAXException {
+            if (contentHandler instanceof LexicalHandler)
+                ((LexicalHandler)contentHandler).endCDATA();
+        }
+
+        public void dump(Writer writer) throws IOException {
+            writer.write("[EndCDATA]\n");
+        }
+    }
+
+    public final static class IgnorableWhitespace implements SaxBit, Serializable {
+        public final char[] ch;
+
+        public IgnorableWhitespace(char[] ch, int start, int length) {
+            // make a copy so that we don't hold references to a potentially large array we don't control
+            this.ch = new char[length];
+            System.arraycopy(ch, start, this.ch, 0, length);
+        }
+
+        public void send(ContentHandler contentHandler) throws SAXException {
+            contentHandler.ignorableWhitespace(ch, 0, ch.length);
+        }
+
+        public void dump(Writer writer) throws IOException {
+            writer.write("[IgnorableWhitespace] ch=" + new String(ch) + "\n");
+        }
+    }
+
+    public final static class XMLizableBit implements SaxBit, Serializable {
+        public final SAXBuffer xml;
+
+        public XMLizableBit(SAXBuffer xml) {
+            this.xml = xml;
+        }
+
+        public void send(ContentHandler contentHandler) throws SAXException {
+            this.xml.toSAX(new EmbeddedSAXPipe(contentHandler));
+        }
+
+        public void dump(Writer writer) throws IOException {
+            writer.write("[XMLizable] Begin nested SaxBuffer\n");
+            xml.dump(writer);
+            writer.write("[XMLizable] End nested SaxBuffer\n");
+        }
+    }
+}

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

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

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

Copied: cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/sax/SAXUtils.java (from r728705, cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/util/XMLUtils.java)
URL: http://svn.apache.org/viewvc/cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/sax/SAXUtils.java?p2=cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/sax/SAXUtils.java&p1=cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/util/XMLUtils.java&r1=728705&r2=729283&rev=729283&view=diff
==============================================================================
--- cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/util/XMLUtils.java (original)
+++ cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/sax/SAXUtils.java Wed Dec 24 01:25:21 2008
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.cocoon.xml.util;
+package org.apache.cocoon.xml.sax;
 
 import org.xml.sax.Attributes;
 import org.xml.sax.ContentHandler;
@@ -25,7 +25,7 @@
  *
  * @version $Id$
  */
-public class XMLUtils {
+public class SAXUtils {
 
     /**
      * Empty attributes immutable object.

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

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

Propchange: cocoon/whiteboard/xml-utils/src/main/java/org/apache/cocoon/xml/sax/SAXUtils.java
------------------------------------------------------------------------------
    svn:mergeinfo = 

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



Mime
View raw message