Ejemplo n.º 1
0
const XalanDOMString&
DOMServices::getNameOfNode(const XalanNode&     n)
{
    const XalanNode::NodeType   theNodeType =
                n.getNodeType();

    if (theNodeType == XalanNode::ATTRIBUTE_NODE)
    {
        return getNameOfNode(static_cast<const XalanAttr&>(n));
    }
    else if (theNodeType == XalanNode::ELEMENT_NODE)
    {
        return getNameOfNode(static_cast<const XalanElement&>(n));
    }
    else if (theNodeType == XalanNode::PROCESSING_INSTRUCTION_NODE)
    {
        return n.getNodeName();
    }
    else
    {
        return s_emptyString;
    }
}
Ejemplo n.º 2
0
const XalanDOMString&
DOMServices::getNameOfNode(const XalanNode&		n)
{
	const XalanNode::NodeType	theNodeType =
				n.getNodeType();

	if (theNodeType == XalanNode::ATTRIBUTE_NODE)
	{
		return getNameOfNode(
#if defined(XALAN_OLD_STYLE_CASTS)
				(const XalanAttr&)n);
#else
				static_cast<const XalanAttr&>(n));
#endif
	}
	else if (theNodeType == XalanNode::ELEMENT_NODE)