#include "../config/pathan_config.h" /* * Copyright (c) 2001, DecisionSoft Limited All rights reserved. * Please see LICENSE.TXT for more information. */ #include #include #include NavStepImpl::Axis DescendantAxis::getAxis() const { return NavStepImpl::DESCENDANT; } Sequence DescendantAxis::makeList(const XERCES_CPP_NAMESPACE_QUALIFIER DOMNode *node, const XMLCh* const uri, DynamicContext* context) const { XPath2MemoryManager* memMgr=context->getMemoryManager(); Sequence returnList(memMgr); makeListHelper(node, &returnList, uri, context); return returnList; }//makeList void DescendantAxis::makeListHelper(const XERCES_CPP_NAMESPACE_QUALIFIER DOMNode *node, Sequence *retList, const XMLCh* const uri, DynamicContext* context) const { XPath2MemoryManager* memMgr=context->getMemoryManager(); XERCES_CPP_NAMESPACE_QUALIFIER DOMNode *child = node->getFirstChild(); while (child != 0) { // add the node only if it is not an entity reference if(child->getNodeType() != XERCES_CPP_NAMESPACE_QUALIFIER DOMNode::ENTITY_REFERENCE_NODE && filterNode(child,uri,context)) retList->addItem(memMgr->createNode(child)); // now add the children of that node makeListHelper(child, retList, uri, context); child = child->getNextSibling(); }//while }//makeListHelper