dbertoni    2002/09/27 16:32:23

  Modified:    c/src/XSLT ElemEmpty.cpp ElemEmpty.hpp
                        ElemTemplateElement.cpp ElemTemplateElement.hpp
                        StylesheetHandler.cpp
  Log:
  New code for ElemEmpty and ElemTemplateElement that skips namespace 
processing.
  
  Revision  Changes    Path
  1.11      +14 -1     xml-xalan/c/src/XSLT/ElemEmpty.cpp
  
  Index: ElemEmpty.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XSLT/ElemEmpty.cpp,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- ElemEmpty.cpp     24 Sep 2002 01:42:34 -0000      1.10
  +++ ElemEmpty.cpp     27 Sep 2002 23:32:23 -0000      1.11
  @@ -2,7 +2,7 @@
    * The Apache Software License, Version 1.1
    *
    *
  - * Copyright (c) 1999 The Apache Software Foundation.  All rights 
  + * Copyright (c) 1999-2002 The Apache Software Foundation.  All rights 
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -75,6 +75,19 @@
                                                stylesheetTree,
                                                lineNumber,
                                                columnNumber,
  +                                             
StylesheetConstructionContext::ELEMNAME_UNDEFINED),
  +     m_elementName(elementName)
  +{
  +}
  +
  +
  +
  +ElemEmpty::ElemEmpty(
  +                     StylesheetConstructionContext&  constructionContext,
  +                     Stylesheet&                                             
stylesheetTree,
  +                     const XalanDOMString*                   elementName) :
  +     ElemTemplateElement(constructionContext,
  +                                             stylesheetTree,
                                                
StylesheetConstructionContext::ELEMNAME_UNDEFINED),
        m_elementName(elementName)
   {
  
  
  
  1.11      +15 -2     xml-xalan/c/src/XSLT/ElemEmpty.hpp
  
  Index: ElemEmpty.hpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XSLT/ElemEmpty.hpp,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- ElemEmpty.hpp     8 May 2002 20:55:26 -0000       1.10
  +++ ElemEmpty.hpp     27 Sep 2002 23:32:23 -0000      1.11
  @@ -2,7 +2,7 @@
    * The Apache Software License, Version 1.1
    *
    *
  - * Copyright (c) 1999 The Apache Software Foundation.  All rights 
  + * Copyright (c) 1999-2002 The Apache Software Foundation.  All rights 
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -81,7 +81,6 @@
         * 
         * @param constructionContext context for construction of object
         * @param stylesheetTree      stylesheet containing element
  -      * @param atts                list of attributes for element
         * @param lineNumber                            line number in document
         * @param columnNumber                  column number in document
         * @param elementName The element name for which this instance is 
representing
  @@ -91,6 +90,20 @@
                        Stylesheet&                                             
stylesheetTree,
                        int                                                     
        lineNumber,
                        int                                                     
        columnNumber,
  +                     const XalanDOMString*                   elementName = 
0);
  +
  +     /**
  +      * Construct an object corresponding to an empty element.  This
  +      * constructor is used for surrogate empty elements that do not
  +      * need namespace contexts and Locator information, etc.
  +      *
  +      * @param constructionContext context for construction of object
  +      * @param stylesheetTree      stylesheet containing element
  +      * @param elementName The element name for which this instance is 
representing
  +      */
  +     ElemEmpty(
  +                     StylesheetConstructionContext&  constructionContext,
  +                     Stylesheet&                                             
stylesheetTree,
                        const XalanDOMString*                   elementName = 
0);
   
        virtual
  
  
  
  1.81      +26 -0     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.80
  retrieving revision 1.81
  diff -u -r1.80 -r1.81
  --- ElemTemplateElement.cpp   26 Sep 2002 01:38:15 -0000      1.80
  +++ ElemTemplateElement.cpp   27 Sep 2002 23:32:23 -0000      1.81
  @@ -147,6 +147,32 @@
   
   
   
  +ElemTemplateElement::ElemTemplateElement(
  +                     StylesheetConstructionContext&  /* constructionContext 
*/,
  +                     Stylesheet&                                             
stylesheetTree,
  +                     int                                                     
        xslToken) :
  +     XalanElement(),
  +     PrefixResolver(),
  +     m_finishedConstruction(false),
  +     m_namespacesHandler(),
  +     m_stylesheet(stylesheetTree),
  +     m_lineNumber(-1),
  +     m_columnNumber(-1),
  +     m_defaultSpace(true),
  +     m_xslToken(xslToken),
  +     m_parentNode(0),
  +     m_nextSibling(0),
  +     m_previousSibling(0),
  +     m_firstChild(0),
  +     m_surrogateChildren(*this),
  +     m_baseIndentifier(s_emptyString),
  +     m_optimizationFlags(eCanGenerateAttributes),
  +     m_locatorProxy(*this)
  +{
  +}
  +
  +
  +
   ElemTemplateElement::~ElemTemplateElement()
   {
        delete m_nextSibling;
  
  
  
  1.48      +13 -0     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.47
  retrieving revision 1.48
  diff -u -r1.47 -r1.48
  --- ElemTemplateElement.hpp   24 Sep 2002 05:59:38 -0000      1.47
  +++ ElemTemplateElement.hpp   27 Sep 2002 23:32:23 -0000      1.48
  @@ -117,6 +117,19 @@
                        int                                                     
columnNumber,
                        int                                                     
xslToken);
   
  +     /**
  +      * Special constructor used by dummy elements which do not exist in the
  +      * final stylesheet.
  +      * 
  +      * @param constructionContext  context when object constructed
  +      * @param stylesheetTree           owning stylesheet
  +      * @param xslToken                         an integer representing the 
type of instance.
  +      */
  +     ElemTemplateElement(
  +                     StylesheetConstructionContext&  constructionContext,
  +                     Stylesheet&                                     
stylesheetTree,
  +                     int                                                     
xslToken);
  +
        virtual
        ~ElemTemplateElement();
   
  
  
  
  1.91      +6 -6      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.90
  retrieving revision 1.91
  diff -u -r1.90 -r1.91
  --- StylesheetHandler.cpp     26 Sep 2002 01:38:15 -0000      1.90
  +++ StylesheetHandler.cpp     27 Sep 2002 23:32:23 -0000      1.91
  @@ -476,9 +476,11 @@
   
                                                
m_elemStackParentedElements.insert(foreach);
   
  -                                             m_elemStack.push_back(new 
ElemEmpty(m_constructionContext,
  -                                                                      
m_stylesheet,
  -                                                                      
lineNumber, columnNumber, &Constants::ELEMNAME_SORT_WITH_PREFIX_STRING));
  +                                             m_elemStack.push_back(
  +                                                     new ElemEmpty(
  +                                                                     
m_constructionContext,
  +                                                                     
m_stylesheet,
  +                                                                     
&Constants::ELEMNAME_SORT_WITH_PREFIX_STRING));
                                        }
                                        break;
   
  @@ -800,9 +802,7 @@
                // object.
                if(origStackSize == m_elemStack.size())
                {
  -                     m_elemStack.push_back(new 
ElemEmpty(m_constructionContext,
  -                                                                      
m_stylesheet,
  -                                                                      
lineNumber, columnNumber));
  +                     m_elemStack.push_back(new 
ElemEmpty(m_constructionContext, m_stylesheet));
   
                        if (elem != 0)
                        {
  
  
  

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

Reply via email to