mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-07-29 11:41:22 +03:00
Time to work on helping the Gnome Doc project, first step is reintegrating
the SGML DocBook parser in libxml2 distrib: - DOCBparser.c DOCBparser.h testDocbook.c configure.in Makefile.am xmlversion.h.in: started (re)integrating the DocBook SGML parser. - SAX.[ch]: cleanup and updates for DocBook - debugXML.c parser.h tree.[ch] valid.c xpath.c: small macro or ex SGML identifier changes - valid.c: removed a static unused function. Daniel
This commit is contained in:
67
valid.c
67
valid.c
@ -3601,8 +3601,8 @@ xmlSprintfElements(char *buf, xmlNodePtr node, int glob) {
|
||||
break;
|
||||
case XML_ATTRIBUTE_NODE:
|
||||
case XML_DOCUMENT_NODE:
|
||||
#ifdef LIBXML_SGML_ENABLED
|
||||
case XML_SGML_DOCUMENT_NODE:
|
||||
#ifdef LIBXML_DOCB_ENABLED
|
||||
case XML_DOCB_DOCUMENT_NODE:
|
||||
#endif
|
||||
case XML_HTML_DOCUMENT_NODE:
|
||||
case XML_DOCUMENT_TYPE_NODE:
|
||||
@ -3792,69 +3792,6 @@ done:
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* xmlSprintfElementChilds:
|
||||
* @buf: an output buffer
|
||||
* @content: An element
|
||||
* @glob: 1 if one must print the englobing parenthesis, 0 otherwise
|
||||
*
|
||||
* This will dump the list of childs to the buffer
|
||||
* Intended just for the debug routine
|
||||
*/
|
||||
static void
|
||||
xmlSprintfElementChilds(char *buf, xmlNodePtr node, int glob) {
|
||||
xmlNodePtr cur;
|
||||
|
||||
if (node == NULL) return;
|
||||
if (glob) strcat(buf, "(");
|
||||
cur = node->children;
|
||||
while (cur != NULL) {
|
||||
switch (cur->type) {
|
||||
case XML_ELEMENT_NODE:
|
||||
strcat(buf, (char *) cur->name);
|
||||
if (cur->next != NULL)
|
||||
strcat(buf, " ");
|
||||
break;
|
||||
case XML_TEXT_NODE:
|
||||
if (xmlIsBlankNode(cur))
|
||||
break;
|
||||
case XML_CDATA_SECTION_NODE:
|
||||
case XML_ENTITY_REF_NODE:
|
||||
strcat(buf, "CDATA");
|
||||
if (cur->next != NULL)
|
||||
strcat(buf, " ");
|
||||
break;
|
||||
case XML_ATTRIBUTE_NODE:
|
||||
case XML_DOCUMENT_NODE:
|
||||
#ifdef LIBXML_SGML_ENABLED
|
||||
case XML_SGML_DOCUMENT_NODE:
|
||||
#endif
|
||||
case XML_HTML_DOCUMENT_NODE:
|
||||
case XML_DOCUMENT_TYPE_NODE:
|
||||
case XML_DOCUMENT_FRAG_NODE:
|
||||
case XML_NOTATION_NODE:
|
||||
case XML_NAMESPACE_DECL:
|
||||
strcat(buf, "???");
|
||||
if (cur->next != NULL)
|
||||
strcat(buf, " ");
|
||||
break;
|
||||
case XML_ENTITY_NODE:
|
||||
case XML_PI_NODE:
|
||||
case XML_DTD_NODE:
|
||||
case XML_COMMENT_NODE:
|
||||
case XML_ELEMENT_DECL:
|
||||
case XML_ATTRIBUTE_DECL:
|
||||
case XML_ENTITY_DECL:
|
||||
case XML_XINCLUDE_START:
|
||||
case XML_XINCLUDE_END:
|
||||
break;
|
||||
}
|
||||
cur = cur->next;
|
||||
}
|
||||
if (glob) strcat(buf, ")");
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* xmlValidateOneElement:
|
||||
* @ctxt: the validation context
|
||||
|
Reference in New Issue
Block a user