dbertoni    01/11/01 07:53:42

  Modified:    c/src/XSLT ElemElement.cpp
  Log:
  Fix for namespace89.
  
  Revision  Changes    Path
  1.33      +15 -2     xml-xalan/c/src/XSLT/ElemElement.cpp
  
  Index: ElemElement.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XSLT/ElemElement.cpp,v
  retrieving revision 1.32
  retrieving revision 1.33
  diff -u -r1.32 -r1.33
  --- ElemElement.cpp   2001/09/26 21:30:23     1.32
  +++ ElemElement.cpp   2001/11/01 15:53:42     1.33
  @@ -177,6 +177,8 @@
   
        bool    hasUnresolvedPrefix = false;
   
  +     bool    foundResultNamespaceForPrefix = false;
  +
        XalanDOMString::size_type                       len = length(elemName);
   
        const XalanDOMString::size_type         indexOfNSSep = 
indexOf(elemName, XalanUnicode::charColon);
  @@ -213,7 +215,11 @@
                const XalanDOMString* const             theNamespace =
                        executionContext.getResultNamespaceForPrefix(prefix);
   
  -             if (theNamespace == 0)
  +             if (theNamespace != 0)
  +             {
  +                     foundResultNamespaceForPrefix = true;
  +             }
  +             else
                {
                        const XalanDOMString* const             theNamespace =
                                m_namespacesHandler.getNamespace(prefix);
  @@ -233,6 +239,12 @@
                                        isIllegalElement = true;
                                }
                        }
  +                     else if (theNamespace != 0 &&
  +                                      namespaceLen == 0 &&
  +                                      equals(prefix, 
DOMServices::s_XMLNamespace) == false)
  +                     {
  +                             elemNameSpace = *theNamespace;
  +                     }
                }
        }
   
  @@ -240,7 +252,8 @@
        {
                executionContext.startElement(c_wstr(elemName));   
   
  -             if(0 == m_namespaceAVT)
  +             if(0 == m_namespaceAVT &&
  +                (haveNamespace == false || foundResultNamespaceForPrefix == 
true))
                {
                        outputResultNamespaces(executionContext, 
hasUnresolvedPrefix);
                }
  
  
  

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

Reply via email to