dbertoni    00/12/17 14:27:03

  Modified:    c/src/XalanSourceTree XalanSourceTreeAttributesVector.cpp
                        XalanSourceTreeAttributesVector.hpp
                        XalanSourceTreeComment.cpp
                        XalanSourceTreeComment.hpp
                        XalanSourceTreeCommentAllocator.cpp
                        XalanSourceTreeCommentAllocator.hpp
                        XalanSourceTreeContentHandler.cpp
                        XalanSourceTreeContentHandler.hpp
                        XalanSourceTreeDocument.cpp
                        XalanSourceTreeDocument.hpp
                        XalanSourceTreeElement.cpp
                        XalanSourceTreeElement.hpp
                        XalanSourceTreeHelper.cpp XalanSourceTreeHelper.hpp
                        XalanSourceTreeParserLiaison.cpp
                        XalanSourceTreeProcessingInstruction.cpp
                        XalanSourceTreeProcessingInstruction.hpp
                        XalanSourceTreeText.cpp XalanSourceTreeText.hpp
  Log:
  Removed obsolete files and tweaked for performance.  Added code to support 
SAX2's LexicalHandler.
  
  Revision  Changes    Path
  1.2       +66 -39    
xml-xalan/c/src/XalanSourceTree/XalanSourceTreeAttributesVector.cpp
  
  Index: XalanSourceTreeAttributesVector.cpp
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/c/src/XalanSourceTree/XalanSourceTreeAttributesVector.cpp,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- XalanSourceTreeAttributesVector.cpp       2000/12/15 23:23:25     1.1
  +++ XalanSourceTreeAttributesVector.cpp       2000/12/17 22:26:58     1.2
  @@ -58,9 +58,14 @@
   
   
   
  +#include <cassert>
  +
  +
  +
   XalanSourceTreeAttributesVector::XalanSourceTreeAttributesVector(size_type   
theBlockSize) :
        m_list(),
  -     m_blockSize(theBlockSize)
  +     m_blockSize(theBlockSize),
  +     m_lastEntryFound(0)
   {
   }
   
  @@ -78,18 +83,18 @@
        // Handle the case of theCount being greater than the block size 
first...
        if (theCount >= m_blockSize)
        {
  -             return createEntry(theCount);
  +             return createEntry(theCount, theCount);
        }
        else
        {
  -             ListEntryType* const    theEntry =
  +             ListEntryType*  theEntry =
                        findEntry(theCount);
   
                // Did we find a slot?
                if (theEntry == 0)
                {
                        // Nope, create a new one...
  -                     return createEntry(theCount);
  +            return createEntry(m_blockSize, theCount);;
                }
                else
                {
  @@ -109,8 +114,12 @@
   
   
   XalanSourceTreeAttr**
  -XalanSourceTreeAttributesVector::createEntry(size_type       theCount)
  +XalanSourceTreeAttributesVector::createEntry(
  +                     size_type       theBlockSize,
  +                     size_type       theCount)
   {
  +     assert(theBlockSize >= theCount);
  +
        // Push on a new entry.  The entry has no open space,
        // since it's greater than our block size...
        m_list.push_back(ListEntryType(0, VectorType()));
  @@ -119,7 +128,15 @@
        ListEntryType&  theNewEntry = m_list.back();
   
        // Resize the vector to the appropriate size...
  -     theNewEntry.second.resize(theCount);
  +     theNewEntry.second.resize(theBlockSize, 0);
  +
  +     // Set the number of free spaces accordingly...
  +     theNewEntry.first = theBlockSize - theCount;
  +
  +    if (theNewEntry.first != 0)
  +    {
  +        m_lastEntryFound = &theNewEntry;
  +    }
   
        // Return a pointer to the beginning of the allocated memory...
        return &*theNewEntry.second.begin();
  @@ -132,47 +149,57 @@
   XalanSourceTreeAttributesVector::findEntry(size_type theCount)
   {
        // Search for an entry that has some free space.
  -     const ListType::iterator        theEnd = m_list.end();
  -     ListType::iterator      theCurrent = m_list.begin();
   
  -     ListEntryType*  theEntry = 0;
  -
  -     while(theCurrent != theEnd)
  +     if (m_lastEntryFound != 0 && m_lastEntryFound->first >= theCount)
        {
  -             // We're looking for the best fit, so
  -             // if the free space and the count we're
  -             // looking for are equal, that's pretty
  -             // much the best we can do...
  -             if ((*theCurrent).first == theCount)
  -             {
  -                     theEntry = &*theCurrent;
  +             return m_lastEntryFound;
  +     }
  +     else
  +     {
  +             const ListType::iterator        theEnd = m_list.end();
  +             ListType::iterator      theCurrent = m_list.begin();
   
  -                     break;
  -             }
  -             else if ((*theCurrent).first >= theCount)
  +             ListEntryType*  theEntry = 0;
  +
  +             while(theCurrent != theEnd)
                {
  -                     // If we haven't found anything yet, the first
  -                     // entry we find that's large enough becomes
  -                     // our best fit.
  -                     //
  -                     // Otherwise, we'll assume that a smaller
  -                     // slot is a better fit, though I may be
  -                     // wrong about this...
  -                     if (theEntry == 0 ||
  -                             (*theCurrent).first < theEntry->first)
  +                     // We're looking for the best fit, so
  +                     // if the free space and the count we're
  +                     // looking for are equal, that's pretty
  +                     // much the best we can do...
  +                     if ((*theCurrent).first == theCount)
                        {
  -                             // Nope, so this becomes our best-fit so far.
                                theEntry = &*theCurrent;
  +
  +                             break;
                        }
  +                     else if ((*theCurrent).first >= theCount)
  +                     {
  +                             // If we haven't found anything yet, the first
  +                             // entry we find that's large enough becomes
  +                             // our best fit.
  +                             //
  +                             // Otherwise, we'll assume that a smaller
  +                             // slot is a better fit, though I may be
  +                             // wrong about this...
  +                             if (theEntry == 0 ||
  +                                     (*theCurrent).first < theEntry->first)
  +                             {
  +                                     // Nope, so this becomes our best-fit 
so far.
  +                                     theEntry = &*theCurrent;
  +                             }
   
  -                     ++theCurrent;
  -             }
  -             else
  -             {
  -                     // Won't fit, so just continue...
  -                     ++theCurrent;
  +                             ++theCurrent;
  +                     }
  +                     else
  +                     {
  +                             // Won't fit, so just continue...
  +                             ++theCurrent;
  +                     }
                }
  -     }
  +
  +             m_lastEntryFound = theEntry;
   
  -     return theEntry;
  +             return theEntry;
  +     }
   }
  
  
  
  1.2       +7 -3      
xml-xalan/c/src/XalanSourceTree/XalanSourceTreeAttributesVector.hpp
  
  Index: XalanSourceTreeAttributesVector.hpp
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/c/src/XalanSourceTree/XalanSourceTreeAttributesVector.hpp,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- XalanSourceTreeAttributesVector.hpp       2000/12/15 23:23:25     1.1
  +++ XalanSourceTreeAttributesVector.hpp       2000/12/17 22:26:58     1.2
  @@ -89,9 +89,9 @@
        typedef std::list<ListEntryType>                        ListType;
   #endif
   
  +    // Default size for vector allocation.
  +     enum { eDefaultBlockSize = 500 };
   
  -     enum { eDefaultBlockSize = 50 };
  -
        /**
         * Constructor.
         *
  @@ -115,7 +115,9 @@
   
        // Utility functions...
        XalanSourceTreeAttr**
  -     createEntry(size_type   theCount);
  +     createEntry(
  +                     size_type       theBlockSize,
  +                     size_type       theCount);
   
        ListEntryType*
        findEntry(size_type             theCount);
  @@ -134,6 +136,8 @@
        ListType                        m_list;
   
        const size_type         m_blockSize;
  +
  +     ListEntryType*          m_lastEntryFound;
   };
   
   
  
  
  
  1.2       +15 -20    
xml-xalan/c/src/XalanSourceTree/XalanSourceTreeComment.cpp
  
  Index: XalanSourceTreeComment.cpp
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/c/src/XalanSourceTree/XalanSourceTreeComment.cpp,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- XalanSourceTreeComment.cpp        2000/12/15 23:24:12     1.1
  +++ XalanSourceTreeComment.cpp        2000/12/17 22:26:58     1.2
  @@ -66,7 +66,7 @@
   
   
   
  -#include "XalanSourceTreeCDATASection.hpp"
  +#include "XalanSourceTreeDocument.hpp"
   #include "XalanSourceTreeElement.hpp"
   #include "XalanSourceTreeProcessingInstruction.hpp"
   #include "XalanSourceTreeText.hpp"
  @@ -80,12 +80,14 @@
   
   XalanSourceTreeComment::XalanSourceTreeComment(
                        const XalanDOMString&           theData,
  +                     XalanSourceTreeDocument*        theOwnerDocument,
                        XalanSourceTreeElement*         theParentElement,
                        XalanNode*                                      
thePreviousSibling,
                        XalanNode*                                      
theNextSibling,
                        unsigned int                            theIndex) :
        XalanComment(),
        m_data(theData),
  +     m_ownerDocument(theOwnerDocument),
        m_parentElement(theParentElement),
        m_previousSibling(thePreviousSibling),
        m_nextSibling(theNextSibling),
  @@ -142,7 +144,16 @@
   XalanNode*
   XalanSourceTreeComment::getParentNode() const
   {
  -     return m_parentElement;
  +     assert(m_ownerDocument != 0);
  +
  +     if (m_parentElement != 0)
  +     {
  +             return m_parentElement;
  +     }
  +     else
  +     {
  +             return m_ownerDocument;
  +     }
   }
   
   
  @@ -198,9 +209,9 @@
   XalanDocument*
   XalanSourceTreeComment::getOwnerDocument() const
   {
  -     assert(m_parentElement != 0);
  +     assert(m_ownerDocument != 0);
   
  -     return m_parentElement->getOwnerDocument();
  +     return m_ownerDocument;
   }
   
   
  @@ -421,14 +432,6 @@
   
   
   void
  -XalanSourceTreeComment::setPreviousSibling(XalanSourceTreeCDATASection*      
        thePreviousSibling)
  -{
  -     m_previousSibling = thePreviousSibling;
  -}
  -
  -
  -
  -void
   XalanSourceTreeComment::setPreviousSibling(XalanSourceTreeElement*   
thePreviousSibling)
   {
        m_previousSibling = thePreviousSibling;
  @@ -454,14 +457,6 @@
   
   void
   XalanSourceTreeComment::appendSiblingNode(XalanSourceTreeComment*    
theSibling)
  -{
  -     XalanSourceTreeHelper::appendSibling(this, m_nextSibling, theSibling);
  -}
  -
  -
  -
  -void
  -XalanSourceTreeComment::appendSiblingNode(XalanSourceTreeCDATASection*       
theSibling)
   {
        XalanSourceTreeHelper::appendSibling(this, m_nextSibling, theSibling);
   }
  
  
  
  1.2       +6 -8      
xml-xalan/c/src/XalanSourceTree/XalanSourceTreeComment.hpp
  
  Index: XalanSourceTreeComment.hpp
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/c/src/XalanSourceTree/XalanSourceTreeComment.hpp,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- XalanSourceTreeComment.hpp        2000/12/15 23:24:12     1.1
  +++ XalanSourceTreeComment.hpp        2000/12/17 22:26:58     1.2
  @@ -71,7 +71,7 @@
   
   
   
  -class XalanSourceTreeCDATASection;
  +class XalanSourceTreeDocument;
   class XalanSourceTreeElement;
   class XalanSourceTreeProcessingInstruction;
   class XalanSourceTreeText;
  @@ -93,7 +93,8 @@
        /**
         * Constructor.
         *
  -      * @param theData The text data of the node
  +      * @param theData The text data of the node.
  +      * @param theOwnerDocument The owner document of the comment node.
         * @param theParentElement The parent element, if any.
         * @param thePreviousSibling The previous sibling, if any.
         * @param theNextSibling The next sibling, if any.
  @@ -101,6 +102,7 @@
         */
        XalanSourceTreeComment(
                        const XalanDOMString&           theData,
  +                     XalanSourceTreeDocument*        theOwnerDocument,
                        XalanSourceTreeElement*         theParentElement = 0,
                        XalanNode*                                      
thePreviousSibling = 0,
                        XalanNode*                                      
theNextSibling = 0,
  @@ -601,9 +603,6 @@
        setPreviousSibling(XalanSourceTreeComment*      thePreviousSibling);
   
        void
  -     setPreviousSibling(XalanSourceTreeCDATASection*         
thePreviousSibling);
  -
  -     void
        setPreviousSibling(XalanSourceTreeElement*      thePreviousSibling);
   
        void
  @@ -616,9 +615,6 @@
        appendSiblingNode(XalanSourceTreeComment*       theSibling);
   
        void
  -     appendSiblingNode(XalanSourceTreeCDATASection*  theSibling);
  -
  -     void
        appendSiblingNode(XalanSourceTreeElement*       theSibling);
   
        void
  @@ -651,6 +647,8 @@
   
        // Data members...
        const XalanDOMString&           m_data;
  +
  +     XalanSourceTreeDocument*        m_ownerDocument;
   
        XalanSourceTreeElement*         m_parentElement;
   
  
  
  
  1.2       +2 -0      
xml-xalan/c/src/XalanSourceTree/XalanSourceTreeCommentAllocator.cpp
  
  Index: XalanSourceTreeCommentAllocator.cpp
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/c/src/XalanSourceTree/XalanSourceTreeCommentAllocator.cpp,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- XalanSourceTreeCommentAllocator.cpp       2000/12/15 23:24:12     1.1
  +++ XalanSourceTreeCommentAllocator.cpp       2000/12/17 22:26:58     1.2
  @@ -76,6 +76,7 @@
   XalanSourceTreeCommentAllocator::ObjectType*
   XalanSourceTreeCommentAllocator::create(
                        const XalanDOMString&           theData,
  +                     XalanSourceTreeDocument*        theOwnerDocument,
                        XalanSourceTreeElement*         theParentElement,
                        XalanNode*                                      
thePreviousSibling,
                        XalanNode*                                      
theNextSibling,
  @@ -86,6 +87,7 @@
   
        new(theBlock) ObjectType(
                                                theData,
  +                                             theOwnerDocument,
                                                theParentElement,
                                                thePreviousSibling,
                                                theNextSibling,
  
  
  
  1.2       +2 -0      
xml-xalan/c/src/XalanSourceTree/XalanSourceTreeCommentAllocator.hpp
  
  Index: XalanSourceTreeCommentAllocator.hpp
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/c/src/XalanSourceTree/XalanSourceTreeCommentAllocator.hpp,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- XalanSourceTreeCommentAllocator.hpp       2000/12/15 23:24:12     1.1
  +++ XalanSourceTreeCommentAllocator.hpp       2000/12/17 22:26:58     1.2
  @@ -102,6 +102,7 @@
         * Create an instance.
         * 
         * @param theData The data for the comment
  +      * @param theOwnerDocument The owner document of the comment node.
         * @param theParentElement The parent element, if any.
         * @param thePreviousSibling The next sibling, if any.
         * @param theNextSibling The next sibling, if any.
  @@ -112,6 +113,7 @@
        ObjectType*
        create(
                        const XalanDOMString&           theData,
  +                     XalanSourceTreeDocument*        theOwnerDocument,
                        XalanSourceTreeElement*         theParentElement = 0,
                        XalanNode*                                      
thePreviousSibling = 0,
                        XalanNode*                                      
theNextSibling = 0,
  
  
  
  1.2       +78 -14    
xml-xalan/c/src/XalanSourceTree/XalanSourceTreeContentHandler.cpp
  
  Index: XalanSourceTreeContentHandler.cpp
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/c/src/XalanSourceTree/XalanSourceTreeContentHandler.cpp,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- XalanSourceTreeContentHandler.cpp 2000/12/15 23:24:12     1.1
  +++ XalanSourceTreeContentHandler.cpp 2000/12/17 22:26:59     1.2
  @@ -76,6 +76,7 @@
                        bool                                            
fAccumulateText) :
        ContentHandler(),
        DTDHandler(),
  +     LexicalHandler(),
        m_document(theDocument),
        m_currentElement(0),
        m_elementStack(),
  @@ -163,11 +164,8 @@
                        const XMLCh* const      chars,
                        const unsigned int      length)
   {
  -     if (m_currentElement == 0)
  -     {
  -             throw 
XalanDOMException(XalanDOMException::HIERARCHY_REQUEST_ERR);
  -     }
  -     else
  +     // Ignore any whitespace reported before the document element has been 
parsed.
  +     if (m_elementStack.empty() == false)
        {
                processAccumulatedText();
   
  @@ -247,14 +245,7 @@
   
        if (m_currentElement == 0)
        {
  -             if (m_document->getDocumentElement() != 0)
  -             {
  -                     throw 
XalanDOMException(XalanDOMException::HIERARCHY_REQUEST_ERR);
  -             }
  -             else
  -             {
  -                     m_document->setDocumentElement(theNewElement);
  -             }
  +             m_document->appendChildNode(theNewElement);
        }
        else
        {
  @@ -310,7 +301,7 @@
   {
        assert(m_document != 0);
   
  -     m_document->unparsedEntityDecl(name, publicId, systemId, notationName);
  +     m_document->unparsedEntityDeclaration(name, publicId, systemId, 
notationName);
   }
   
   
  @@ -318,6 +309,79 @@
   void
   XalanSourceTreeContentHandler::resetDocType()
   {
  +}
  +
  +
  +
  +void
  +XalanSourceTreeContentHandler::comment(
  +                     const XMLCh* const      chars,
  +                     const unsigned int      length)
  +{
  +     assert(m_document != 0);
  +
  +     processAccumulatedText();
  +
  +     XalanSourceTreeComment* const   theNewComment =
  +             m_document->createCommentNode(chars, length, m_currentElement);
  +
  +     if (m_currentElement != 0)
  +     {
  +             m_currentElement->appendChildNode(theNewComment);
  +     }
  +     else
  +     {
  +             m_document->appendChildNode(theNewComment);
  +     }
  +}
  +
  +
  +
  +void
  +XalanSourceTreeContentHandler::endCDATA()
  +{
  +}
  +
  +
  +
  +void
  +XalanSourceTreeContentHandler::endDTD()
  +{
  +     assert(m_document != 0);
  +
  +}
  +
  +
  +
  +void
  +XalanSourceTreeContentHandler::endEntity(const XMLCh* const          name)
  +{
  +     assert(m_document != 0);
  +}
  +
  +
  +void
  +XalanSourceTreeContentHandler::startCDATA()
  +{
  +}
  +
  +
  +
  +void
  +XalanSourceTreeContentHandler::startDTD(
  +                     const XMLCh* const      name,
  +                     const XMLCh* const      publicId,
  +                     const XMLCh* const      systemId)
  +{
  +     assert(m_document != 0);
  +}
  +
  +
  +
  +void
  +XalanSourceTreeContentHandler::startEntity(const XMLCh* const        name)
  +{
  +     assert(m_document != 0);
   }
   
   
  
  
  
  1.2       +58 -17    
xml-xalan/c/src/XalanSourceTree/XalanSourceTreeContentHandler.hpp
  
  Index: XalanSourceTreeContentHandler.hpp
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/c/src/XalanSourceTree/XalanSourceTreeContentHandler.hpp,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- XalanSourceTreeContentHandler.hpp 2000/12/15 23:24:12     1.1
  +++ XalanSourceTreeContentHandler.hpp 2000/12/17 22:26:59     1.2
  @@ -71,8 +71,21 @@
   #include <sax/DTDHandler.hpp>
   #include <sax2/ContentHandler.hpp>
   
  +#if defined(XALAN_XERCES_HAS_LEXICAL_HANDLER)
  +#include <sax2/LexicalHandler.hpp>
  +#else
  +
  +class XALAN_XALANSOURCETREE_EXPORT LexicalHandler
  +{
  +public:
  +
  +    LexicalHandler() {}
  +};
  +
  +#endif
   
   
  +
   #include <XalanDOM/XalanDOMString.hpp>
   
   
  @@ -82,20 +95,19 @@
   
   
   
  -class XALAN_XALANSOURCETREE_EXPORT XalanSourceTreeContentHandler : public 
ContentHandler, public DTDHandler
  +class XALAN_XALANSOURCETREE_EXPORT XalanSourceTreeContentHandler : public 
ContentHandler, public DTDHandler, public LexicalHandler
   {
   public:
        /** @name Constructors and Destructor */
   
   #if defined(XALAN_NO_NAMESPACES)
  -     typedef vector<XalanSourceTreeElement*>                 
ElementStackType;
  +     typedef vector<XalanSourceTreeElement*>                 
ElementStackType;
   #else
        typedef std::vector<XalanSourceTreeElement*>    ElementStackType;
   #endif
   
        enum { eDefaultStackSize = 50, eDefaultTextBufferSize = 100 };
   
  -     //@{
   
        // Constructor
        explicit
  @@ -133,7 +145,7 @@
                const XMLCh* const      data);
   
        virtual void
  -     setDocumentLocator(const Locator* const         locator);
  +     setDocumentLocator(const Locator* const         locator);
   
        virtual void
        startDocument();
  @@ -143,7 +155,7 @@
                        const XMLCh* const      uri,
                        const XMLCh* const      localname,
                        const XMLCh* const      qname,
  -                     const Attributes&       attrs);
  +                     const Attributes&       attrs);
   
        virtual void
        startPrefixMapping(
  @@ -151,7 +163,7 @@
                const XMLCh* const      uri);
   
        virtual void
  -     endPrefixMapping(const XMLCh* const             prefix);
  +     endPrefixMapping(const XMLCh* const     prefix);
   
   
        virtual void
  @@ -162,21 +174,50 @@
   
        virtual void
        notationDecl(
  -                     const XMLCh* const    name,
  -                     const XMLCh* const    publicId,
  -                     const XMLCh* const    systemId);
  +                     const XMLCh* const        name,
  +                     const XMLCh* const        publicId,
  +                     const XMLCh* const        systemId);
   
        virtual void
        unparsedEntityDecl(
  -                     const XMLCh* const    name,
  -                     const XMLCh* const    publicId,
  -                     const XMLCh* const    systemId,
  -                     const XMLCh* const    notationName);
  +                     const XMLCh* const        name,
  +                     const XMLCh* const        publicId,
  +                     const XMLCh* const        systemId,
  +                     const XMLCh* const        notationName);
   
  -    virtual void
  +     virtual void
        resetDocType();
   
   
  +     // Inherited from LexicalHandler...
  +
  +     virtual void
  +     comment(
  +                     const XMLCh* const      chars,
  +                     const unsigned int      length);
  +
  +     virtual void
  +     endCDATA();
  +
  +     virtual void
  +     endDTD();
  +
  +     virtual void
  +     endEntity(const XMLCh* const    name);
  +
  +     virtual void
  +     startCDATA();
  +
  +     virtual void
  +     startDTD(
  +                     const XMLCh* const      name,
  +                     const XMLCh* const      publicId,
  +                     const XMLCh* const      systemId);
  +
  +     virtual void
  +     startEntity(const XMLCh* const  name);
  +
  +     
        // New to XalanSourceTreeContentHandler...
   
        XalanSourceTreeDocument*
  @@ -208,8 +249,8 @@
                        const XMLCh* const                      uri,
                        const XMLCh* const                      localname,
                        const XMLCh* const                      qname,
  -                     const Attributes&                       attrs,
  -                     XalanSourceTreeElement*         theOwnerElement);
  +                     const Attributes&                       attrs,
  +                     XalanSourceTreeElement*         theOwnerElement);
   
        void
        processAccumulatedText();
  @@ -223,7 +264,7 @@
        // Data members...
        XalanSourceTreeDocument*        m_document;
   
  -     XalanSourceTreeElement*         m_currentElement;
  +     XalanSourceTreeElement*         m_currentElement;
   
        ElementStackType                        m_elementStack;
   
  
  
  
  1.2       +17 -290   
xml-xalan/c/src/XalanSourceTree/XalanSourceTreeDocument.cpp
  
  Index: XalanSourceTreeDocument.cpp
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/c/src/XalanSourceTree/XalanSourceTreeDocument.cpp,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- XalanSourceTreeDocument.cpp       2000/12/15 23:24:12     1.1
  +++ XalanSourceTreeDocument.cpp       2000/12/17 22:26:59     1.2
  @@ -84,16 +84,14 @@
        m_firstChild(0),
        m_documentElement(0),
        m_children(*this),
  -     m_attributeAllocator(50),
  +     m_attributeAllocator(100),
        m_attributeNSAllocator(50),
        m_commentAllocator(20),
  -     m_cdataSectionAllocator(20),
  -     m_cdataSectionIWSAllocator(20),
  -     m_elementAllocator(50),
  -     m_elementNSAllocator(50),
  +     m_elementAllocator(100),
  +     m_elementNSAllocator(100),
        m_piAllocator(25),
  -     m_textAllocator(50),
  -     m_textIWSAllocator(50),
  +     m_textAllocator(100),
  +     m_textIWSAllocator(100),
        m_stringPool(),
        m_attributesVector(),
        m_nextIndexValue(2),
  @@ -529,243 +527,6 @@
   
   
   
  -#if 0
  -void
  -XalanSourceTreeDocument::buildBridgeNodes()
  -{
  -     const DOM_Node  theStartChild = m_xercesDocument.getFirstChild();
  -
  -     if (theStartChild.isNull() == false)
  -     {
  -             assert(m_navigators.back().getIndex() == 1);
  -             assert(m_navigators.size() == 1);
  -
  -             BuildBridgeTreeWalker   theTreeWalker(
  -                             this,
  -                             &m_navigators.back(),
  -                             m_navigators,
  -                             2);
  -
  -             theTreeWalker.traverse(theStartChild, m_xercesDocument);
  -     }
  -
  -     // OK, now set m_documentElement...
  -     XalanNode*      theChild = m_navigator.getFirstChild();
  -
  -     while(theChild != 0 && theChild->getNodeType() != 
XalanNode::ELEMENT_NODE)
  -     {
  -             theChild = theChild->getNextSibling();
  -     }
  -
  -#if defined(XALAN_OLD_STYLE_CASTS)
  -     m_documentElement = (XalanElement*)theChild;
  -#else
  -     m_documentElement = static_cast<XalanElement*>(theChild);
  -#endif
  -
  -     m_indexValid = true;
  -
  -     m_mappingMode = false;
  -}
  -
  -
  -
  -XalanSourceTreeDocument::BuildBridgeTreeWalker::BuildBridgeTreeWalker(
  -                     XalanSourceTreeDocument*                theDocument,
  -                     XercesBridgeNavigator*          theDocumentNavigator,
  -                     NavigatorBridgeVectorType&      theNavigators,
  -                     unsigned long                           theStartIndex) :
  -     m_document(theDocument),
  -     m_navigators(theNavigators),
  -     m_currentIndex(theStartIndex),
  -     m_parentNavigatorStack(),
  -     m_siblingNavigatorStack()
  -{
  -     assert(theDocument != 0 && theDocumentNavigator != 0);
  -
  -     // Reserve some space...
  -     m_parentNavigatorStack.reserve(100);
  -     m_parentNavigatorStack.reserve(100);
  -
  -     // The document navigator is the last navigator on the stack...
  -     
m_parentNavigatorStack.push_back(NavigatorStackEntryType(theDocumentNavigator, 
theDocument));
  -
  -     // There is no previous sibling...
  -     m_siblingNavigatorStack.push_back(NavigatorStackEntryType(0, 0));
  -}
  -
  -
  -
  -XalanSourceTreeDocument::BuildBridgeTreeWalker::~BuildBridgeTreeWalker()
  -{
  -}
  -
  -
  -
  -void
  -XalanSourceTreeDocument::BuildBridgeTreeWalker::startNode(const DOM_Node&    
node)
  -{
  -     XalanNode* const        theBridgeNode = 
m_document->createBridgeNode(node, m_currentIndex, false);
  -
  -     XercesBridgeNavigator&  theCurrentNodeNavigator = m_navigators.back();
  -
  -     assert(m_parentNavigatorStack.empty() == false);
  -     assert(m_siblingNavigatorStack.empty() == false);
  -
  -     // Get the two navigators...
  -     NavigatorStackEntryType&        theParentEntry = 
m_parentNavigatorStack.back();
  -     NavigatorStackEntryType&        theSiblingEntry = 
m_siblingNavigatorStack.back();
  -
  -     theCurrentNodeNavigator.setParentNode(theParentEntry.m_node);
  -
  -     // If the first child has not been set, then set it
  -     // now...
  -     if (theParentEntry.m_navigator->getFirstChild() == 0)
  -     {
  -             assert(theSiblingEntry.m_node == 0);
  -
  -             theParentEntry.m_navigator->setFirstChild(theBridgeNode);
  -     }
  -
  -     // Always set the last child...
  -     theParentEntry.m_navigator->setLastChild(theBridgeNode);
  -
  -     theCurrentNodeNavigator.setPreviousSibling(theSiblingEntry.m_node);
  -
  -     if (theSiblingEntry.m_navigator != 0)
  -     {
  -             theSiblingEntry.m_navigator->setNextSibling(theBridgeNode);
  -     }
  -
  -     // Build an entry for the stacks...
  -     const NavigatorStackEntryType   
theCurrentEntry(&theCurrentNodeNavigator, theBridgeNode);
  -
  -     // My child nodes will now be visited, so push the current
  -     // context on the parent stack...
  -     m_parentNavigatorStack.push_back(theCurrentEntry);
  -
  -     // My siblings will also need to know about me as well...
  -     m_siblingNavigatorStack.push_back(theCurrentEntry);
  -
  -     // This will serve to mark the sibling context for my first child,
  -     // since it has no previous sibling.  This will be popped off
  -     // when endNode() is called.
  -     m_siblingNavigatorStack.push_back(NavigatorStackEntryType(0, 0));
  -
  -     // Finally, increment the index counter...
  -     ++m_currentIndex;
  -
  -     const short             theType = node.getNodeType();
  -
  -     if (theType == DOM_Node::DOCUMENT_TYPE_NODE)
  -     {
  -             // Special case for doctype -- we have to build its entities...
  -             const DOM_DocumentType&         theDoctype =
  -#if defined(XALAN_OLD_STYLE_CASTS)
  -                     (const DOM_DocumentType&)node;
  -#else
  -                     static_cast<const DOM_DocumentType&>(node);
  -#endif
  -
  -             const DOM_NamedNodeMap  theEntities =
  -                     theDoctype.getEntities();
  -
  -             const unsigned int      theLength =
  -                     theEntities.getLength();
  -
  -             for (unsigned int i = 0; i < theLength; ++i)
  -             {
  -                     // Build it, but don't index it...
  -                     m_document->createBridgeNode(theEntities.item(i), 
m_currentIndex++, true);
  -             }
  -     }
  -     else if (theType == DOM_Node::ELEMENT_NODE)
  -     {
  -     // Special case for element nodes -- we have to build the attributes...
  -             const DOM_Element&      theElement =
  -#if defined(XALAN_OLD_STYLE_CASTS)
  -                     (const DOM_Element&)node;
  -#else
  -                     static_cast<const DOM_Element&>(node);
  -#endif
  -
  -             const DOM_NamedNodeMap  theAttributes =
  -                     theElement.getAttributes();
  -
  -             const unsigned int      theLength =
  -                     theAttributes.getLength();
  -
  -             XercesBridgeNavigator*  thePreviousAttrNavigator = 0;
  -             XalanNode*                              thePreviousAttr = 0;
  -
  -             for (unsigned int i = 0; i < theLength; ++i)
  -             {
  -                     // Get the attribute from the node map...
  -                     const DOM_Node  theAttr = theAttributes.item(i);
  -                     assert(theAttr.isNull() == false);
  -
  -                     // Create a bridge node.
  -                     XalanNode* const        theCurrentAttr =
  -                             m_document->createBridgeNode(theAttr, 
m_currentIndex, false);
  -                     assert(theCurrentAttr != 0);
  -
  -                     // Get the attribute node's navigator...
  -                     XercesBridgeNavigator&  theCurrentAttrNavigator =
  -                             m_navigators.back();
  -
  -                     // Set the parent node...
  -                     theCurrentAttrNavigator.setParentNode(theBridgeNode);
  -
  -                     if (thePreviousAttr != 0)
  -                     {
  -                             assert(thePreviousAttrNavigator != 0);
  -
  -                             // Link in the previous attribute...
  -                             
theCurrentAttrNavigator.setPreviousSibling(thePreviousAttr);
  -
  -                             
thePreviousAttrNavigator->setNextSibling(theCurrentAttr);
  -                     }
  -
  -                     // Update the pointers so they point to this 
attribute...
  -                     thePreviousAttr = theCurrentAttr;
  -                     thePreviousAttrNavigator = &theCurrentAttrNavigator;
  -
  -                     // Finally, increment the index...
  -                     ++m_currentIndex;
  -             }
  -     }
  -}
  -
  -
  -
  -void
  -XalanSourceTreeDocument::BuildBridgeTreeWalker::endNode(const DOM_Node&      
/* node */)
  -{
  -     assert(m_parentNavigatorStack.empty() == false);
  -     assert(m_siblingNavigatorStack.empty() == false);
  -
  -     // I have to pop my entry, since my children are finished...
  -     m_parentNavigatorStack.pop_back();
  -
  -     // Pop any sibling navigators my child pushed...
  -     while(m_siblingNavigatorStack.back().m_navigator != 0)
  -     {
  -             assert(m_siblingNavigatorStack.back().m_node != 0);
  -
  -             m_siblingNavigatorStack.pop_back();
  -     }
  -
  -     // There must be a context marker...
  -     assert(m_siblingNavigatorStack.back().m_navigator == 0 &&
  -                m_siblingNavigatorStack.back().m_node == 0);
  -
  -     // Pop the context marker...
  -     m_siblingNavigatorStack.pop_back();
  -}
  -#endif
  -
  -
  -
   XalanSourceTreeElement*
   XalanSourceTreeDocument::createElementNode(
                        const XalanDOMChar*                     name,
  @@ -893,47 +654,17 @@
   
   
   
  -XalanSourceTreeCDATASection*
  -XalanSourceTreeDocument::createCDATASectionNode(
  -                     const XalanDOMChar*                     chars,
  -                     unsigned int                            length,
  -                     XalanSourceTreeElement*         theParentElement,
  -                     XalanNode*                                      
thePreviousSibling,
  -                     XalanNode*                                      
theNextSibling)
  -{
  -     const XalanDOMString&   theString = m_stringPool.get(chars, length);
  -
  -     if (isXMLWhitespace(theString) == true)
  -     {
  -             return m_cdataSectionIWSAllocator.create(
  -                             theString,
  -                             theParentElement,
  -                             thePreviousSibling,
  -                             theNextSibling,
  -                             m_nextIndexValue++);
  -     }
  -     else
  -     {
  -             return m_cdataSectionAllocator.create(
  -                             theString,
  -                             theParentElement,
  -                             thePreviousSibling,
  -                             theNextSibling,
  -                             m_nextIndexValue++);
  -     }
  -}
  -
  -
  -
   XalanSourceTreeComment*
   XalanSourceTreeDocument::createCommentNode(
                        const XalanDOMChar*                     data,
  +                     unsigned int                            length,
                        XalanSourceTreeElement*         theParentElement,
                        XalanNode*                                      
thePreviousSibling,
                        XalanNode*                                      
theNextSibling)
   {
        return m_commentAllocator.create(
  -                             m_stringPool.get(data),
  +                             m_stringPool.get(data, length),
  +                             this,
                                theParentElement,
                                thePreviousSibling,
                                theNextSibling,
  @@ -1020,7 +751,7 @@
   
   
   void
  -XalanSourceTreeDocument::unparsedEntityDecl(
  +XalanSourceTreeDocument::unparsedEntityDeclaration(
                        const XMLCh*    name,
                        const XMLCh*    publicId,
                        const XMLCh*    systemId,
  @@ -1234,7 +965,12 @@
                        *++theType == XalanUnicode::charLetter_D &&
                        *++theType == 0)
                {
  -                     
m_elementsByID[c_wstr(theAttributeVector[i]->getValue())] = theOwnerElement;
  +                     // The XPath says that if there are duplicate IDs, the 
first node is
  +                     // always returned, so use insert(), rather than []
  +                     m_elementsByID.insert(
  +                             ElementByIDMapType::value_type(
  +                                     
c_wstr(theAttributeVector[i]->getValue()),
  +                                     theOwnerElement));
                }
        }
   }
  @@ -1242,18 +978,9 @@
   
   
   void
  -XalanSourceTreeDocument::setDocumentElement(XalanSourceTreeElement*          
theElement)
  +XalanSourceTreeDocument::appendChildNode(XalanSourceTreeComment*     
theChild)
   {
  -     if (m_documentElement != 0)
  -     {
  -             throw 
XalanDOMException(XalanDOMException::HIERARCHY_REQUEST_ERR);
  -     }
  -     else
  -     {
  -             m_documentElement = theElement;
  -
  -             XalanSourceTreeHelper::appendSibling(this, m_firstChild, 
theElement);
  -     }
  +     XalanSourceTreeHelper::appendSibling(this, m_firstChild, theChild);
   }
   
   
  
  
  
  1.2       +3 -16     
xml-xalan/c/src/XalanSourceTree/XalanSourceTreeDocument.hpp
  
  Index: XalanSourceTreeDocument.hpp
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/c/src/XalanSourceTree/XalanSourceTreeDocument.hpp,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- XalanSourceTreeDocument.hpp       2000/12/15 23:24:12     1.1
  +++ XalanSourceTreeDocument.hpp       2000/12/17 22:26:59     1.2
  @@ -81,8 +81,6 @@
   #include <XalanSourceTree/XalanSourceTreeAttributeNSAllocator.hpp>
   #include <XalanSourceTree/XalanSourceTreeAttributesVector.hpp>
   #include <XalanSourceTree/XalanSourceTreeCommentAllocator.hpp>
  -#include <XalanSourceTree/XalanSourceTreeCDATASectionAllocator.hpp>
  -#include <XalanSourceTree/XalanSourceTreeCDATASectionIWSAllocator.hpp>
   #include <XalanSourceTree/XalanSourceTreeElementAllocator.hpp>
   #include <XalanSourceTree/XalanSourceTreeElementNSAllocator.hpp>
   #include <XalanSourceTree/XalanSourceTreeProcessingInstructionAllocator.hpp>
  @@ -326,17 +324,10 @@
                        XalanNode*                                      
thePreviousSibling = 0,
                        XalanNode*                                      
theNextSibling = 0);
   
  -     XalanSourceTreeCDATASection*
  -     createCDATASectionNode(
  -                     const XalanDOMChar*                     chars,
  -                     unsigned int                            length,
  -                     XalanSourceTreeElement*         theParentElement = 0,
  -                     XalanNode*                                      
thePreviousSibling = 0,
  -                     XalanNode*                                      
theNextSibling = 0);
  -
        XalanSourceTreeComment*
        createCommentNode(
                        const XalanDOMChar*                     data,
  +                     unsigned int                            length,
                        XalanSourceTreeElement*         theParentElement = 0,
                        XalanNode*                                      
thePreviousSibling = 0,
                        XalanNode*                                      
theNextSibling = 0);
  @@ -366,7 +357,7 @@
                        XalanNode*                                      
theNextSibling = 0);
   
        void
  -     unparsedEntityDecl(
  +     unparsedEntityDeclaration(
                        const XMLCh*    name,
                        const XMLCh*    publicId,
                        const XMLCh*    systemId,
  @@ -377,7 +368,7 @@
   
        // Child node setters...
        void
  -     setDocumentElement(XalanSourceTreeElement*      theElement);
  +     appendChildNode(XalanSourceTreeComment*         theChild);
   
        void
        appendChildNode(XalanSourceTreeElement*         theChild);
  @@ -432,10 +423,6 @@
        XalanSourceTreeAttributeNSAllocator                             
m_attributeNSAllocator;
   
        XalanSourceTreeCommentAllocator                                 
m_commentAllocator;
  -
  -     XalanSourceTreeCDATASectionAllocator                    
m_cdataSectionAllocator;
  -
  -     XalanSourceTreeCDATASectionIWSAllocator                 
m_cdataSectionIWSAllocator;
   
        XalanSourceTreeElementAllocator                                 
m_elementAllocator;
   
  
  
  
  1.2       +0 -25     
xml-xalan/c/src/XalanSourceTree/XalanSourceTreeElement.cpp
  
  Index: XalanSourceTreeElement.cpp
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/c/src/XalanSourceTree/XalanSourceTreeElement.cpp,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- XalanSourceTreeElement.cpp        2000/12/15 23:24:12     1.1
  +++ XalanSourceTreeElement.cpp        2000/12/17 22:26:59     1.2
  @@ -68,7 +68,6 @@
   
   #include "XalanSourceTreeAttr.hpp"
   #include "XalanSourceTreeComment.hpp"
  -#include "XalanSourceTreeCDATASection.hpp"
   #include "XalanSourceTreeDocument.hpp"
   #include "XalanSourceTreeProcessingInstruction.hpp"
   #include "XalanSourceTreeText.hpp"
  @@ -537,14 +536,6 @@
   
   
   void
  -XalanSourceTreeElement::setPreviousSibling(XalanSourceTreeCDATASection*      
        thePreviousSibling)
  -{
  -     m_previousSibling = thePreviousSibling;
  -}
  -
  -
  -
  -void
   XalanSourceTreeElement::setPreviousSibling(XalanSourceTreeElement*   
thePreviousSibling)
   {
        m_previousSibling = thePreviousSibling;
  @@ -577,14 +568,6 @@
   
   
   void
  -XalanSourceTreeElement::appendSiblingNode(XalanSourceTreeCDATASection*       
theSibling)
  -{
  -     XalanSourceTreeHelper::appendSibling(this, m_nextSibling, theSibling);
  -}
  -
  -
  -
  -void
   XalanSourceTreeElement::appendSiblingNode(XalanSourceTreeElement*    
theSibling)
   {
        XalanSourceTreeHelper::appendSibling(this, m_nextSibling, theSibling);
  @@ -610,14 +593,6 @@
   
   void
   XalanSourceTreeElement::appendChildNode(XalanSourceTreeComment*              
theChild)
  -{
  -     XalanSourceTreeHelper::appendSiblingToChild(this, m_firstChild, 
theChild);
  -}
  -
  -
  -
  -void
  -XalanSourceTreeElement::appendChildNode(XalanSourceTreeCDATASection* 
theChild)
   {
        XalanSourceTreeHelper::appendSiblingToChild(this, m_firstChild, 
theChild);
   }
  
  
  
  1.2       +0 -10     
xml-xalan/c/src/XalanSourceTree/XalanSourceTreeElement.hpp
  
  Index: XalanSourceTreeElement.hpp
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/c/src/XalanSourceTree/XalanSourceTreeElement.hpp,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- XalanSourceTreeElement.hpp        2000/12/15 23:24:12     1.1
  +++ XalanSourceTreeElement.hpp        2000/12/17 22:26:59     1.2
  @@ -74,7 +74,6 @@
   
   
   class XalanSourceTreeAttr;
  -class XalanSourceTreeCDATASection;
   class XalanSourceTreeComment;
   class XalanSourceTreeDocument;
   class XalanSourceTreeProcessingInstruction;
  @@ -758,9 +757,6 @@
        setPreviousSibling(XalanSourceTreeComment*      thePreviousSibling);
   
        void
  -     setPreviousSibling(XalanSourceTreeCDATASection*         
thePreviousSibling);
  -
  -     void
        setPreviousSibling(XalanSourceTreeElement*      thePreviousSibling);
   
        void
  @@ -773,9 +769,6 @@
        appendSiblingNode(XalanSourceTreeComment*       theSibling);
   
        void
  -     appendSiblingNode(XalanSourceTreeCDATASection*  theSibling);
  -
  -     void
        appendSiblingNode(XalanSourceTreeElement*       theSibling);
   
        void
  @@ -786,9 +779,6 @@
   
        void
        appendChildNode(XalanSourceTreeComment*         theChild);
  -
  -     void
  -     appendChildNode(XalanSourceTreeCDATASection*    theChild);
   
        void
        appendChildNode(XalanSourceTreeElement*         theChild);
  
  
  
  1.2       +4 -31     xml-xalan/c/src/XalanSourceTree/XalanSourceTreeHelper.cpp
  
  Index: XalanSourceTreeHelper.cpp
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/c/src/XalanSourceTree/XalanSourceTreeHelper.cpp,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- XalanSourceTreeHelper.cpp 2000/12/15 23:24:12     1.1
  +++ XalanSourceTreeHelper.cpp 2000/12/17 22:26:59     1.2
  @@ -68,7 +68,6 @@
   
   
   #include "XalanSourceTreeComment.hpp"
  -#include "XalanSourceTreeCDATASection.hpp"
   #include "XalanSourceTreeDocument.hpp"
   #include "XalanSourceTreeElement.hpp"
   #include "XalanSourceTreeProcessingInstruction.hpp"
  @@ -102,10 +101,6 @@
   
        switch(theLastSibling->getNodeType())
        {
  -     case XalanNode::CDATA_SECTION_NODE:
  -             
castTo<XalanSourceTreeCDATASection>(theLastSibling)->appendSiblingNode(theNewSibling);
  -             break;
  -
        case XalanNode::COMMENT_NODE:
                
castTo<XalanSourceTreeComment>(theLastSibling)->appendSiblingNode(theNewSibling);
                break;
  @@ -184,10 +179,6 @@
   
        switch(theNewSibling->getNodeType())
        {
  -     case XalanNode::CDATA_SECTION_NODE:
  -             append(thePreviousSibling, theNextSiblingSlot, 
castTo<XalanSourceTreeCDATASection>(theNewSibling));
  -             break;
  -
        case XalanNode::COMMENT_NODE:
                append(thePreviousSibling, theNextSiblingSlot, 
castTo<XalanSourceTreeComment>(theNewSibling));
                break;
  @@ -226,6 +217,10 @@
        {
                switch(theNewSibling->getNodeType())
                {
  +             case XalanNode::COMMENT_NODE:
  +                     append(theNextSiblingSlot, 
castTo<XalanSourceTreeComment>(theNewSibling));
  +                     break;
  +
                case XalanNode::ELEMENT_NODE:
                        append(theNextSiblingSlot, 
castTo<XalanSourceTreeElement>(theNewSibling));
                        break;
  @@ -245,17 +240,6 @@
   
   void
   XalanSourceTreeHelper::appendSibling(
  -                     XalanSourceTreeCDATASection*    theNode,
  -                     XalanNode*&                                             
theNextSiblingSlot,
  -                     XalanNode*                                              
theNewSibling)
  -{
  -     doAppendSibling(theNode, theNextSiblingSlot, theNewSibling);
  -}
  -
  -
  -
  -void
  -XalanSourceTreeHelper::appendSibling(
                        XalanSourceTreeComment*         theNode,
                        XalanNode*&                                     
theNextSiblingSlot,
                        XalanNode*                                      
theNewSibling)
  @@ -314,17 +298,6 @@
        }
   
        append(theFirstChildSlot, theNewSibling);
  -}
  -
  -
  -
  -void
  -XalanSourceTreeHelper::appendSiblingToChild(
  -                     XalanSourceTreeElement*                 theOwnerElement,
  -                     XalanNode*&                                             
theFirstChildSlot,
  -                     XalanSourceTreeCDATASection*    theNewSibling)
  -{
  -     doAppendSiblingToChild(theOwnerElement, theFirstChildSlot, 
theNewSibling);
   }
   
   
  
  
  
  1.2       +0 -14     xml-xalan/c/src/XalanSourceTree/XalanSourceTreeHelper.hpp
  
  Index: XalanSourceTreeHelper.hpp
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/c/src/XalanSourceTree/XalanSourceTreeHelper.hpp,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- XalanSourceTreeHelper.hpp 2000/12/15 23:24:12     1.1
  +++ XalanSourceTreeHelper.hpp 2000/12/17 22:26:59     1.2
  @@ -68,7 +68,6 @@
   
   
   class XalanNode;
  -class XalanSourceTreeCDATASection;
   class XalanSourceTreeComment;
   class XalanSourceTreeDocument;
   class XalanSourceTreeElement;
  @@ -81,7 +80,6 @@
   {
   public:
   
  -     friend class XalanSourceTreeCDATASection;
        friend class XalanSourceTreeComment;
        friend class XalanSourceTreeDocument;
        friend class XalanSourceTreeElement;
  @@ -101,12 +99,6 @@
   
        static void
        appendSibling(
  -                     XalanSourceTreeCDATASection*    theNode,
  -                     XalanNode*&                                             
theNextSiblingSlot,
  -                     XalanNode*                                              
theNewSibling);
  -
  -     static void
  -     appendSibling(
                        XalanSourceTreeComment*         theNode,
                        XalanNode*&                                     
theNextSiblingSlot,
                        XalanNode*                                      
theNewSibling);
  @@ -128,12 +120,6 @@
                        XalanSourceTreeText*    theNode,
                        XalanNode*&                             
theNextSiblingSlot,
                        XalanNode*                              theNewSibling);
  -
  -     static void
  -     appendSiblingToChild(
  -                     XalanSourceTreeElement*                 theOwnerElement,
  -                     XalanNode*&                                             
theChildSlot,
  -                     XalanSourceTreeCDATASection*    theNewSibling);
   
        static void
        appendSiblingToChild(
  
  
  
  1.2       +2 -0      
xml-xalan/c/src/XalanSourceTree/XalanSourceTreeParserLiaison.cpp
  
  Index: XalanSourceTreeParserLiaison.cpp
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/c/src/XalanSourceTree/XalanSourceTreeParserLiaison.cpp,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- XalanSourceTreeParserLiaison.cpp  2000/12/15 23:24:12     1.1
  +++ XalanSourceTreeParserLiaison.cpp  2000/12/17 22:26:59     1.2
  @@ -159,6 +159,8 @@
   
        theReader->setErrorHandler(&m_xercesParserLiaison);
   
  +     theReader->setLexicalHandler(&theContentHandler);
  +
        theReader->parse(inputSource);
   
        XalanSourceTreeDocument* const  theDocument = 
theContentHandler.detachDocument();
  
  
  
  1.2       +8 -20     
xml-xalan/c/src/XalanSourceTree/XalanSourceTreeProcessingInstruction.cpp
  
  Index: XalanSourceTreeProcessingInstruction.cpp
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/c/src/XalanSourceTree/XalanSourceTreeProcessingInstruction.cpp,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- XalanSourceTreeProcessingInstruction.cpp  2000/12/15 23:24:12     1.1
  +++ XalanSourceTreeProcessingInstruction.cpp  2000/12/17 22:27:00     1.2
  @@ -67,7 +67,6 @@
   
   
   #include "XalanSourceTreeComment.hpp"
  -#include "XalanSourceTreeCDATASection.hpp"
   #include "XalanSourceTreeDocument.hpp"
   #include "XalanSourceTreeElement.hpp"
   #include "XalanSourceTreeText.hpp"
  @@ -148,9 +147,14 @@
   XalanNode*
   XalanSourceTreeProcessingInstruction::getParentNode() const
   {
  -     assert(m_ownerDocument != 0);
  -
  -     return m_ownerDocument;
  +     if (m_parentElement != 0)
  +     {
  +             return m_parentElement;
  +     }
  +     else
  +     {
  +             return m_ownerDocument;
  +     }
   }
   
   
  @@ -388,14 +392,6 @@
   
   
   void
  
-XalanSourceTreeProcessingInstruction::setPreviousSibling(XalanSourceTreeCDATASection*
        thePreviousSibling)
  -{
  -     m_previousSibling = thePreviousSibling;
  -}
  -
  -
  -
  -void
   
XalanSourceTreeProcessingInstruction::setPreviousSibling(XalanSourceTreeElement*
     thePreviousSibling)
   {
        m_previousSibling = thePreviousSibling;
  @@ -421,14 +417,6 @@
   
   void
   
XalanSourceTreeProcessingInstruction::appendSiblingNode(XalanSourceTreeComment* 
             theSibling)
  -{
  -     XalanSourceTreeHelper::appendSibling(this, m_nextSibling, theSibling);
  -}
  -
  -
  -
  -void
  
-XalanSourceTreeProcessingInstruction::appendSiblingNode(XalanSourceTreeCDATASection*
 theSibling)
   {
        XalanSourceTreeHelper::appendSibling(this, m_nextSibling, theSibling);
   }
  
  
  
  1.2       +0 -7      
xml-xalan/c/src/XalanSourceTree/XalanSourceTreeProcessingInstruction.hpp
  
  Index: XalanSourceTreeProcessingInstruction.hpp
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/c/src/XalanSourceTree/XalanSourceTreeProcessingInstruction.hpp,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- XalanSourceTreeProcessingInstruction.hpp  2000/12/15 23:24:12     1.1
  +++ XalanSourceTreeProcessingInstruction.hpp  2000/12/17 22:27:00     1.2
  @@ -72,7 +72,6 @@
   
   
   class XalanSourceTreeComment;
  -class XalanSourceTreeCDATASection;
   class XalanSourceTreeDocument;
   class XalanSourceTreeElement;
   class XalanSourceTreeText;
  @@ -511,9 +510,6 @@
        setPreviousSibling(XalanSourceTreeComment*      thePreviousSibling);
   
        void
  -     setPreviousSibling(XalanSourceTreeCDATASection*         
thePreviousSibling);
  -
  -     void
        setPreviousSibling(XalanSourceTreeElement*      thePreviousSibling);
   
        void
  @@ -524,9 +520,6 @@
   
        void
        appendSiblingNode(XalanSourceTreeComment*       theSibling);
  -
  -     void
  -     appendSiblingNode(XalanSourceTreeCDATASection*  theSibling);
   
        void
        appendSiblingNode(XalanSourceTreeElement*       theSibling);
  
  
  
  1.2       +0 -17     xml-xalan/c/src/XalanSourceTree/XalanSourceTreeText.cpp
  
  Index: XalanSourceTreeText.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XalanSourceTree/XalanSourceTreeText.cpp,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- XalanSourceTreeText.cpp   2000/12/15 23:24:12     1.1
  +++ XalanSourceTreeText.cpp   2000/12/17 22:27:00     1.2
  @@ -67,7 +67,6 @@
   
   
   #include "XalanSourceTreeComment.hpp"
  -#include "XalanSourceTreeCDATASection.hpp"
   #include "XalanSourceTreeElement.hpp"
   #include "XalanSourceTreeProcessingInstruction.hpp"
   #include "XalanSourceTreeHelper.hpp"
  @@ -437,14 +436,6 @@
   
   
   void
  -XalanSourceTreeText::setPreviousSibling(XalanSourceTreeCDATASection* 
thePreviousSibling)
  -{
  -     m_previousSibling = thePreviousSibling;
  -}
  -
  -
  -
  -void
   XalanSourceTreeText::setPreviousSibling(XalanSourceTreeElement*              
thePreviousSibling)
   {
        m_previousSibling = thePreviousSibling;
  @@ -470,14 +461,6 @@
   
   void
   XalanSourceTreeText::appendSiblingNode(XalanSourceTreeComment*       
theSibling)
  -{
  -     XalanSourceTreeHelper::appendSibling(this, m_nextSibling, theSibling);
  -}
  -
  -
  -
  -void
  -XalanSourceTreeText::appendSiblingNode(XalanSourceTreeCDATASection*          
theSibling)
   {
        XalanSourceTreeHelper::appendSibling(this, m_nextSibling, theSibling);
   }
  
  
  
  1.2       +0 -7      xml-xalan/c/src/XalanSourceTree/XalanSourceTreeText.hpp
  
  Index: XalanSourceTreeText.hpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XalanSourceTree/XalanSourceTreeText.hpp,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- XalanSourceTreeText.hpp   2000/12/15 23:24:12     1.1
  +++ XalanSourceTreeText.hpp   2000/12/17 22:27:00     1.2
  @@ -72,7 +72,6 @@
   
   
   class XalanSourceTreeComment;
  -class XalanSourceTreeCDATASection;
   class XalanSourceTreeElement;
   class XalanSourceTreeProcessingInstruction;
   
  @@ -636,9 +635,6 @@
        setPreviousSibling(XalanSourceTreeComment*      thePreviousSibling);
   
        void
  -     setPreviousSibling(XalanSourceTreeCDATASection*         
thePreviousSibling);
  -
  -     void
        setPreviousSibling(XalanSourceTreeElement*      thePreviousSibling);
   
        void
  @@ -649,9 +645,6 @@
   
        void
        appendSiblingNode(XalanSourceTreeComment*       theSibling);
  -
  -     void
  -     appendSiblingNode(XalanSourceTreeCDATASection*  theSibling);
   
        void
        appendSiblingNode(XalanSourceTreeElement*       theSibling);
  
  
  

Reply via email to