DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=27982>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=27982

XalanSourceTreeElementNA::getLocalName() may be wrong

           Summary: XalanSourceTreeElementNA::getLocalName() may be wrong
           Product: XalanC
           Version: CurrentCVS
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: XalanC
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


As far as I understand, there are specialized variants for elements within the
XalanSourceTree:

* Without namespace and with attributes -> XalanSourceTreeElementA
* Without namespace and without attribtues -> XalanSourceTreeElementNA
* With namespace and with attributes -> XalanSourceTreeElementANS
* With namespace and without attributes -> XalanSourceTreeElementNANS

They all are derived from XalanSourceTreeElement.

XalanSourceTreeElementA.cpp overrides getLocalName():

const XalanDOMString&
XalanSourceTreeElementA::getLocalName() const
{
        return m_tagName;
}

XalanSourceTreeElementNA.cpp overrides getLocalName():
const XalanDOMString&
XalanSourceTreeElementA::getLocalName() const
{
        return s_EmptyString;
}

That's wrong (in my opinion ;^). This should be the same as
XalanSourceTreeElementA. 

I think there are no current problems, because DOMService::getLocalNameOfNode()
calls getNodeName, if the local name turns out empty. The getNodeName of
XalanSourceTreeElementNA is the method inherited from XalanSourceTreeElement and
returns "m_tagName".

Reply via email to