dbertoni    2004/06/02 12:55:06

  Modified:    c/src/xalanc/XSLT ElemAttribute.cpp
  Log:
  Workaround for Bugzilla 23955.
  
  Revision  Changes    Path
  1.7       +22 -0     xml-xalan/c/src/xalanc/XSLT/ElemAttribute.cpp
  
  Index: ElemAttribute.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/xalanc/XSLT/ElemAttribute.cpp,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- ElemAttribute.cpp 26 Feb 2004 22:58:57 -0000      1.6
  +++ ElemAttribute.cpp 2 Jun 2004 19:55:06 -0000       1.7
  @@ -307,6 +307,28 @@
                                        if (theNamespace != 0)
                                        {
                                                assign(attrNameSpace, 
*theNamespace);
  +
  +                                         const XalanDOMString* const     
theResultNamespace =
  +                            
executionContext.getResultNamespaceForPrefix(nsprefix);
  +
  +                        if (theResultNamespace != 0 &&
  +                            *theNamespace != *theResultNamespace)
  +                        {
  +                            // Oops! There's a conflict between an existing
  +                            // result namespace and the attribute's 
namespace.
  +                            // To be safe, because we are generating 
namespace
  +                            // declaration here, rather than somewhere that
  +                            // knows more about how that result namespace is
  +                            // used, let's change the prefix of the 
attribute.
  +                            nsprefix.clear();
  +
  +                            
executionContext.getUniqueNamespaceValue(nsprefix);
  +
  +                            // Fix the name by removing the original prefix 
and
  +                            // inserting the new one.
  +                            attrName.erase(0, indexOfNSSep);
  +                            attrName.insert(attrName.begin(), 
nsprefix.begin(), nsprefix.end());
  +                        }
                                        }
   
                                        if (isEmpty(attrNameSpace))
  
  
  

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

Reply via email to