dbertoni    02/04/01 21:38:25

  Modified:    c/src/XSLT ElemUse.cpp ElemUse.hpp
  Log:
  Added call to allow for default execution without applying attribute sets.
  
  Revision  Changes    Path
  1.17      +12 -2     xml-xalan/c/src/XSLT/ElemUse.cpp
  
  Index: ElemUse.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XSLT/ElemUse.cpp,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- ElemUse.cpp       23 Feb 2002 04:23:16 -0000      1.16
  +++ ElemUse.cpp       2 Apr 2002 05:38:25 -0000       1.17
  @@ -128,11 +128,21 @@
   
   
   void
  -ElemUse::execute(StylesheetExecutionContext&         executionContext) const
  +ElemUse::execute(StylesheetExecutionContext& executionContext) const
  +{
  +     doExecute(executionContext, true);
  +}
  +
  +
  +
  +void
  +ElemUse::doExecute(
  +                     StylesheetExecutionContext&             
executionContext,
  +                     bool                                                    
applyAttributeSets) const
   {
        ElemTemplateElement::execute(executionContext);
   
  -     if(0 != m_attributeSetsNames.size())
  +     if(applyAttributeSets == true && 0 != m_attributeSetsNames.size())
        {
                assert(canGenerateAttributes() == true);
   
  
  
  
  1.16      +20 -6     xml-xalan/c/src/XSLT/ElemUse.hpp
  
  Index: ElemUse.hpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XSLT/ElemUse.hpp,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- ElemUse.hpp       8 Nov 2001 01:08:48 -0000       1.15
  +++ ElemUse.hpp       2 Apr 2002 05:38:25 -0000       1.16
  @@ -81,6 +81,12 @@
   {
   public:
   
  +#if defined(XALAN_NO_NAMESPACES)
  +     typedef vector<XalanQNameByValue>               QNameVectorType;
  +#else
  +     typedef std::vector<XalanQNameByValue>  QNameVectorType;
  +#endif
  +
        /**
         * Construct an object corresponding to an "use-attribute-sets" 
attribute.
         * This is a base class for "xsl:element," "xsl:copy" and
  @@ -131,13 +137,21 @@
        virtual void
        execute(StylesheetExecutionContext&             executionContext) const;
   
  -private:
  +protected:
   
  -#if defined(XALAN_NO_NAMESPACES)
  -     typedef vector<XalanQNameByValue>               QNameVectorType;
  -#else
  -     typedef std::vector<XalanQNameByValue>  QNameVectorType;
  -#endif
  +     /** 
  +      * Execute and conditionally apply any attribute sets.  To be used
  +      * by deriving classes who want ElemUse to do any default execution
  +      * but skip applying attribute sets.  Typically, this would be done
  +      * when attempting to recover from an error.
  +      *
  +      * @param executionContext The current execution context.
  +      * @param applyAttributeSets If true, attribute sets will be applied.
  +      */
  +     virtual void
  +     doExecute(
  +                     StylesheetExecutionContext&             
executionContext,
  +                     bool                                                    
applyAttributeSets) const;
   
   private:
   
  
  
  

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

Reply via email to