You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xalan.apache.org by pa...@apache.org on 2001/11/20 16:54:21 UTC
cvs commit: xml-xalan/c/src/XercesParserLiaison XercesBridgeNavigator.cpp
pauldick 01/11/20 07:54:21
Modified: c/src/XercesParserLiaison XercesBridgeNavigator.cpp
Log:
Return parent element if already know
Revision Changes Path
1.6 +15 -2 xml-xalan/c/src/XercesParserLiaison/XercesBridgeNavigator.cpp
Index: XercesBridgeNavigator.cpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/XercesParserLiaison/XercesBridgeNavigator.cpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- XercesBridgeNavigator.cpp 2000/11/02 01:46:43 1.5
+++ XercesBridgeNavigator.cpp 2001/11/20 15:54:21 1.6
@@ -326,9 +326,22 @@
XalanElement*
-XercesBridgeNavigator::getOwnerElement(const DOM_Attr& theXercesAttr) const
+XercesBridgeNavigator::getOwnerElement(const DOM_Attr& theXercesAttr) const
{
- return m_ownerDocument->mapNode(theXercesAttr.getOwnerElement());
+ if (m_parentNode != 0)
+ {
+ assert(m_parentNode->getNodeType() == XalanNode::ELEMENT_NODE);
+
+#if defined(XALAN_OLD_STYLE_CASTS)
+ return (XalanElement*)m_parentNode;
+#else
+ return static_cast<XalanElement*>(m_parentNode);
+#endif
+ }
+ else
+ {
+ return m_ownerDocument->mapNode(theXercesAttr.getOwnerElement());
+ }
}
---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-cvs-help@xml.apache.org