void TraceListenerDefault::processNodeList(const NodeRefListBase& nl) { m_printWriter.println(); const NodeRefListBase::size_type n = nl.getLength(); XalanDOMString msg(m_memoryManager); if(n == 0) { m_printWriter.println( XalanMessageLoader::getMessage( msg, XalanMessages::EmptyNodeList)); } else { for(NodeRefListBase::size_type i = 0; i < n; i++) { assert(nl.item(i) != 0); m_printWriter.print(XALAN_STATIC_UCODE_STRING(" ")); DOMServices::getNodeData(*nl.item(i), msg); m_printWriter.println(msg); } } }
/** * Static conversion function. Append the string value of the * NodeRefListBase to the supplied XalanDOMString parameter. * * @deprecated This function is deprecated and should not be used. * * @param theNodeList The NodeRefListBase to convert. * @param theString The output XalanDOMString. */ static void string( const NodeRefListBase& theNodeList, XalanDOMString& theString) { if (theNodeList.getLength() > 0) { assert(theNodeList.item(0) != 0); string(*theNodeList.item(0), theString); } }
/** * Static conversion function. Calls the supplied FormatterListener * member function with the string value of the NodeRefListBase. * * @deprecated This function is deprecated and should not be used. * * @param theNodeList The NodeRefListBase to convert. * @param formatterListener The FormatterListener instance. * @param function The FormatterListener member function to call. */ static void string( const NodeRefListBase& theNodeList, FormatterListener& formatterListener, MemberFunctionPtr function) { if (theNodeList.getLength() > 0) { assert(theNodeList.item(0) != 0); DOMServices::getNodeData(*theNodeList.item(0), formatterListener, function); } }
void ElemForEach::transformSelectedChildren( StylesheetExecutionContext& executionContext, const ElemTemplateElement* theTemplate, const NodeRefListBase& sourceNodes, NodeRefListBase::size_type sourceNodesCount) const { if(executionContext.getTraceSelects() == true) { executionContext.traceSelect( *this, sourceNodes, m_selectPattern); } // Create an object to set and restore the context node list... const StylesheetExecutionContext::ContextNodeListPushAndPop theContextNodeLisPushAndPop( executionContext, sourceNodes); for(NodeRefListBase::size_type i = 0; i < sourceNodesCount; i++) { XalanNode* const childNode = sourceNodes.item(i); assert(childNode != 0); transformChild( executionContext, *this, theTemplate, childNode); } }
void MutableNodeRefList::addNodesInDocOrder( const NodeRefListBase& nodelist, XPathExecutionContext& executionContext) { const size_type theOtherLength = nodelist.getLength(); for(size_type i = 0; i < theOtherLength; i++) { addNodeInDocOrder(nodelist.item(i), executionContext); } }
void MutableNodeRefList::addNodes(const NodeRefListBase& nodelist) { const size_type theLength = nodelist.getLength(); for (size_type i = 0; i < theLength; i++) { XalanNode* const theNode = nodelist.item(i); if (theNode != 0) { m_nodeList.push_back(theNode); } } }