morten      01/09/12 07:56:00

  Modified:    java/src/org/apache/xalan/xsltc/dom DOMImpl.java
  Log:
  Added some code to the DOM builder to make sure that text nodes are not
  broken up into smaller fragments.
  PR:           bugzilla 3506
  Obtained from:        n/a
  Submitted by: [EMAIL PROTECTED]
  Reviewed by:  [EMAIL PROTECTED]
  
  Revision  Changes    Path
  1.24      +11 -2     
xml-xalan/java/src/org/apache/xalan/xsltc/dom/DOMImpl.java
  
  Index: DOMImpl.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/dom/DOMImpl.java,v
  retrieving revision 1.23
  retrieving revision 1.24
  diff -u -r1.23 -r1.24
  --- DOMImpl.java      2001/09/12 14:30:47     1.23
  +++ DOMImpl.java      2001/09/12 14:56:00     1.24
  @@ -1,5 +1,5 @@
   /*
  - * @(#)$Id: DOMImpl.java,v 1.23 2001/09/12 14:30:47 morten Exp $
  + * @(#)$Id: DOMImpl.java,v 1.24 2001/09/12 14:56:00 morten Exp $
    *
    * The Apache Software License, Version 1.1
    *
  @@ -2855,7 +2855,6 @@
            }
            System.arraycopy(ch, start, _text, _currentOffset, length);
            _currentOffset += length;
  -         makeTextNode(false);
        }
   
        /**
  @@ -2875,6 +2874,8 @@
         * SAX2: Receive notification of the end of a document.
         */
        public void endDocument() {
  +         makeTextNode(false);
  +
            _shortTexts = null;
            final int namesSize = _nextNameCode - NTYPES;
   
  @@ -2930,6 +2931,9 @@
        public void startElement(String uri, String localName,
                                 String qname, Attributes attributes)
            throws SAXException {
  +
  +         makeTextNode(false);
  +
            // Get node index and setup parent/child references
            final int node = nextNode();
            linkChildren(node);
  @@ -2971,6 +2975,7 @@
         */
        public void endElement(String namespaceURI, String localName,
                               String qname) {
  +         makeTextNode(false);
            // Revert to strip/preserve-space setting from before this element
            xmlSpaceRevert(_parentStack[_sp]);
            _previousSiblingStack[_sp--] = 0;
  @@ -2981,6 +2986,9 @@
         */
        public void processingInstruction(String target, String data)
            throws SAXException {
  +
  +         makeTextNode(false);
  +
            final int node = nextNode();
            _type[node] = PROCESSING_INSTRUCTION;
            linkChildren(node);
  @@ -3050,6 +3058,7 @@
         * SAX2: Report an XML comment anywhere in the document.
         */
        public void comment(char[] ch, int start, int length) {
  +         makeTextNode(false);
            if (_currentOffset + length > _text.length) {
                resizeTextArray(_text.length * 2);
            }
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to