dbertoni    2002/12/20 16:21:26

  Modified:    c/src/XSLT ElemForEach.cpp ElemTemplateElement.cpp
                        ElemTemplateElement.hpp ProblemListener.hpp
                        StylesheetConstructionContextDefault.cpp
                        StylesheetHandler.cpp XSLTEngineImpl.cpp
  Log:
  Use new XalanLocator functions.
  
  Revision  Changes    Path
  1.31      +2 -2      xml-xalan/c/src/XSLT/ElemForEach.cpp
  
  Index: ElemForEach.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XSLT/ElemForEach.cpp,v
  retrieving revision 1.30
  retrieving revision 1.31
  diff -u -r1.30 -r1.31
  --- ElemForEach.cpp   25 Nov 2002 18:11:52 -0000      1.30
  +++ ElemForEach.cpp   21 Dec 2002 00:21:25 -0000      1.31
  @@ -174,8 +174,8 @@
                        const AttributeListType&                atts,
                        const LocatorType*                              locator)
   {
  -     const int       lineNumber = locator != 0 ? locator->getLineNumber() : 
-1;
  -     const int       columnNumber = locator != 0 ? 
locator->getColumnNumber() : -1;
  +     const int       lineNumber = XalanLocator::getLineNumber(locator);
  +     const int       columnNumber = XalanLocator::getColumnNumber(locator);
   
        m_sortElems.reserve(m_sortElems.size() + 1);
   
  
  
  
  1.89      +0 -108    xml-xalan/c/src/XSLT/ElemTemplateElement.cpp
  
  Index: ElemTemplateElement.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XSLT/ElemTemplateElement.cpp,v
  retrieving revision 1.88
  retrieving revision 1.89
  diff -u -r1.88 -r1.89
  --- ElemTemplateElement.cpp   25 Nov 2002 18:11:52 -0000      1.88
  +++ ElemTemplateElement.cpp   21 Dec 2002 00:21:25 -0000      1.89
  @@ -604,114 +604,6 @@
   
   
   
  -ElemTemplateElement*
  -ElemTemplateElement::insertBeforeElem(
  -                     ElemTemplateElement*    newChild,
  -                     ElemTemplateElement*    refChild)
  -{
  -     assert(newChild != 0);
  -
  -     if (refChild != 0 && refChild->getParentNode() != this)
  -     {
  -             throw XalanDOMException(XalanDOMException::NOT_FOUND_ERR);
  -     }
  -     else if (newChild->getOwnerDocument() != getOwnerDocument())
  -     {
  -             throw XalanDOMException(XalanDOMException::WRONG_DOCUMENT_ERR);
  -     }
  -
  -     if (refChild == 0)
  -     {
  -             appendChildElem(newChild);
  -     }
  -     else
  -     {
  -             ElemTemplateElement* const      previousChild =
  -                     refChild->getPreviousSiblingElem();
  -
  -             if (previousChild != 0)
  -             {
  -                     previousChild->setNextSiblingElem(newChild);
  -             }
  -             else
  -             {
  -                     assert(m_firstChild == refChild);
  -
  -                     // The old child was the first child,
  -                     // so update m_firstChild...
  -                     m_firstChild = newChild;
  -             }
  -
  -             newChild->setPreviousSiblingElem(previousChild);
  -             newChild->setNextSiblingElem(refChild);
  -
  -             refChild->setPreviousSiblingElem(newChild);
  -
  -             if (refChild == m_firstChild)
  -             {
  -                     m_firstChild = newChild;
  -             }
  -     }
  -
  -     return newChild;
  -}
  -
  -
  -
  -ElemTemplateElement*
  -ElemTemplateElement::replaceChildElem(
  -                     ElemTemplateElement*    newChild,
  -                     ElemTemplateElement*    oldChild)
  -{
  -     assert(newChild != 0);
  -     assert(oldChild != 0);
  -
  -     if (oldChild->getParentNode() != this)
  -     {
  -             throw XalanDOMException(XalanDOMException::NOT_FOUND_ERR);
  -     }
  -     else if (newChild->getOwnerDocument() != getOwnerDocument())
  -     {
  -             throw XalanDOMException(XalanDOMException::WRONG_DOCUMENT_ERR);
  -     }
  -
  -     ElemTemplateElement* const      previousChild =
  -                     oldChild->getPreviousSiblingElem();
  -
  -     if (previousChild != 0)
  -     {
  -             previousChild->setNextSiblingElem(newChild);
  -     }
  -     else
  -     {
  -             assert(m_firstChild == oldChild);
  -
  -             // The old child was the first child,
  -             // so update m_firstChild...
  -             m_firstChild = newChild;
  -     }
  -
  -     newChild->setPreviousSiblingElem(previousChild);
  -
  -     ElemTemplateElement* const      nextChild =
  -                     oldChild->getNextSiblingElem();
  -
  -     newChild->setNextSiblingElem(nextChild);
  -
  -     if (nextChild != 0)
  -     {
  -             nextChild->setPreviousSiblingElem(newChild);
  -     }
  -
  -     oldChild->setParentNodeElem(0);
  -     oldChild->setPreviousSiblingElem(0);
  -     oldChild->setNextSiblingElem(0);
  -
  -     return oldChild;
  -}
  -
  -
  -
   bool
   ElemTemplateElement::transformChild(
                        StylesheetExecutionContext&             
executionContext,
  
  
  
  1.56      +2 -31     xml-xalan/c/src/XSLT/ElemTemplateElement.hpp
  
  Index: ElemTemplateElement.hpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XSLT/ElemTemplateElement.hpp,v
  retrieving revision 1.55
  retrieving revision 1.56
  diff -u -r1.55 -r1.56
  --- ElemTemplateElement.hpp   12 Dec 2002 00:37:08 -0000      1.55
  +++ ElemTemplateElement.hpp   21 Dec 2002 00:21:25 -0000      1.56
  @@ -143,8 +143,8 @@
        ElemTemplateElement(
                        Stylesheet&                                     
stylesheetTree,
                        int                                                     
xslToken,
  -                     int                                                     
lineNumber = -1,
  -                     int                                                     
columnNumber = -1);
  +                     int                                                     
lineNumber = XalanLocator::getUnknownValue(),
  +                     int                                                     
columnNumber = XalanLocator::getUnknownValue());
   
        virtual
        ~ElemTemplateElement();
  @@ -296,7 +296,6 @@
   
        /** 
         * Get the line number in the stylesheet where the element appears.
  -      * Returns -1 if the information is not available.
         *
         * @return the line number in the stylesheet
         */
  @@ -308,7 +307,6 @@
   
        /** 
         * Get the column number in the stylesheet where the element appears.
  -      * Returns -1 if the information is not available.
         *
         * @return the column number in the stylesheet
         */
  @@ -523,33 +521,6 @@
        virtual ElemTemplateElement*
        appendChildElem(ElemTemplateElement*    newChild);
   
  -     // Type-safe getters...
  -
  -     /**
  -      * Append a child.
  -      *
  -      * @param newChild the new child to insert
  -      * @param refChild the node before which to insert the new node
  -      *
  -      * @return newChild
  -      */
  -     virtual ElemTemplateElement*
  -     insertBeforeElem(
  -                     ElemTemplateElement*    newChild,
  -                     ElemTemplateElement*    refChild);
  -
  -     /**
  -      * Replace a child.
  -      *
  -      * @param newChild the new child to insert
  -      * @param oldChild the child to be replaced
  -      *
  -      * @return oldChild
  -      */
  -     virtual ElemTemplateElement*
  -     replaceChildElem(
  -                     ElemTemplateElement*    newChild,
  -                     ElemTemplateElement*    oldChild);
   
        // These interfaces are inherited from XalanElement ...
   
  
  
  
  1.8       +3 -5      xml-xalan/c/src/XSLT/ProblemListener.hpp
  
  Index: ProblemListener.hpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XSLT/ProblemListener.hpp,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- ProblemListener.hpp       25 Nov 2002 18:11:52 -0000      1.7
  +++ ProblemListener.hpp       21 Dec 2002 00:21:25 -0000      1.8
  @@ -125,10 +125,8 @@
         *                         (may be 0)
         * @param   msg            string message explaining the problem.
         * @param   uri            the URI of the document where the problem 
occurred.  May be 0.
  -      * @param   lineNo         line number where the problem occurred,  
  -      *                         if it is known, else -1
  -      * @param   charOffset     character offset where the problem,  
  -      *                         occurred if it is known, else -1
  +      * @param   lineNo         line number where the problem occurred.
  +      * @param   charOffset     character offset where the problem.
         */
        virtual void
        problem(
  
  
  
  1.32      +8 -24     
xml-xalan/c/src/XSLT/StylesheetConstructionContextDefault.cpp
  
  Index: StylesheetConstructionContextDefault.cpp
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/c/src/XSLT/StylesheetConstructionContextDefault.cpp,v
  retrieving revision 1.31
  retrieving revision 1.32
  diff -u -r1.31 -r1.32
  --- StylesheetConstructionContextDefault.cpp  25 Nov 2002 18:11:53 -0000      
1.31
  +++ StylesheetConstructionContextDefault.cpp  21 Dec 2002 00:21:25 -0000      
1.32
  @@ -681,22 +681,6 @@
   
   
   
  -inline XMLSSize_t
  -getLineNumber(const LocatorType*     theLocator)
  -{
  -     return theLocator == 0 ? -1 : theLocator->getLineNumber();
  -}
  -
  -
  -
  -inline XMLSSize_t
  -getColumnNumber(const LocatorType*   theLocator)
  -{
  -     return theLocator == 0 ? -1 : theLocator->getColumnNumber();
  -}
  -
  -
  -
   ElemTemplateElement*
   StylesheetConstructionContextDefault::createElement(
                        int                                                     
token,
  @@ -704,8 +688,8 @@
                        const AttributeListType&        atts,
                        const LocatorType*                      locator)
   {
  -     const XMLSSize_t        lineNumber = getLineNumber(locator);
  -     const XMLSSize_t        columnNumber = getColumnNumber(locator);
  +     const XalanLocator::size_type   lineNumber = 
XalanLocator::getLineNumber(locator);
  +     const XalanLocator::size_type   columnNumber = 
XalanLocator::getColumnNumber(locator);
   
        ElemTemplateElement*    theElement = 0;
   
  @@ -992,8 +976,8 @@
                        const AttributeListType&        atts,
                        const LocatorType*                      locator)
   {
  -     const XMLSSize_t        lineNumber = getLineNumber(locator);
  -     const XMLSSize_t        columnNumber = getColumnNumber(locator);
  +     const XalanLocator::size_type   lineNumber = 
XalanLocator::getLineNumber(locator);
  +     const XalanLocator::size_type   columnNumber = 
XalanLocator::getColumnNumber(locator);
   
        return m_elemLiteralResultAllocator.create(
                        *this,
  @@ -1014,8 +998,8 @@
                        ExtensionNSHandler&                     handler,
                        const LocatorType*                      locator)
   {
  -     const XMLSSize_t        lineNumber = getLineNumber(locator);
  -     const XMLSSize_t        columnNumber = getColumnNumber(locator);
  +     const XalanLocator::size_type   lineNumber = 
XalanLocator::getLineNumber(locator);
  +     const XalanLocator::size_type   columnNumber = 
XalanLocator::getColumnNumber(locator);
   
        m_allocatedElements.push_back(0);
   
  @@ -1042,8 +1026,8 @@
               bool                                             
disableOutputEscaping,
                        const LocatorType*                      locator)
   {
  -     const XMLSSize_t        lineNumber = getLineNumber(locator);
  -     const XMLSSize_t        columnNumber = getColumnNumber(locator);
  +     const XalanLocator::size_type   lineNumber = 
XalanLocator::getLineNumber(locator);
  +     const XalanLocator::size_type   columnNumber = 
XalanLocator::getColumnNumber(locator);
   
        return m_elemTextLiteralAllocator.create(
                        *this,
  
  
  
  1.101     +2 -18     xml-xalan/c/src/XSLT/StylesheetHandler.cpp
  
  Index: StylesheetHandler.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XSLT/StylesheetHandler.cpp,v
  retrieving revision 1.100
  retrieving revision 1.101
  diff -u -r1.100 -r1.101
  --- StylesheetHandler.cpp     19 Dec 2002 17:34:11 -0000      1.100
  +++ StylesheetHandler.cpp     21 Dec 2002 00:21:25 -0000      1.101
  @@ -222,22 +222,6 @@
   
   
   
  -inline int
  -getLineNumber(const LocatorType*     theLocator)
  -{
  -     return theLocator == 0 ? -1 : theLocator->getLineNumber();
  -}
  -
  -
  -
  -inline int
  -getColumnNumber(const LocatorType*   theLocator)
  -{
  -     return theLocator == 0 ? -1 : theLocator->getColumnNumber();
  -}
  -
  -
  -
   bool
   StylesheetHandler::processSpaceAttr(
                        const AttributeListType&        atts,
  @@ -497,8 +481,8 @@
                                                        m_constructionContext,
                                                        m_stylesheet,
                                                        atts,
  -                                                     getLineNumber(locator),
  -                                                     
getColumnNumber(locator)));
  +                                                     
XalanLocator::getLineNumber(locator),
  +                                                     
XalanLocator::getColumnNumber(locator)));
                                        break;
   
                                case 
StylesheetConstructionContext::ELEMNAME_TEMPLATE:
  
  
  
  1.166     +2 -2      xml-xalan/c/src/XSLT/XSLTEngineImpl.cpp
  
  Index: XSLTEngineImpl.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XSLT/XSLTEngineImpl.cpp,v
  retrieving revision 1.165
  retrieving revision 1.166
  diff -u -r1.165 -r1.166
  --- XSLTEngineImpl.cpp        11 Dec 2002 22:49:32 -0000      1.165
  +++ XSLTEngineImpl.cpp        21 Dec 2002 00:21:25 -0000      1.166
  @@ -1083,8 +1083,8 @@
   
        XalanDOMString                  uri;
   
  -     int                                             lineNumber = -1;
  -     int                                     columnNumber = -1;
  +     int                                             lineNumber = 
XalanLocator::getUnknownValue();
  +     int                                     columnNumber = 
XalanLocator::getUnknownValue();
   
        const LocatorType*              locator = getLocatorFromStack();
   
  
  
  

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

Reply via email to