dbertoni    2002/09/05 18:39:20

  Modified:    c/src/XSLT Constants.cpp Constants.hpp
                        ElemApplyTemplates.cpp ElemFallback.cpp ElemIf.cpp
                        ElemLiteralResult.cpp ElemLiteralResult.hpp
                        ElemNumber.cpp ElemNumber.hpp ElemTemplate.cpp
                        ElemTemplateElement.cpp ElemTemplateElement.hpp
                        ElemValueOf.cpp ElemVariable.cpp ElemWhen.cpp
                        StylesheetConstructionContext.hpp
                        StylesheetConstructionContextDefault.cpp
                        StylesheetConstructionContextDefault.hpp
                        XSLTEngineImpl.cpp XSLTEngineImpl.hpp
  Log:
  Reduce start-up dynamic memory utilization.
  
  Revision  Changes    Path
  1.22      +0 -28     xml-xalan/c/src/XSLT/Constants.cpp
  
  Index: Constants.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XSLT/Constants.cpp,v
  retrieving revision 1.21
  retrieving revision 1.22
  diff -u -r1.21 -r1.22
  --- Constants.cpp     5 Sep 2002 22:01:15 -0000       1.21
  +++ Constants.cpp     6 Sep 2002 01:39:17 -0000       1.22
  @@ -105,7 +105,6 @@
   static XalanDOMString                ATTRNAME_INFINITY;
   static XalanDOMString                ATTRNAME_LANG;
   static XalanDOMString                ATTRNAME_LETTERVALUE;
  -static XalanDOMString                ATTRNAME_LEVEL;
   static XalanDOMString                ATTRNAME_MATCH;
   static XalanDOMString                ATTRNAME_METHOD;
   static XalanDOMString                ATTRNAME_MINUSSIGN;
  @@ -156,8 +155,6 @@
   
   static XalanDOMString                ATTRTYPE_CDATA;
   
  -static XalanDOMString                ATTRVAL_ALPHABETIC;
  -static XalanDOMString                ATTRVAL_ANY;
   static XalanDOMString                ATTRVAL_CASEORDER_LOWER;
   static XalanDOMString                ATTRVAL_CASEORDER_UPPER;
   static XalanDOMString                ATTRVAL_DATATYPE_NUMBER;
  @@ -166,21 +163,17 @@
   static XalanDOMString                ATTRVAL_DEFAULT_PREFIX;
   static XalanDOMString                ATTRVAL_DEFAULT_TEXT_RULE;
   static XalanDOMString                ATTRVAL_INFINITY;
  -static XalanDOMString                ATTRVAL_MULTI;
   static XalanDOMString                ATTRVAL_NAN;
   static XalanDOMString                ATTRVAL_NO;
   static XalanDOMString                ATTRVAL_ORDER_ASCENDING;
   static XalanDOMString                ATTRVAL_ORDER_DESCENDING;
  -static XalanDOMString                ATTRVAL_OTHER;
   static XalanDOMString                ATTRVAL_OUTPUT_METHOD_HTML;
   static XalanDOMString                ATTRVAL_OUTPUT_METHOD_TEXT;
   static XalanDOMString                ATTRVAL_OUTPUT_METHOD_XML;
   static XalanDOMString                ATTRVAL_PRESERVE;
   static XalanDOMString                ATTRVAL_SIMPLE;
  -static XalanDOMString                ATTRVAL_SINGLE;
   static XalanDOMString                ATTRVAL_STRIP;
   static XalanDOMString                ATTRVAL_THIS;
  -static XalanDOMString                ATTRVAL_TRADITIONAL;
   static XalanDOMString                ATTRVAL_YES;
   
   static XalanDOMString                DEFAULT_WHITESPACE_SEPARATOR_STRING;
  @@ -306,7 +299,6 @@
   const XalanDOMString&                Constants::ATTRNAME_INFINITY = 
::ATTRNAME_INFINITY;
   const XalanDOMString&                Constants::ATTRNAME_LANG = 
::ATTRNAME_LANG;
   const XalanDOMString&                Constants::ATTRNAME_LETTERVALUE = 
::ATTRNAME_LETTERVALUE;
  -const XalanDOMString&                Constants::ATTRNAME_LEVEL = 
::ATTRNAME_LEVEL;
   const XalanDOMString&                Constants::ATTRNAME_MATCH = 
::ATTRNAME_MATCH;
   const XalanDOMString&                Constants::ATTRNAME_METHOD = 
::ATTRNAME_METHOD;
   const XalanDOMString&                Constants::ATTRNAME_MINUSSIGN = 
::ATTRNAME_MINUSSIGN;
  @@ -357,8 +349,6 @@
   
   const XalanDOMString&                Constants::ATTRTYPE_CDATA = 
::ATTRTYPE_CDATA;
   
  -const XalanDOMString&                Constants::ATTRVAL_ALPHABETIC = 
::ATTRVAL_ALPHABETIC;
  -const XalanDOMString&                Constants::ATTRVAL_ANY = ::ATTRVAL_ANY;
   const XalanDOMString&                Constants::ATTRVAL_CASEORDER_LOWER = 
::ATTRVAL_CASEORDER_LOWER;
   const XalanDOMString&                Constants::ATTRVAL_CASEORDER_UPPER = 
::ATTRVAL_CASEORDER_UPPER;
   const XalanDOMString&                Constants::ATTRVAL_DATATYPE_NUMBER = 
::ATTRVAL_DATATYPE_NUMBER;
  @@ -367,21 +357,17 @@
   const XalanDOMString&                Constants::ATTRVAL_DEFAULT_PREFIX = 
::ATTRVAL_DEFAULT_PREFIX;
   const XalanDOMString&                Constants::ATTRVAL_DEFAULT_TEXT_RULE = 
::ATTRVAL_DEFAULT_TEXT_RULE;
   const XalanDOMString&                Constants::ATTRVAL_INFINITY = 
::ATTRVAL_INFINITY;
  -const XalanDOMString&                Constants::ATTRVAL_MULTI = 
::ATTRVAL_MULTI;
   const XalanDOMString&                Constants::ATTRVAL_NAN = ::ATTRVAL_NAN;
   const XalanDOMString&                Constants::ATTRVAL_NO = ::ATTRVAL_NO;
   const XalanDOMString&                Constants::ATTRVAL_ORDER_ASCENDING = 
::ATTRVAL_ORDER_ASCENDING;
   const XalanDOMString&                Constants::ATTRVAL_ORDER_DESCENDING = 
::ATTRVAL_ORDER_DESCENDING;
  -const XalanDOMString&                Constants::ATTRVAL_OTHER = 
::ATTRVAL_OTHER;
   const XalanDOMString&                Constants::ATTRVAL_OUTPUT_METHOD_HTML = 
::ATTRVAL_OUTPUT_METHOD_HTML;
   const XalanDOMString&                Constants::ATTRVAL_OUTPUT_METHOD_TEXT = 
::ATTRVAL_OUTPUT_METHOD_TEXT;
   const XalanDOMString&                Constants::ATTRVAL_OUTPUT_METHOD_XML = 
::ATTRVAL_OUTPUT_METHOD_XML;
   const XalanDOMString&                Constants::ATTRVAL_PRESERVE = 
::ATTRVAL_PRESERVE;
   const XalanDOMString&                Constants::ATTRVAL_SIMPLE = 
::ATTRVAL_SIMPLE;
  -const XalanDOMString&                Constants::ATTRVAL_SINGLE = 
::ATTRVAL_SINGLE;
   const XalanDOMString&                Constants::ATTRVAL_STRIP = 
::ATTRVAL_STRIP;
   const XalanDOMString&                Constants::ATTRVAL_THIS = 
::ATTRVAL_THIS;
  -const XalanDOMString&                Constants::ATTRVAL_TRADITIONAL = 
::ATTRVAL_TRADITIONAL;
   const XalanDOMString&                Constants::ATTRVAL_YES = ::ATTRVAL_YES;
   
   const XalanDOMString&                
Constants::DEFAULT_WHITESPACE_SEPARATOR_STRING = 
::DEFAULT_WHITESPACE_SEPARATOR_STRING;
  @@ -508,7 +494,6 @@
        ::ATTRNAME_INFINITY = XALAN_STATIC_UCODE_STRING("infinity");
        ::ATTRNAME_LANG = XALAN_STATIC_UCODE_STRING("lang");
        ::ATTRNAME_LETTERVALUE = XALAN_STATIC_UCODE_STRING("letter-value");
  -     ::ATTRNAME_LEVEL = XALAN_STATIC_UCODE_STRING("level");
        ::ATTRNAME_MATCH = XALAN_STATIC_UCODE_STRING("match");
        ::ATTRNAME_METHOD = XALAN_STATIC_UCODE_STRING("calls");
        ::ATTRNAME_MINUSSIGN = XALAN_STATIC_UCODE_STRING("minus-sign");
  @@ -559,8 +544,6 @@
   
        ::ATTRTYPE_CDATA = XALAN_STATIC_UCODE_STRING("CDATA");
   
  -     ::ATTRVAL_ALPHABETIC = XALAN_STATIC_UCODE_STRING("alphabetic");
  -     ::ATTRVAL_ANY = XALAN_STATIC_UCODE_STRING("any");
        ::ATTRVAL_CASEORDER_LOWER = XALAN_STATIC_UCODE_STRING("lower-first");
        ::ATTRVAL_CASEORDER_UPPER = XALAN_STATIC_UCODE_STRING("upper-first");
        ::ATTRVAL_DATATYPE_NUMBER = XALAN_STATIC_UCODE_STRING("number");
  @@ -569,21 +552,17 @@
        ::ATTRVAL_DEFAULT_PREFIX = XALAN_STATIC_UCODE_STRING("#default");
        ::ATTRVAL_DEFAULT_TEXT_RULE = XALAN_STATIC_UCODE_STRING("text() | @*");
        ::ATTRVAL_INFINITY = XALAN_STATIC_UCODE_STRING("Infinity");
  -     ::ATTRVAL_MULTI = XALAN_STATIC_UCODE_STRING("multiple");
        ::ATTRVAL_NAN = XALAN_STATIC_UCODE_STRING("NaN");
        ::ATTRVAL_NO = XALAN_STATIC_UCODE_STRING("no");
        ::ATTRVAL_ORDER_ASCENDING = XALAN_STATIC_UCODE_STRING("ascending");
        ::ATTRVAL_ORDER_DESCENDING = XALAN_STATIC_UCODE_STRING("descending");
  -     ::ATTRVAL_OTHER = XALAN_STATIC_UCODE_STRING("other");
        ::ATTRVAL_OUTPUT_METHOD_HTML = XALAN_STATIC_UCODE_STRING("html");
        ::ATTRVAL_OUTPUT_METHOD_TEXT = XALAN_STATIC_UCODE_STRING("text");
        ::ATTRVAL_OUTPUT_METHOD_XML = XALAN_STATIC_UCODE_STRING("xml");
        ::ATTRVAL_PRESERVE = XALAN_STATIC_UCODE_STRING("preserve");
        ::ATTRVAL_SIMPLE = XALAN_STATIC_UCODE_STRING("simple");
  -     ::ATTRVAL_SINGLE = XALAN_STATIC_UCODE_STRING("single");
        ::ATTRVAL_STRIP = XALAN_STATIC_UCODE_STRING("strip");
        ::ATTRVAL_THIS = XALAN_STATIC_UCODE_STRING(".");
  -     ::ATTRVAL_TRADITIONAL = XALAN_STATIC_UCODE_STRING("traditional");
        ::ATTRVAL_YES = XALAN_STATIC_UCODE_STRING("yes");
   
        ::DEFAULT_WHITESPACE_SEPARATOR_STRING = XALAN_STATIC_UCODE_STRING(" 
\t\n\r");
  @@ -712,7 +691,6 @@
        releaseMemory(::ATTRNAME_INFINITY);
        releaseMemory(::ATTRNAME_LANG);
        releaseMemory(::ATTRNAME_LETTERVALUE);
  -     releaseMemory(::ATTRNAME_LEVEL);
        releaseMemory(::ATTRNAME_MATCH);
        releaseMemory(::ATTRNAME_METHOD);
        releaseMemory(::ATTRNAME_MINUSSIGN);
  @@ -763,8 +741,6 @@
   
        releaseMemory(::ATTRTYPE_CDATA);
   
  -     releaseMemory(::ATTRVAL_ALPHABETIC);
  -     releaseMemory(::ATTRVAL_ANY);
        releaseMemory(::ATTRVAL_CASEORDER_LOWER);
        releaseMemory(::ATTRVAL_CASEORDER_UPPER);
        releaseMemory(::ATTRVAL_DATATYPE_NUMBER);
  @@ -773,21 +749,17 @@
        releaseMemory(::ATTRVAL_DEFAULT_PREFIX);
        releaseMemory(::ATTRVAL_DEFAULT_TEXT_RULE);
        releaseMemory(::ATTRVAL_INFINITY);
  -     releaseMemory(::ATTRVAL_MULTI);
        releaseMemory(::ATTRVAL_NAN);
        releaseMemory(::ATTRVAL_NO);
        releaseMemory(::ATTRVAL_ORDER_ASCENDING);
        releaseMemory(::ATTRVAL_ORDER_DESCENDING);
  -     releaseMemory(::ATTRVAL_OTHER);
        releaseMemory(::ATTRVAL_OUTPUT_METHOD_HTML);
        releaseMemory(::ATTRVAL_OUTPUT_METHOD_TEXT);
        releaseMemory(::ATTRVAL_OUTPUT_METHOD_XML);
        releaseMemory(::ATTRVAL_PRESERVE);
        releaseMemory(::ATTRVAL_SIMPLE);
  -     releaseMemory(::ATTRVAL_SINGLE);
        releaseMemory(::ATTRVAL_STRIP);
        releaseMemory(::ATTRVAL_THIS);
  -     releaseMemory(::ATTRVAL_TRADITIONAL);
        releaseMemory(::ATTRVAL_YES);
   
        releaseMemory(::DEFAULT_WHITESPACE_SEPARATOR_STRING);
  
  
  
  1.19      +2 -96     xml-xalan/c/src/XSLT/Constants.hpp
  
  Index: Constants.hpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XSLT/Constants.hpp,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- Constants.hpp     5 Sep 2002 22:01:16 -0000       1.18
  +++ Constants.hpp     6 Sep 2002 01:39:17 -0000       1.19
  @@ -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
  @@ -164,7 +164,6 @@
         * Literals for XSL element names.  Note that there are more
         * names than IDs, because some names map to the same ID.
         */
  -
        // Result tree counting
        static const XalanDOMString&    ELEMNAME_ANY_STRING;
        static const XalanDOMString&    ELEMNAME_APPLY_IMPORTS_STRING;
  @@ -280,7 +279,6 @@
        static const XalanDOMString&    ATTRNAME_INFINITY;
        static const XalanDOMString&    ATTRNAME_LANG;
        static const XalanDOMString&    ATTRNAME_LETTERVALUE;
  -     static const XalanDOMString&    ATTRNAME_LEVEL;
        static const XalanDOMString&    ATTRNAME_MATCH;
        static const XalanDOMString&    ATTRNAME_MINUSSIGN;
        static const XalanDOMString&    ATTRNAME_MODE;
  @@ -335,16 +333,6 @@
        static const XalanDOMString&    ATTRVAL_YES;
        static const XalanDOMString&    ATTRVAL_NO;
     
  -       // For letter-value attribute (part of conversion attributes).
  -     static const XalanDOMString&    ATTRVAL_ALPHABETIC;
  -     static const XalanDOMString&    ATTRVAL_OTHER;
  -    static const XalanDOMString&     ATTRVAL_TRADITIONAL;
  -
  -       // For level attribute in xsl:number.
  -     static const XalanDOMString&    ATTRVAL_SINGLE;
  -     static const XalanDOMString&    ATTRVAL_MULTI;
  -     static const XalanDOMString&    ATTRVAL_ANY;
  -
        // Output stuff
        static const XalanDOMString&    ATTRNAME_OUTPUT_METHOD;
        static const XalanDOMString&    ATTRNAME_DISABLE_OUTPUT_ESCAPING;
  @@ -356,7 +344,7 @@
        static const XalanDOMString&    ATTRNAME_OUTPUT_MEDIATYPE;
        static const XalanDOMString&    ATTRNAME_OUTPUT_STANDALONE;
        static const XalanDOMString&    ATTRNAME_OUTPUT_VERSION;
  -   static const XalanDOMString&      ATTRNAME_OUTPUT_OMITXMLDECL;
  +     static const XalanDOMString&    ATTRNAME_OUTPUT_OMITXMLDECL;
   
        static const XalanDOMString&    ATTRVAL_OUTPUT_METHOD_HTML;
        static const XalanDOMString&    ATTRVAL_OUTPUT_METHOD_XML;
  @@ -383,93 +371,11 @@
   
        // Value for default text rule
        static const XalanDOMString&    ATTRVAL_DEFAULT_TEXT_RULE;
  -     enum eNumberLevel
  -     {
  -             /*
  -              * Integer equivalents for above
  -              */
  -             NUMBERLEVEL_SINGLE = 1,
  -             NUMBERLEVEL_MULTI = 2,
  -             NUMBERLEVEL_ANY = 3,
  -
  -             MAX_MULTI_COUNTING_DEPTH = 32
  -     };
   
        static const XalanDOMString&    ATTRVAL_DEFAULT;
   
        // For Stylesheet-prefix and result-prefix in xsl:namespace-alias 
        static const XalanDOMString&    ATTRVAL_DEFAULT_PREFIX;
  -
  -     enum eAttributeName
  -     {
  -             TATTRNAME_OUTPUT_METHOD = 1,
  -             TATTRNAME_AMOUNT = 2,
  -             TATTRNAME_ANCESTOR = 3,
  -             TATTRNAME_ARCHIVE = 4,
  -             TATTRNAME_ATTRIBUTE = 5,
  -             TATTRNAME_ATTRIBUTE_SET = 6,
  -             TATTRNAME_CASEORDER = 7,
  -             TATTRNAME_CLASS = 8,
  -             TATTRNAME_CLASSID = 9,
  -             TATTRNAME_CODEBASE = 10,
  -             TATTRNAME_CODETYPE = 11,
  -             TATTRNAME_CONDITION = 12,
  -             TATTRNAME_COPYTYPE = 13,
  -             TATTRNAME_COUNT = 14,
  -             TATTRNAME_DATATYPE = 15,
  -             TATTRNAME_DEFAULT = 16,
  -             TATTRNAME_DEFAULTSPACE = 17,
  -             TATTRNAME_DEPTH = 18,
  -             TATTRNAME_DIGITGROUPSEP = 19,
  -             TATTRNAME_DISABLE_OUTPUT_ESCAPING= 20,
  -             TATTRNAME_ELEMENT = 21,
  -             TATTRNAME_ELEMENTS = 22,
  -             TATTRNAME_EXPR = 23,
  -             TATTRNAME_EXTENSIONELEMENTPREFIXES = 24,
  -             TATTRNAME_FORMAT = 25,
  -             TATTRNAME_FROM = 26,
  -             TATTRNAME_GROUPINGSEPARATOR = 27,
  -             TATTRNAME_GROUPINGSIZE = 28,
  -             TATTRNAME_HREF = 29,
  -             TATTRNAME_ID = 30,
  -             TATTRNAME_INDENTRESULT = 32,
  -             TATTRNAME_LANG = 33,
  -             TATTRNAME_LETTERVALUE = 34,
  -             TATTRNAME_LEVEL = 35,
  -             TATTRNAME_MATCH = 36,
  -             TATTRNAME_METHOD = 37,
  -             TATTRNAME_MODE = 38,
  -             TATTRNAME_NAME = 39,
  -             TATTRNAME_NAMESPACE = 40,
  -             TATTRNAME_NDIGITSPERGROUP = 41,
  -             TATTRNAME_NS = 42,
  -             TATTRNAME_ONLY = 43,
  -             TATTRNAME_ORDER = 44,
  -             TATTRNAME_OUTPUT_CDATA_SECTION_ELEMENTS= 45,
  -             TATTRNAME_OUTPUT_DOCTYPE_PUBLIC = 46,
  -             TATTRNAME_OUTPUT_DOCTYPE_SYSTEM = 47,
  -             TATTRNAME_OUTPUT_ENCODING = 48,
  -             TATTRNAME_OUTPUT_INDENT = 49,
  -             TATTRNAME_OUTPUT_MEDIATYPE = 50,
  -             TATTRNAME_OUTPUT_STANDALONE= 51,
  -             TATTRNAME_OUTPUT_VERSION = 52,
  -             TATTRNAME_OUTPUT_OMITXMLDECL = 53,
  -             TATTRNAME_PRIORITY = 54,
  -             TATTRNAME_REFID = 55,
  -             TATTRNAME_RESULTNS = 56,
  -             TATTRNAME_SELECT = 57,
  -             TATTRNAME_STYLE = 59,
  -             TATTRNAME_TEST = 60,
  -             TATTRNAME_TOSTRING = 61,
  -             TATTRNAME_TYPE = 62,
  -             TATTRNAME_USE = 63,
  -             TATTRNAME_USEATTRIBUTESETS = 64,
  -             TATTRNAME_VALUE = 65,
  -             TATTRNAME_XMLNSDEF = 66,
  -             TATTRNAME_XMLNS = 67,
  -             TATTRNAME_XMLSPACE = 68,
  -             TATTRNAME_EXCLUDE_RESULT_PREFIXES = 69
  -     };
   
        // This is used for trace reporting.
        static const XalanDOMString&    PSEUDONAME_NODE;
  
  
  
  1.24      +8 -16     xml-xalan/c/src/XSLT/ElemApplyTemplates.cpp
  
  Index: ElemApplyTemplates.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XSLT/ElemApplyTemplates.cpp,v
  retrieving revision 1.23
  retrieving revision 1.24
  diff -u -r1.23 -r1.24
  --- ElemApplyTemplates.cpp    10 Jul 2002 05:09:48 -0000      1.23
  +++ ElemApplyTemplates.cpp    6 Sep 2002 01:39:17 -0000       1.24
  @@ -91,28 +91,20 @@
        {
                const XalanDOMChar*     const   aname = atts.getName(i);
   
  -             const int                                       tok =
  -                     constructionContext.getAttrTok(aname);
  -
  -             switch(tok)
  +             if (equals(aname, Constants::ATTRNAME_SELECT))
                {
  -             case Constants::TATTRNAME_SELECT:
                        m_selectPattern = 
constructionContext.createXPath(getLocator(), atts.getValue(i), *this);
  -                     break;
  -
  -             case Constants::TATTRNAME_MODE:
  +             }
  +             else if (equals(aname, Constants::ATTRNAME_MODE))
  +             {
                        m_mode = XalanQNameByValue(atts.getValue(i), 
getStylesheet().getNamespaces());
  -                     break;
  -
  -             default:
  -                     if(!isAttrOK(aname, atts, i, constructionContext))
  -                     {
  -                             constructionContext.error(
  +             }
  +             else if (!isAttrOK(aname, atts, i, constructionContext))
  +             {
  +                     constructionContext.error(
                                        "xsl:apply-templates has an illegal 
attribute",
                                        0,
                                        this);
  -                     }
  -                     break;
                }
        }
   
  
  
  
  1.12      +5 -12     xml-xalan/c/src/XSLT/ElemFallback.cpp
  
  Index: ElemFallback.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XSLT/ElemFallback.cpp,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- ElemFallback.cpp  23 Feb 2002 04:23:16 -0000      1.11
  +++ ElemFallback.cpp  6 Sep 2002 01:39:17 -0000       1.12
  @@ -93,23 +93,16 @@
        {
                const XalanDOMChar* const       aname = atts.getName(i);
   
  -             const int                                       tok =
  -                     constructionContext.getAttrTok(aname);
  -
  -             switch(tok)
  +             if (equals(aname, Constants::ATTRNAME_XMLSPACE))
                {
  -             case Constants::TATTRNAME_XMLSPACE:
                        processSpaceAttr(atts, i, constructionContext);
  -                     break;
  -
  -             default:
  -                     if(!isAttrOK(aname, atts, i, constructionContext))
  -                     {
  -                             constructionContext.error(
  +             }
  +             else if (!isAttrOK(aname, atts, i, constructionContext))
  +             {
  +                     constructionContext.error(
                                        "xsl:fallback has an illegal attribute",
                                        0,
                                        this);
  -                     }
                }
        }
   }
  
  
  
  1.18      +8 -15     xml-xalan/c/src/XSLT/ElemIf.cpp
  
  Index: ElemIf.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XSLT/ElemIf.cpp,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- ElemIf.cpp        23 Feb 2002 04:23:16 -0000      1.17
  +++ ElemIf.cpp        6 Sep 2002 01:39:17 -0000       1.18
  @@ -98,28 +98,21 @@
        for(unsigned int i = 0; i < nAttrs; i++)
        {
                const XalanDOMChar*     const   aname = atts.getName(i);
  -             
  -             const int                                       tok =
  -                     constructionContext.getAttrTok(aname);
   
  -             switch(tok)
  +             if (equals(aname, Constants::ATTRNAME_TEST))
                {
  -             case Constants::TATTRNAME_TEST:
                        m_test = constructionContext.createXPath(getLocator(), 
atts.getValue(i), *this);
  -                     break;
  -
  -             case Constants::TATTRNAME_XMLSPACE:
  +             }
  +             else if (equals(aname, Constants::ATTRNAME_XMLSPACE))
  +             {
                        processSpaceAttr(atts, i, constructionContext);
  -                     break;
  -
  -             default:
  -                     if(!isAttrOK(aname, atts, i, constructionContext))
  -                     {
  -                             constructionContext.error(
  +             }
  +             else if (!isAttrOK(aname, atts, i, constructionContext))
  +             {
  +                     constructionContext.error(
                                        "xsl:if has an illegal attribute",
                                        0,
                                        this);
  -                     }
                }
        }
   
  
  
  
  1.52      +0 -12     xml-xalan/c/src/XSLT/ElemLiteralResult.cpp
  
  Index: ElemLiteralResult.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XSLT/ElemLiteralResult.cpp,v
  retrieving revision 1.51
  retrieving revision 1.52
  diff -u -r1.51 -r1.52
  --- ElemLiteralResult.cpp     24 Jul 2002 23:15:52 -0000      1.51
  +++ ElemLiteralResult.cpp     6 Sep 2002 01:39:17 -0000       1.52
  @@ -359,18 +359,6 @@
   
   bool
   ElemLiteralResult::isAttrOK(
  -                     int                                             tok,
  -                     const XalanDOMChar*             attrName,
  -                     const AttributeList&    atts,
  -                     int                                             which) 
const
  -{
  -    return ElemUse::isAttrOK(tok, attrName, atts, which);
  -}
  -
  -
  -
  -bool
  -ElemLiteralResult::isAttrOK(
                        const XalanDOMChar*                             
attrName,
                        const AttributeList&                    /* atts */,
                        int                                                     
        /* which */,
  
  
  
  1.26      +0 -7      xml-xalan/c/src/XSLT/ElemLiteralResult.hpp
  
  Index: ElemLiteralResult.hpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XSLT/ElemLiteralResult.hpp,v
  retrieving revision 1.25
  retrieving revision 1.26
  diff -u -r1.25 -r1.26
  --- ElemLiteralResult.hpp     24 Jul 2002 23:15:52 -0000      1.25
  +++ ElemLiteralResult.hpp     6 Sep 2002 01:39:17 -0000       1.26
  @@ -111,13 +111,6 @@
   
        virtual bool
        isAttrOK(
  -                     int                                             tok,
  -                     const XalanDOMChar*             attrName,
  -                     const AttributeList&    atts,
  -                     int                                             which) 
const;
  -
  -     virtual bool
  -     isAttrOK(
                        const XalanDOMChar*                             
attrName,
                        const AttributeList&                    atts,
                        int                                                     
        which,
  
  
  
  1.57      +95 -14    xml-xalan/c/src/XSLT/ElemNumber.cpp
  
  Index: ElemNumber.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XSLT/ElemNumber.cpp,v
  retrieving revision 1.56
  retrieving revision 1.57
  diff -u -r1.56 -r1.57
  --- ElemNumber.cpp    6 May 2002 05:31:57 -0000       1.56
  +++ ElemNumber.cpp    6 Sep 2002 01:39:17 -0000       1.57
  @@ -116,7 +116,7 @@
        m_countMatchPattern(0),
        m_fromMatchPattern(0),
        m_valueExpr(0),
  -     m_level(Constants::NUMBERLEVEL_SINGLE),
  +     m_level(eSingle),
        m_format_avt(0),
        m_lang_avt(0),
        m_lettervalue_avt(0),
  @@ -130,21 +130,29 @@
        {
                const XalanDOMChar*     const   aname = atts.getName(i);
   
  -             if(equals(aname, Constants::ATTRNAME_LEVEL))
  +             if(equals(aname, s_levelString))
                {
                        const XalanDOMChar*     const   levelValue = 
atts.getValue(i);
   
  -                     if(equals(Constants::ATTRVAL_MULTI, levelValue))
  -                             m_level = Constants::NUMBERLEVEL_MULTI;
  -                     else if(equals(levelValue,Constants::ATTRVAL_ANY))
  -                             m_level = Constants::NUMBERLEVEL_ANY;
  -                     else if(equals(levelValue,Constants::ATTRVAL_SINGLE))
  -                             m_level = Constants::NUMBERLEVEL_SINGLE;
  +                     if(equals(s_multipleString, levelValue))
  +                     {
  +                             m_level = eMultiple;
  +                     }
  +                     else if(equals(s_anyString, levelValue))
  +                     {
  +                             m_level = eAny;
  +                     }
  +                     else if(equals(s_singleString, levelValue))
  +                     {
  +                             m_level = eSingle;
  +                     }
                        else
  +                     {
                                constructionContext.error(
                                        "The attribute 'level' has an illegal 
value",
                                        0,
                                        this);
  +                     }
                }
                else if(equals(aname, Constants::ATTRNAME_COUNT))
                {
  @@ -535,7 +543,7 @@
        {
                CountersTable&  ctable = executionContext.getCountersTable();
   
  -             if(Constants::NUMBERLEVEL_ANY == m_level)
  +             if(eAny == m_level)
                {
                        const int       theNumber =
                                ctable.countNode(executionContext, this, 
sourceNode);
  @@ -556,7 +564,7 @@
                        getMatchingAncestors(
                                executionContext,
                                sourceNode,
  -                             Constants::NUMBERLEVEL_SINGLE == m_level,
  +                             eSingle == m_level,
                                *ancestors.get());
   
                        const NodeRefListBase::size_type        lastIndex = 
ancestors->getLength();
  @@ -620,7 +628,7 @@
                countMatchPattern = xpathGuard.get();
        }
   
  -     if(Constants::NUMBERLEVEL_ANY == m_level)
  +     if(eAny == m_level)
        {
                const XPath* const      fromMatchPattern = m_fromMatchPattern;
   
  @@ -723,7 +731,7 @@
                countMatchPattern = xpathGuard.get();
        }
   
  -     if(Constants::NUMBERLEVEL_ANY == m_level)
  +     if(eAny == m_level)
        {
                target = findPrecedingOrAncestorOrSelf(
                                executionContext,
  @@ -1365,7 +1373,7 @@
   
                                evaluateLetterValueAVT(executionContext, 
contextNode, letterVal);
   
  -                             if (equals(letterVal, 
Constants::ATTRVAL_TRADITIONAL) == true)
  +                             if (equals(letterVal, s_traditionalString) == 
true)
                                {
                                        
NumberingResourceBundleMapType::const_iterator  i = 
s_resourceBundles.find(0x03B1);
   
  @@ -1374,7 +1382,7 @@
                                                
traditionalAlphaCount(listElement, (*i).second, theResult);
                                        }
                                }
  -                             else if (equals(letterVal, 
Constants::ATTRVAL_ALPHABETIC) == true)
  +                             else if (equals(letterVal, s_alphabeticString) 
== true)
                                {
                                        int2alphaCount(listElement, 
s_elalphaCountTable, theResult);
                                }
  @@ -1851,6 +1859,79 @@
   const XalanDOMString&        ElemNumber::s_alphaCountTable = 
::s_alphaCountTable;
   
   const XalanDOMString&        ElemNumber::s_elalphaCountTable = 
::s_elalphaCountTable;
  +
  +const XalanDOMChar           ElemNumber::s_levelString[] =
  +{
  +     XalanUnicode::charLetter_l,
  +     XalanUnicode::charLetter_e,
  +     XalanUnicode::charLetter_v,
  +     XalanUnicode::charLetter_e,
  +     XalanUnicode::charLetter_l,
  +     0
  +};
  +
  +const XalanDOMChar           ElemNumber::s_multipleString[] =
  +{
  +     XalanUnicode::charLetter_m,
  +     XalanUnicode::charLetter_u,
  +     XalanUnicode::charLetter_l,
  +     XalanUnicode::charLetter_t,
  +     XalanUnicode::charLetter_i,
  +     XalanUnicode::charLetter_p,
  +     XalanUnicode::charLetter_l,
  +     XalanUnicode::charLetter_e,
  +     0
  +};
  +
  +const XalanDOMChar           ElemNumber::s_anyString[] =
  +{
  +     XalanUnicode::charLetter_a,
  +     XalanUnicode::charLetter_n,
  +     XalanUnicode::charLetter_y,
  +     0
  +};
  +
  +const XalanDOMChar           ElemNumber::s_singleString[] =
  +{
  +     XalanUnicode::charLetter_s,
  +     XalanUnicode::charLetter_i,
  +     XalanUnicode::charLetter_n,
  +     XalanUnicode::charLetter_g,
  +     XalanUnicode::charLetter_l,
  +     XalanUnicode::charLetter_e,
  +     0
  +};
  +
  +const XalanDOMChar           ElemNumber::s_alphabeticString[] =
  +{
  +     XalanUnicode::charLetter_a,
  +     XalanUnicode::charLetter_l,
  +     XalanUnicode::charLetter_p,
  +     XalanUnicode::charLetter_h,
  +     XalanUnicode::charLetter_a,
  +     XalanUnicode::charLetter_b,
  +     XalanUnicode::charLetter_e,
  +     XalanUnicode::charLetter_t,
  +     XalanUnicode::charLetter_i,
  +     XalanUnicode::charLetter_c,
  +     0
  +};
  +
  +const XalanDOMChar           ElemNumber::s_traditionalString[] =
  +{
  +     XalanUnicode::charLetter_t,
  +     XalanUnicode::charLetter_r,
  +     XalanUnicode::charLetter_a,
  +     XalanUnicode::charLetter_d,
  +     XalanUnicode::charLetter_i,
  +     XalanUnicode::charLetter_t,
  +     XalanUnicode::charLetter_i,
  +     XalanUnicode::charLetter_o,
  +     XalanUnicode::charLetter_n,
  +     XalanUnicode::charLetter_a,
  +     XalanUnicode::charLetter_l,
  +     0
  +};
   
   const ElemNumber::DecimalToRomanVectorType&          
ElemNumber::s_romanConvertTable =
                                ::s_romanConvertTable;
  
  
  
  1.35      +37 -0     xml-xalan/c/src/XSLT/ElemNumber.hpp
  
  Index: ElemNumber.hpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XSLT/ElemNumber.hpp,v
  retrieving revision 1.34
  retrieving revision 1.35
  diff -u -r1.34 -r1.35
  --- ElemNumber.hpp    11 Apr 2002 05:54:50 -0000      1.34
  +++ ElemNumber.hpp    6 Sep 2002 01:39:18 -0000       1.35
  @@ -94,6 +94,13 @@
   
   public:
   
  +     enum eLevel
  +     {
  +             eSingle,
  +             eMultiple,
  +             eAny,
  +     };
  +
   #if defined(XALAN_NO_NAMESPACES)
        typedef vector<DecimalToRoman>                                  
DecimalToRomanVectorType;
        typedef vector<int>                                                     
        IntArrayType;
  @@ -430,6 +437,36 @@
         * The string ".".
         */
        static const XalanDOMString&                    
s_defaultSeparatorString;
  +
  +     /**
  +      * The string "level".
  +      */
  +     static const XalanDOMChar                               s_levelString[];
  +
  +     /**
  +      * The string "multiple".
  +      */
  +     static const XalanDOMChar                               
s_multipleString[];
  +
  +     /**
  +      * The string "any".
  +      */
  +     static const XalanDOMChar                               s_anyString[];
  +
  +     /**
  +      * The string "single".
  +      */
  +     static const XalanDOMChar                               
s_singleString[];
  +
  +     /**
  +      * The string "alphabetic".
  +      */
  +     static const XalanDOMChar                               
s_alphabeticString[];
  +
  +     /**
  +      * The string "traditional".
  +      */
  +     static const XalanDOMChar                               
s_traditionalString[];
   
        /**
        * Chars for converting integers into alpha counts.
  
  
  
  1.24      +19 -28    xml-xalan/c/src/XSLT/ElemTemplate.cpp
  
  Index: ElemTemplate.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XSLT/ElemTemplate.cpp,v
  retrieving revision 1.23
  retrieving revision 1.24
  diff -u -r1.23 -r1.24
  --- ElemTemplate.cpp  26 Jun 2002 01:22:21 -0000      1.23
  +++ ElemTemplate.cpp  6 Sep 2002 01:39:18 -0000       1.24
  @@ -99,43 +99,34 @@
        {
                const XalanDOMChar* const       aname = atts.getName(i);
   
  -             const int                                       tok =
  -                     constructionContext.getAttrTok(aname);
  -
  -             switch(tok)
  +             if (equals(aname, Constants::ATTRNAME_MATCH))
                {
  -             case Constants::TATTRNAME_MATCH:
                        m_matchPattern = 
constructionContext.createMatchPattern(getLocator(), atts.getValue(i), *this);
  -                     break; 
  -
  -             case Constants::TATTRNAME_NAME:
  +             }
  +             else if (equals(aname, Constants::ATTRNAME_NAME))
  +             {
                        m_name = XalanQNameByValue(atts.getValue(i), 
getStylesheet().getNamespaces());
  -                     break;
  -
  -             case Constants::TATTRNAME_PRIORITY:
  -                     {
  -                             assert(atts.getValue(i) != 0);
  -
  -                             m_priority = 
DoubleSupport::toDouble(atts.getValue(i));
  -                     }
  -                     break;
  +             }
  +             else if (equals(aname, Constants::ATTRNAME_PRIORITY))
  +             {
  +                     assert(atts.getValue(i) != 0);
   
  -             case Constants::TATTRNAME_MODE:
  +                     m_priority = DoubleSupport::toDouble(atts.getValue(i));
  +             }
  +             else if (equals(aname, Constants::ATTRNAME_MODE))
  +             {
                        m_mode = XalanQNameByValue(atts.getValue(i), 
getStylesheet().getNamespaces());
  -                     break;
  -
  -             case Constants::TATTRNAME_XMLSPACE:
  +             }
  +             else if (equals(aname, Constants::ATTRNAME_XMLSPACE))
  +             {
                        processSpaceAttr(atts, i, constructionContext);
  -                     break;
  -
  -             default:
  -                     if(!isAttrOK(aname, atts, i, constructionContext))
  -                     {
  -                             constructionContext.error(
  +             }
  +             else if (!isAttrOK(aname, atts, i, constructionContext))
  +             {
  +                     constructionContext.error(
                                        "xsl:template has an illegal attribute",
                                        0,
                                        this);
  -                     }
                }
        }
   
  
  
  
  1.76      +0 -13     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.75
  retrieving revision 1.76
  diff -u -r1.75 -r1.76
  --- ElemTemplateElement.cpp   10 Jul 2002 05:09:48 -0000      1.75
  +++ ElemTemplateElement.cpp   6 Sep 2002 01:39:18 -0000       1.76
  @@ -174,19 +174,6 @@
   
   bool
   ElemTemplateElement::isAttrOK(
  -                     int                                             tok,
  -                     const XalanDOMChar*             attrName,
  -                     const AttributeList&    /* atts */,
  -                     int                                             /* 
which */) const
  -{
  -    return Constants::TATTRNAME_XMLNSDEF == tok      ||
  -             startsWith(attrName, Constants::ATTRNAME_XMLNS);
  -}
  -
  -
  -
  -bool
  -ElemTemplateElement::isAttrOK(
                        const XalanDOMChar*                             
attrName,
                        const AttributeList&                    atts,
                        int                                                     
        which,
  
  
  
  1.45      +10 -26    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.44
  retrieving revision 1.45
  diff -u -r1.44 -r1.45
  --- ElemTemplateElement.hpp   5 Sep 2002 03:25:59 -0000       1.44
  +++ ElemTemplateElement.hpp   6 Sep 2002 01:39:18 -0000       1.45
  @@ -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
  @@ -128,31 +128,15 @@
        getLocator() const;
   
        /** 
  -     * See if this is a xmlns attribute, and, if so, process it.
  -     * 
  -     * @param attrName qualified name of attribute
  -     * @param atts     attribute list where the element comes from (not used 
at 
  -     *                                 this time)
  -     * @param which    index into the attribute list (not used at this time)
  -     * @return                 true if this is a namespace name
  -     */
  -     virtual bool
  -     isAttrOK(
  -                     int                                     tok,
  -                     const XalanDOMChar*     attrName,
  -                     const AttributeList&    atts,
  -                     int                                     which) const;
  -
  -     /** 
  -     * See if this is a xmlns attribute or in a non-XSLT.
  -     * 
  -     * @param attrName qualified name of attribute
  -     * @param atts     attribute list where the element comes from (not used 
at 
  -     *                                 this time)
  -     * @param which    index into the attribute list (not used at this time)
  -     * @param constructionContext The current construction context
  -     * @return                 true if this is a namespace name
  -     */
  +      * See if this is a xmlns attribute or in a non-XSLT.
  +      * 
  +      * @param attrName qualified name of attribute
  +      * @param atts    attribute list where the element comes from (not used 
at 
  +      *                                this time)
  +      * @param which   index into the attribute list (not used at this time)
  +      * @param constructionContext The current construction context
  +      * @return                true if this is a namespace name
  +      */
        virtual bool
        isAttrOK(
                        const XalanDOMChar*                     attrName,
  
  
  
  1.29      +18 -27    xml-xalan/c/src/XSLT/ElemValueOf.cpp
  
  Index: ElemValueOf.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XSLT/ElemValueOf.cpp,v
  retrieving revision 1.28
  retrieving revision 1.29
  diff -u -r1.28 -r1.29
  --- ElemValueOf.cpp   23 Feb 2002 04:23:16 -0000      1.28
  +++ ElemValueOf.cpp   6 Sep 2002 01:39:18 -0000       1.29
  @@ -105,46 +105,37 @@
        {
                const XalanDOMChar* const       aname = atts.getName(i);
   
  -             const int                                       tok =
  -                     constructionContext.getAttrTok(aname);
  -
  -             switch(tok)
  +             if (equals(aname, Constants::ATTRNAME_SELECT))
                {
  -             case Constants::TATTRNAME_SELECT:
  -                     {
  -                             const XalanDOMChar* const       avalue = 
atts.getValue(i);
  -                             assert(avalue != 0);
  +                     const XalanDOMChar* const       avalue = 
atts.getValue(i);
  +                     assert(avalue != 0);
   
  -                             if (avalue[0] == XalanUnicode::charFullStop && 
avalue[1] == 0)
  -                             {
  -                                     m_isDot = true;
  -                             }
  +                     if (avalue[0] == XalanUnicode::charFullStop && 
avalue[1] == 0)
  +                     {
  +                             m_isDot = true;
  +                     }
   
  -                             m_selectPattern =
  +                     m_selectPattern =
                                        constructionContext.createXPath(
                                                getLocator(),
                                                avalue,
                                                *this);
  -                     }
  -                     break;
  -
  -             case Constants::TATTRNAME_DISABLE_OUTPUT_ESCAPING:
  +             }
  +             else if (equals(aname, 
Constants::ATTRNAME_DISABLE_OUTPUT_ESCAPING))
  +             {
                        m_disableOutputEscaping =
                                                
getStylesheet().getYesOrNo(aname, atts.getValue(i), constructionContext);
  -                     break;
  -
  -             case Constants::TATTRNAME_XMLSPACE:
  +             }
  +             else if (equals(aname, Constants::ATTRNAME_XMLSPACE))
  +             {
                        processSpaceAttr(atts, i, constructionContext);
  -                     break; 
  -
  -             default:
  -                     if(!isAttrOK(aname, atts, i, constructionContext))
  -                     {
  -                             constructionContext.error(
  +             }
  +             else if (!isAttrOK(aname, atts, i, constructionContext))
  +             {
  +                     constructionContext.error(
                                        "xsl:value-of has an illegal attribute",
                                        0,
                                        this);
  -                     } 
                }
        }
   
  
  
  
  1.25      +12 -20    xml-xalan/c/src/XSLT/ElemVariable.cpp
  
  Index: ElemVariable.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XSLT/ElemVariable.cpp,v
  retrieving revision 1.24
  retrieving revision 1.25
  diff -u -r1.24 -r1.25
  --- ElemVariable.cpp  23 Feb 2002 04:23:16 -0000      1.24
  +++ ElemVariable.cpp  6 Sep 2002 01:39:18 -0000       1.25
  @@ -102,32 +102,24 @@
        {
                const XalanDOMChar* const       aname = atts.getName(i);
   
  -             const int                                       tok =
  -                     constructionContext.getAttrTok(aname);
  -
  -             switch(tok)
  +             if (equals(aname, Constants::ATTRNAME_SELECT))
  +             {
  +                     m_selectPattern = 
constructionContext.createXPath(getLocator(), atts.getValue(i), *this);
  +             }
  +             else if (equals(aname, Constants::ATTRNAME_NAME))
                {
  -             case Constants::TATTRNAME_SELECT:
  -                     m_selectPattern = 
constructionContext.createXPath(getLocator(), atts.getValue(i),
  -                             *this);
  -                     break;
  -
  -             case Constants::TATTRNAME_NAME:
                        m_qname = XalanQNameByValue(atts.getValue(i), 
stylesheetTree.getNamespaces());
  -                     break;
  -
  -             case Constants::TATTRNAME_XMLSPACE:
  +             }
  +             else if (equals(aname, Constants::ATTRNAME_XMLSPACE))
  +             {
                        processSpaceAttr(atts, i, constructionContext);
  -                     break; 
  -
  -             default:
  -                     if(!isAttrOK(aname, atts, i, constructionContext))
  -                     {
  -                             constructionContext.error(
  +             }
  +             else if (!isAttrOK(aname, atts, i, constructionContext))
  +             {
  +                     constructionContext.error(
                                        "xsl:variable has an illegal attribute",
                                        0,
                                        this);
  -                     }
                }
        }
   
  
  
  
  1.13      +8 -15     xml-xalan/c/src/XSLT/ElemWhen.cpp
  
  Index: ElemWhen.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XSLT/ElemWhen.cpp,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- ElemWhen.cpp      16 Apr 2002 05:45:50 -0000      1.12
  +++ ElemWhen.cpp      6 Sep 2002 01:39:18 -0000       1.13
  @@ -90,27 +90,20 @@
        {
                const XalanDOMChar* const       aname = atts.getName(i);
   
  -             const int                                       tok =
  -                     constructionContext.getAttrTok(aname);
  -
  -             switch(tok)
  +             if (equals(aname, Constants::ATTRNAME_TEST))
                {
  -             case Constants::TATTRNAME_TEST:
                        m_pTest = constructionContext.createXPath(getLocator(), 
atts.getValue(i), *this);
  -                     break;
  -
  -             case Constants::TATTRNAME_XMLSPACE:
  +             }
  +             else if (equals(aname, Constants::ATTRNAME_XMLSPACE))
  +             {
                        processSpaceAttr(atts, i, constructionContext);
  -                     break;
  -
  -             default:
  -                     if(!isAttrOK(aname, atts, i, constructionContext))
  -                     {
  -                             constructionContext.error(
  +             }
  +             else if (!isAttrOK(aname, atts, i, constructionContext))
  +             {
  +                     constructionContext.error(
                                        "xsl:when has an illegal attribute",
                                        0,
                                        this);
  -                     }
                }
        }
   
  
  
  
  1.13      +0 -22     xml-xalan/c/src/XSLT/StylesheetConstructionContext.hpp
  
  Index: StylesheetConstructionContext.hpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XSLT/StylesheetConstructionContext.hpp,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- StylesheetConstructionContext.hpp 14 Sep 2001 20:49:43 -0000      1.12
  +++ StylesheetConstructionContext.hpp 6 Sep 2002 01:39:18 -0000       1.13
  @@ -158,28 +158,6 @@
        destroy(StylesheetRoot*         theStylesheetRoot) = 0;
   
        /**
  -      * Given an XSL tag name, return an integer token that corresponds to
  -      * ELEMNAME_XXX constants defined in Constants.hpp.
  -      *
  -      * @param name a probable xsl:xxx element name
  -      * @return Constants.ELEMNAME_XXX token, or -1 if in xsl or Xalan 
namespace,
  -      * -2 if not in known namespace
  -      */
  -     virtual int
  -     getAttrTok(const XalanDOMString&        name) const = 0;
  -
  -     /**
  -      * Given an XSL tag name, return an integer token that corresponds to
  -      * ELEMNAME_XXX constants defined in Constants.hpp.
  -      *
  -      * @param name a probable xsl:xxx element name
  -      * @return Constants.ELEMNAME_XXX token, or -1 if in xsl or Xalan 
namespace,
  -      * -2 if not in known namespace
  -      */
  -     virtual int
  -     getAttrTok(const XalanDOMChar*  name) const = 0;
  -
  -     /**
         * Determine the fully qualified URI for a string.
         *
         * @param urlString string to qualify
  
  
  
  1.19      +0 -25     
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.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- StylesheetConstructionContextDefault.cpp  14 Sep 2001 20:49:43 -0000      
1.18
  +++ StylesheetConstructionContextDefault.cpp  6 Sep 2002 01:39:18 -0000       
1.19
  @@ -354,31 +354,6 @@
   
   
   
  -int
  -StylesheetConstructionContextDefault::getAttrTok(const XalanDOMString&       
name) const
  -{
  -     return m_processor.getAttrTok(name);
  -}
  -
  -
  -
  -int
  -StylesheetConstructionContextDefault::getAttrTok(const XalanDOMChar* name) 
const
  -{
  -     assert(name != 0);
  -
  -     // $$$ ToDo: Change getAttrTok() to take a const XalanDOMChar*
  -#if defined(XALAN_NO_MUTABLE)
  -     assign((XalanDOMString&)m_tempBuffer, name);
  -#else
  -     assign(m_tempBuffer, name);
  -#endif
  -
  -     return m_processor.getAttrTok(m_tempBuffer);
  -}
  -
  -
  -
   StylesheetConstructionContextDefault::URLAutoPtrType
   StylesheetConstructionContextDefault::getURLFromString(const XalanDOMString& 
urlString)
   {
  
  
  
  1.21      +0 -6      
xml-xalan/c/src/XSLT/StylesheetConstructionContextDefault.hpp
  
  Index: StylesheetConstructionContextDefault.hpp
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/c/src/XSLT/StylesheetConstructionContextDefault.hpp,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- StylesheetConstructionContextDefault.hpp  16 Apr 2002 05:15:31 -0000      
1.20
  +++ StylesheetConstructionContextDefault.hpp  6 Sep 2002 01:39:18 -0000       
1.21
  @@ -233,12 +233,6 @@
        virtual void
        destroy(StylesheetRoot*         theStylesheetRoot);
   
  -     virtual int
  -     getAttrTok(const XalanDOMString&        name) const;
  -
  -     virtual int
  -     getAttrTok(const XalanDOMChar*  name) const;
  -
        virtual URLAutoPtrType
        getURLFromString(const XalanDOMString&  urlString);
   
  
  
  
  1.154     +0 -81     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.153
  retrieving revision 1.154
  diff -u -r1.153 -r1.154
  --- XSLTEngineImpl.cpp        5 Sep 2002 01:38:21 -0000       1.153
  +++ XSLTEngineImpl.cpp        6 Sep 2002 01:39:18 -0000       1.154
  @@ -3454,79 +3454,6 @@
   
   
   void
  -XSLTEngineImpl::initializeAttributeKeysTable(AttributeKeysMapType&   
theAttributeKeys)
  -{
  -     theAttributeKeys[Constants::ATTRNAME_OUTPUT_METHOD] = 
Constants::TATTRNAME_OUTPUT_METHOD;
  -     theAttributeKeys[Constants::ATTRNAME_AMOUNT] = 
Constants::TATTRNAME_AMOUNT;
  -     theAttributeKeys[Constants::ATTRNAME_ANCESTOR] = 
Constants::TATTRNAME_ANCESTOR;
  -     theAttributeKeys[Constants::ATTRNAME_ATTRIBUTE] = 
Constants::TATTRNAME_ATTRIBUTE;
  -     theAttributeKeys[Constants::ATTRNAME_ATTRIBUTE_SET] = 
Constants::TATTRNAME_ATTRIBUTE_SET;
  -     theAttributeKeys[Constants::ATTRNAME_CASEORDER] = 
Constants::TATTRNAME_CASEORDER;
  -     theAttributeKeys[Constants::ATTRNAME_CLASS] = 
Constants::TATTRNAME_CLASS;
  -     theAttributeKeys[Constants::ATTRNAME_CLASSID] = 
Constants::TATTRNAME_CLASSID;
  -     theAttributeKeys[Constants::ATTRNAME_CODEBASE] = 
Constants::TATTRNAME_CODEBASE;
  -     theAttributeKeys[Constants::ATTRNAME_CODETYPE] = 
Constants::TATTRNAME_CODETYPE;
  -     theAttributeKeys[Constants::ATTRNAME_CONDITION] = 
Constants::TATTRNAME_CONDITION;
  -     theAttributeKeys[Constants::ATTRNAME_COPYTYPE] = 
Constants::TATTRNAME_COPYTYPE;
  -     theAttributeKeys[Constants::ATTRNAME_COUNT] = 
Constants::TATTRNAME_COUNT;
  -     theAttributeKeys[Constants::ATTRNAME_DATATYPE] = 
Constants::TATTRNAME_DATATYPE;
  -     theAttributeKeys[Constants::ATTRNAME_DEFAULT] = 
Constants::TATTRNAME_DEFAULT;
  -     theAttributeKeys[Constants::ATTRNAME_DEFAULTSPACE] = 
Constants::TATTRNAME_DEFAULTSPACE;
  -     theAttributeKeys[Constants::ATTRNAME_DEPTH] = 
Constants::TATTRNAME_DEPTH;
  -     theAttributeKeys[Constants::ATTRNAME_DIGITGROUPSEP] = 
Constants::TATTRNAME_DIGITGROUPSEP;
  -     theAttributeKeys[Constants::ATTRNAME_DISABLE_OUTPUT_ESCAPING] = 
Constants::TATTRNAME_DISABLE_OUTPUT_ESCAPING;
  -     theAttributeKeys[Constants::ATTRNAME_ELEMENT] = 
Constants::TATTRNAME_ELEMENT;
  -     theAttributeKeys[Constants::ATTRNAME_ELEMENTS] = 
Constants::TATTRNAME_ELEMENTS;
  -     theAttributeKeys[Constants::ATTRNAME_EXPR] = Constants::TATTRNAME_EXPR;
  -     theAttributeKeys[Constants::ATTRNAME_EXTENSIONELEMENTPREFIXES] = 
Constants::TATTRNAME_EXTENSIONELEMENTPREFIXES;
  -     theAttributeKeys[Constants::ATTRNAME_FORMAT] = 
Constants::TATTRNAME_FORMAT;
  -     theAttributeKeys[Constants::ATTRNAME_FROM] = Constants::TATTRNAME_FROM;
  -     theAttributeKeys[Constants::ATTRNAME_GROUPINGSEPARATOR] = 
Constants::TATTRNAME_GROUPINGSEPARATOR;
  -     theAttributeKeys[Constants::ATTRNAME_GROUPINGSIZE] = 
Constants::TATTRNAME_GROUPINGSIZE;
  -     theAttributeKeys[Constants::ATTRNAME_HREF] = Constants::TATTRNAME_HREF;
  -     theAttributeKeys[Constants::ATTRNAME_ID] = Constants::TATTRNAME_ID;
  -     theAttributeKeys[Constants::ATTRNAME_INDENTRESULT] = 
Constants::TATTRNAME_INDENTRESULT;
  -     theAttributeKeys[Constants::ATTRNAME_LANG] = Constants::TATTRNAME_LANG;
  -     theAttributeKeys[Constants::ATTRNAME_LETTERVALUE] = 
Constants::TATTRNAME_LETTERVALUE;
  -     theAttributeKeys[Constants::ATTRNAME_LEVEL] = 
Constants::TATTRNAME_LEVEL;
  -     theAttributeKeys[Constants::ATTRNAME_MATCH] = 
Constants::TATTRNAME_MATCH;
  -     theAttributeKeys[Constants::ATTRNAME_METHOD] = 
Constants::TATTRNAME_METHOD;
  -     theAttributeKeys[Constants::ATTRNAME_MODE] = Constants::TATTRNAME_MODE;
  -     theAttributeKeys[Constants::ATTRNAME_NAME] = Constants::TATTRNAME_NAME;
  -     theAttributeKeys[Constants::ATTRNAME_NAMESPACE] = 
Constants::TATTRNAME_NAMESPACE;
  -     theAttributeKeys[Constants::ATTRNAME_NDIGITSPERGROUP] = 
Constants::TATTRNAME_NDIGITSPERGROUP;
  -     theAttributeKeys[Constants::ATTRNAME_NS] = Constants::TATTRNAME_NS;
  -     theAttributeKeys[Constants::ATTRNAME_ONLY] = Constants::TATTRNAME_ONLY;
  -     theAttributeKeys[Constants::ATTRNAME_ORDER] = 
Constants::TATTRNAME_ORDER;
  -     theAttributeKeys[Constants::ATTRNAME_OUTPUT_CDATA_SECTION_ELEMENTS] = 
Constants::TATTRNAME_OUTPUT_CDATA_SECTION_ELEMENTS;
  -     theAttributeKeys[Constants::ATTRNAME_OUTPUT_DOCTYPE_PUBLIC] = 
Constants::TATTRNAME_OUTPUT_DOCTYPE_PUBLIC;
  -     theAttributeKeys[Constants::ATTRNAME_OUTPUT_DOCTYPE_SYSTEM] = 
Constants::TATTRNAME_OUTPUT_DOCTYPE_SYSTEM;
  -     theAttributeKeys[Constants::ATTRNAME_OUTPUT_ENCODING] = 
Constants::TATTRNAME_OUTPUT_ENCODING;
  -     theAttributeKeys[Constants::ATTRNAME_OUTPUT_INDENT] = 
Constants::TATTRNAME_OUTPUT_INDENT;
  -     theAttributeKeys[Constants::ATTRNAME_OUTPUT_MEDIATYPE] = 
Constants::TATTRNAME_OUTPUT_MEDIATYPE;
  -     theAttributeKeys[Constants::ATTRNAME_OUTPUT_STANDALONE] = 
Constants::TATTRNAME_OUTPUT_STANDALONE;
  -     theAttributeKeys[Constants::ATTRNAME_OUTPUT_VERSION] = 
Constants::TATTRNAME_OUTPUT_VERSION;
  -     theAttributeKeys[Constants::ATTRNAME_OUTPUT_OMITXMLDECL] = 
Constants::TATTRNAME_OUTPUT_OMITXMLDECL;
  -     theAttributeKeys[Constants::ATTRNAME_PRIORITY] = 
Constants::TATTRNAME_PRIORITY;
  -     theAttributeKeys[Constants::ATTRNAME_REFID] = 
Constants::TATTRNAME_REFID;
  -     theAttributeKeys[Constants::ATTRNAME_RESULTNS] = 
Constants::TATTRNAME_RESULTNS;
  -     theAttributeKeys[Constants::ATTRNAME_SELECT] = 
Constants::TATTRNAME_SELECT;
  -     theAttributeKeys[Constants::ATTRNAME_STYLE] = 
Constants::TATTRNAME_STYLE;
  -     theAttributeKeys[Constants::ATTRNAME_TEST] = Constants::TATTRNAME_TEST;
  -     theAttributeKeys[Constants::ATTRNAME_TOSTRING] = 
Constants::TATTRNAME_TOSTRING;
  -     theAttributeKeys[Constants::ATTRNAME_TYPE] = Constants::TATTRNAME_TYPE;
  -     theAttributeKeys[Constants::ATTRNAME_USE] = Constants::TATTRNAME_USE;
  -     theAttributeKeys[Constants::ATTRNAME_USEATTRIBUTESETS] = 
Constants::TATTRNAME_USEATTRIBUTESETS;
  -     theAttributeKeys[Constants::ATTRNAME_VALUE] = 
Constants::TATTRNAME_VALUE;
  -
  -     theAttributeKeys[Constants::ATTRNAME_XMLNSDEF] = 
Constants::TATTRNAME_XMLNSDEF;
  -     theAttributeKeys[Constants::ATTRNAME_XMLNS] = 
Constants::TATTRNAME_XMLNS;
  -     theAttributeKeys[Constants::ATTRNAME_XMLSPACE] = 
Constants::TATTRNAME_XMLSPACE;
  -}
  -
  -
  -
  -void
   XSLTEngineImpl::initializeElementKeysTable(ElementKeysMapType&       
theElementKeys)
   {
        theElementKeys[Constants::ELEMNAME_APPLY_TEMPLATES_STRING] = 
Constants::ELEMNAME_APPLY_TEMPLATES;
  @@ -3603,8 +3530,6 @@
   static XalanDOMString        s_typeValueString4;
   
   
  -static XSLTEngineImpl::AttributeKeysMapType          s_attributeKeys;
  -
   static XSLTEngineImpl::ElementKeysMapType            s_elementKeys;
   
   
  @@ -3633,8 +3558,6 @@
   
   const XalanDOMString&        XSLTEngineImpl::s_typeValueString4 = 
::s_typeValueString4;
   
  -const XSLTEngineImpl::AttributeKeysMapType&          
XSLTEngineImpl::s_attributeKeys = ::s_attributeKeys;
  -
   const XSLTEngineImpl::ElementKeysMapType&            
XSLTEngineImpl::s_elementKeys = ::s_elementKeys;
   
   
  @@ -3666,8 +3589,6 @@
   
        installFunctions();
   
  -     initializeAttributeKeysTable(::s_attributeKeys);
  -
        initializeElementKeysTable(::s_elementKeys);
   }
   
  @@ -3677,8 +3598,6 @@
   XSLTEngineImpl::terminate()
   {
        ElementKeysMapType().swap(::s_elementKeys);
  -
  -     AttributeKeysMapType().swap(::s_attributeKeys);
   
        uninstallFunctions();
   
  
  
  
  1.93      +1 -30     xml-xalan/c/src/XSLT/XSLTEngineImpl.hpp
  
  Index: XSLTEngineImpl.hpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XSLT/XSLTEngineImpl.hpp,v
  retrieving revision 1.92
  retrieving revision 1.93
  diff -u -r1.92 -r1.93
  --- XSLTEngineImpl.hpp        19 Aug 2002 23:05:11 -0000      1.92
  +++ XSLTEngineImpl.hpp        6 Sep 2002 01:39:18 -0000       1.93
  @@ -183,9 +183,6 @@
   #if defined(XALAN_NO_NAMESPACES)
        typedef map<XalanDOMString,
                                int,
  -                             less<XalanDOMString> >          
AttributeKeysMapType;
  -     typedef map<XalanDOMString,
  -                             int,
                                less<XalanDOMString> >          
ElementKeysMapType;
        typedef map<const void*,
                                ClockType,
  @@ -196,7 +193,6 @@
        typedef set<const XalanDOMString*,
                                LessXalanDOMStringPointers>     
XalanDOMStringPointerSetType;
   #else
  -     typedef std::map<XalanDOMString, int>           AttributeKeysMapType;
        typedef std::map<XalanDOMString, int>           ElementKeysMapType;
        typedef std::map<const void*, ClockType>        DurationsTableMapType;
        typedef std::vector<const Locator*>                     LocatorStack;
  @@ -735,30 +731,13 @@
        static int
        getElementToken(const XalanDOMString&   name)
        {
  -             AttributeKeysMapType::const_iterator iter=
  +             ElementKeysMapType::const_iterator iter=
                        s_elementKeys.find(name);
   
                return iter == s_elementKeys.end() ? -2 : (*iter).second;
        }
   
        /**
  -      * Given an XSL tag name, return an integer token that corresponds to
  -      * ELEMNAME_XXX constants defined in Constants.hpp.
  -      *
  -      * @param name a probable xsl:xxx element
  -      * @return Constants.ELEMNAME_XXX token, -1 if in XSL or Xalan 
namespace,
  -      *                 or -2 if not in known namespace
  -      */
  -     static int
  -     getAttrTok(const XalanDOMString&        name)
  -     {
  -             ElementKeysMapType::const_iterator iter=
  -                     s_attributeKeys.find(name);
  -
  -             return iter == s_attributeKeys.end() ? -2 : (*iter).second;
  -     }
  -
  -     /**
         * Given an XSL tag name, return an integer token
         * that corresponds to ELEMNAME_XXX constants defined 
         * in Constants.java.
  @@ -1572,11 +1551,6 @@
        static const XalanDOMString&            s_uniqueNamespacePrefix;
   
        /**
  -      * Map of XSLT IDs for attribute names.
  -      */
  -     static const AttributeKeysMapType&      s_attributeKeys;
  -
  -     /**
         * Map of XSLT element IDs for element names.
         */
        static const ElementKeysMapType&        s_elementKeys;
  @@ -1753,9 +1727,6 @@
   
        static void
        uninstallFunctions();
  -
  -     static void
  -     initializeAttributeKeysTable(AttributeKeysMapType&      
theAttributeKeys);
   
        static void
        initializeElementKeysTable(ElementKeysMapType&  theElementKeys);
  
  
  

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

Reply via email to