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:
33
valid.c
33
valid.c
@ -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) {
|
||||
|
Reference in New Issue
Block a user