Return-Path: Delivered-To: apmail-xml-cocoon-cvs-archive@xml.apache.org Received: (qmail 91422 invoked by uid 500); 8 Mar 2003 14:15:46 -0000 Mailing-List: contact cocoon-cvs-help@xml.apache.org; run by ezmlm Precedence: bulk Reply-To: cocoon-dev@xml.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list cocoon-cvs@xml.apache.org Received: (qmail 91409 invoked by uid 500); 8 Mar 2003 14:15:46 -0000 Delivered-To: apmail-xml-cocoon2-cvs@apache.org Received: (qmail 91406 invoked from network); 8 Mar 2003 14:15:46 -0000 Received: from icarus.apache.org (208.185.179.13) by daedalus.apache.org with SMTP; 8 Mar 2003 14:15:46 -0000 Received: (qmail 74723 invoked by uid 1318); 8 Mar 2003 14:15:46 -0000 Date: 8 Mar 2003 14:15:46 -0000 Message-ID: <20030308141546.74722.qmail@icarus.apache.org> From: sylvain@apache.org To: xml-cocoon2-cvs@apache.org Subject: cvs commit: xml-cocoon2/src/webapp/samples/xmlform sitemap.xmap X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N sylvain 2003/03/08 06:15:46 Modified: src/blocks/html/java/org/apache/cocoon/generation HTMLGenerator.java src/java/org/apache/cocoon/xml/dom DOMStreamer.java src/webapp sitemap.xmap src/webapp/samples/catalog sitemap.xmap src/webapp/samples/i18n sitemap.xmap src/webapp/samples/xmlform sitemap.xmap Log: - Fix again DOMStreamer - Start to fix the samples (mind reading matthew ?) Revision Changes Path 1.7 +2 -2 xml-cocoon2/src/blocks/html/java/org/apache/cocoon/generation/HTMLGenerator.java Index: HTMLGenerator.java =================================================================== RCS file: /home/cvs/xml-cocoon2/src/blocks/html/java/org/apache/cocoon/generation/HTMLGenerator.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- HTMLGenerator.java 3 Mar 2003 22:44:10 -0000 1.6 +++ HTMLGenerator.java 8 Mar 2003 14:15:45 -0000 1.7 @@ -337,7 +337,7 @@ } } else { DOMStreamer streamer = new DOMStreamer(this.contentHandler,this.lexicalHandler); - streamer.setNormalizeNamespacesOn(false); + streamer.setNormalizeNamespaces(false); streamer.stream(doc); } } catch (IOException e){ 1.12 +18 -13 xml-cocoon2/src/java/org/apache/cocoon/xml/dom/DOMStreamer.java Index: DOMStreamer.java =================================================================== RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/xml/dom/DOMStreamer.java,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- DOMStreamer.java 8 Mar 2003 10:29:30 -0000 1.11 +++ DOMStreamer.java 8 Mar 2003 14:15:45 -0000 1.12 @@ -75,7 +75,7 @@ * events from a W3C DOM Document. * *

The DOMStreamer uses a different strategy based on the value of the - * normalizeNamespacesOn property: + * normalizeNamespaces property: *

    *
  • if true (the default), the DOMStreamer will normalize namespace * declarations (i.e. add missing xmlns attributes or correct them). See @@ -91,7 +91,7 @@ public class DOMStreamer implements XMLProducer { /** Indicates whether namespace normalization should happen. */ - protected boolean normalizeNamespacesOn = true; + protected boolean normalizeNamespaces = true; /** DOMStreamer used in case of namespace normalization. */ protected NamespaceNormalizingDOMStreamer namespaceNormalizingDOMStreamer = new NamespaceNormalizingDOMStreamer(); @@ -169,24 +169,24 @@ * Start the production of SAX events. */ public void stream(Node node) throws SAXException { - if (normalizeNamespacesOn) + if (normalizeNamespaces) namespaceNormalizingDOMStreamer.stream(node); else defaultDOMStreamer.stream(node); } - public boolean isNormalizeNamespacesOn() { - return normalizeNamespacesOn; + public boolean isNormalizeNamespaces() { + return normalizeNamespaces; } - public void setNormalizeNamespacesOn(boolean normalizeNamespacesOn) { - this.normalizeNamespacesOn = normalizeNamespacesOn; + public void setNormalizeNamespaces(boolean normalizeNamespaces) { + this.normalizeNamespaces = normalizeNamespaces; } public void recycle() { defaultDOMStreamer.recycle(); namespaceNormalizingDOMStreamer.recycle(); - normalizeNamespacesOn = true; + normalizeNamespaces = true; } /** @@ -247,8 +247,11 @@ */ protected void stream(Node pos) throws SAXException { - // (SW) we stream a fragment, and not a complete document - //contentHandler.startDocument(); + // Start document only if we're streaming a document + boolean isDoc = (pos.getNodeType() == Node.DOCUMENT_NODE); + if (isDoc) { + contentHandler.startDocument(); + } Node top = pos; @@ -281,8 +284,10 @@ pos = nextNode; } - // (SW) we stream a fragment, and not a complete document - //contentHandler.endDocument(); + + if (isDoc) { + contentHandler.endDocument(); + } } private final void dispatachChars(Node node) throws SAXException { 1.92 +7 -0 xml-cocoon2/src/webapp/sitemap.xmap Index: sitemap.xmap =================================================================== RCS file: /home/cvs/xml-cocoon2/src/webapp/sitemap.xmap,v retrieving revision 1.91 retrieving revision 1.92 diff -u -r1.91 -r1.92 --- sitemap.xmap 1 Mar 2003 15:44:06 -0000 1.91 +++ sitemap.xmap 8 Mar 2003 14:15:46 -0000 1.92 @@ -433,6 +433,13 @@ + + + + + 1.2 +6 -6 xml-cocoon2/src/webapp/samples/catalog/sitemap.xmap Index: sitemap.xmap =================================================================== RCS file: /home/cvs/xml-cocoon2/src/webapp/samples/catalog/sitemap.xmap,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- sitemap.xmap 20 Feb 2003 18:18:44 -0000 1.1 +++ sitemap.xmap 8 Mar 2003 14:15:46 -0000 1.2 @@ -28,24 +28,24 @@ - - + + - + - + - - + + 1.8 +1 -1 xml-cocoon2/src/webapp/samples/i18n/sitemap.xmap Index: sitemap.xmap =================================================================== RCS file: /home/cvs/xml-cocoon2/src/webapp/samples/i18n/sitemap.xmap,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- sitemap.xmap 19 Feb 2003 07:19:10 -0000 1.7 +++ sitemap.xmap 8 Mar 2003 14:15:46 -0000 1.8 @@ -70,7 +70,7 @@ - + 1.16 +3 -0 xml-cocoon2/src/webapp/samples/xmlform/sitemap.xmap Index: sitemap.xmap =================================================================== RCS file: /home/cvs/xml-cocoon2/src/webapp/samples/xmlform/sitemap.xmap,v retrieving revision 1.15 retrieving revision 1.16 diff -u -r1.15 -r1.16 --- sitemap.xmap 23 Feb 2003 19:21:41 -0000 1.15 +++ sitemap.xmap 8 Mar 2003 14:15:46 -0000 1.16 @@ -3,6 +3,9 @@ + + +