1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-07-29 11:41:22 +03:00

implemented streaming of RelaxNG (when possible) on top of the xmlReader

* relaxng.c xmlreader.c xmllint.c include/libxml/relaxng.h
  include/libxml/xmlreader.h: implemented streaming of
  RelaxNG (when possible) on top of the xmlReader interface,
  provided it as xmllint --stream --relaxng .rng .xml
  This seems to mostly work.
* Makefile.am: updated to test RelaxNG streaming
Daniel
This commit is contained in:
Daniel Veillard
2003-04-15 23:32:22 +00:00
parent c58f4efbd4
commit f4e5576f8f
8 changed files with 683 additions and 76 deletions

33
valid.c
View File

@ -250,39 +250,6 @@ nodeVPop(xmlValidCtxtPtr ctxt)
return (ret);
}
#if 0
/**
* xmlFreeValidCtxt:
* @ctxt: a validation context
*
* Free the memory allocated for a validation context
*/
void
xmlFreeValidCtxt(xmlValidCtxtPtr ctxt) {
if (ctxt == NULL)
return;
#ifdef LIBXML_REGEXP_ENABLED
while (ctxt->vstateNr >= 0)
vstateVPop(ctxt);
if (ctxt->vstateNr <= 1) return(-1);
ctxt->vstateNr--;
elemDecl = ctxt->vstateTab[ctxt->vstateNr].elemDecl;
ctxt->vstateTab[ctxt->vstateNr].elemDecl = NULL;
ctxt->vstateTab[ctxt->vstateNr].node = NULL;
if ((elemDecl != NULL) && (elemDecl->etype == XML_ELEMENT_TYPE_ELEMENT)) {
xmlRegFreeExecCtxt(ctxt->vstateTab[ctxt->vstateNr].exec);
}
ctxt->vstateTab[ctxt->vstateNr].exec = NULL;
if (ctxt->vstateNr >= 1)
ctxt->vstate = &ctxt->vstateTab[ctxt->vstateNr - 1];
else
ctxt->vstate = NULL;
return(ctxt->vstateNr);
#else /* ! LIBXML_REGEXP_ENABLED */
#endif /* LIBXML_REGEXP_ENABLED */
}
#endif
#ifdef DEBUG_VALID_ALGO
static void
xmlValidPrintNode(xmlNodePtr cur) {