// --------------------------------------------------------------------------- // utility func to extract a DOMNodes Base attr value if present // --------------------------------------------------------------------------- static const XMLCh * getBaseAttrValue(DOMNode *node){ if (node->getNodeType() == DOMNode::ELEMENT_NODE){ DOMElement *elem = (DOMElement *)node; if(elem->hasAttributes()) { /* get all the attributes of the node */ DOMNamedNodeMap *pAttributes = elem->getAttributes(); XMLSize_t nSize = pAttributes->getLength(); for(XMLSize_t i=0;i<nSize;++i) { DOMAttr *pAttributeNode = (DOMAttr*) pAttributes->item(i); /* get attribute name */ if (XMLString::equals(pAttributeNode->getName(), XIncludeUtils::fgXIBaseAttrName)){ /*if (namespace == XMLUni::fgXMLString){ }*/ return pAttributeNode->getValue(); } } } } return NULL; }