Index: poppler/poppler/ABWOutputDev.cc =================================================================== RCS file: /cvs/poppler/poppler/poppler/ABWOutputDev.cc,v retrieving revision 1.4 diff -r1.4 ABWOutputDev.cc 36d35 < #include 1289a1289,1338 > > //Count nodes, copied from debugxml.c from libxml > int ABWOutputDev::xmlLsCountNode(xmlNodePtr node) { > int ret = 0; > xmlNodePtr list = NULL; > > if (node == NULL) > return(0); > > switch (node->type) { > case XML_ELEMENT_NODE: > list = node->children; > break; > case XML_DOCUMENT_NODE: > case XML_HTML_DOCUMENT_NODE: > #ifdef LIBXML_DOCB_ENABLED > case XML_DOCB_DOCUMENT_NODE: > #endif > list = ((xmlDocPtr) node)->children; > break; > case XML_ATTRIBUTE_NODE: > list = ((xmlAttrPtr) node)->children; > break; > case XML_TEXT_NODE: > case XML_CDATA_SECTION_NODE: > case XML_PI_NODE: > case XML_COMMENT_NODE: > if (node->content != NULL) { > ret = xmlStrlen(node->content); > } > break; > case XML_ENTITY_REF_NODE: > case XML_DOCUMENT_TYPE_NODE: > case XML_ENTITY_NODE: > case XML_DOCUMENT_FRAG_NODE: > case XML_NOTATION_NODE: > case XML_DTD_NODE: > case XML_ELEMENT_DECL: > case XML_ATTRIBUTE_DECL: > case XML_ENTITY_DECL: > case XML_NAMESPACE_DECL: > case XML_XINCLUDE_START: > case XML_XINCLUDE_END: > ret = 1; > break; > } > for (;list != NULL;ret++) > list = list->next; > return(ret); > } Index: poppler/poppler/ABWOutputDev.h =================================================================== RCS file: /cvs/poppler/poppler/poppler/ABWOutputDev.h,v retrieving revision 1.2 diff -r1.2 ABWOutputDev.h 137a138 > int xmlLsCountNode(xmlNodePtr node); >