mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-08-07 06:43:02 +03:00
Added the function xmlSchemaValidateOneElement to the XML Schema
* xmlschemas.c include/libxml/xmlschemas.h: Added the function xmlSchemaValidateOneElement to the XML Schema validation API, as proposed by Jeffrey Fink - see bug # 152073.
This commit is contained in:
@@ -1,3 +1,9 @@
|
|||||||
|
Wed Sep 8 11:04:27 CEST 2004 Kasimier Buchcik <libxml2-cvs@cazic.net>
|
||||||
|
|
||||||
|
* xmlschemas.c include/libxml/xmlschemas.h: Added the function
|
||||||
|
xmlSchemaValidateOneElement to the XML Schema validation API,
|
||||||
|
as proposed by Jeffrey Fink - see bug # 152073.
|
||||||
|
|
||||||
Tue Sep 7 11:10:36 CEST 2004 Daniel Veillard <daniel@veillard.com>
|
Tue Sep 7 11:10:36 CEST 2004 Daniel Veillard <daniel@veillard.com>
|
||||||
|
|
||||||
* configure.in doc/Makefile.am xstc/Makefile.am: some cleanup
|
* configure.in doc/Makefile.am xstc/Makefile.am: some cleanup
|
||||||
|
@@ -125,6 +125,9 @@ XMLPUBFUN void XMLCALL
|
|||||||
XMLPUBFUN int XMLCALL
|
XMLPUBFUN int XMLCALL
|
||||||
xmlSchemaValidateDoc (xmlSchemaValidCtxtPtr ctxt,
|
xmlSchemaValidateDoc (xmlSchemaValidCtxtPtr ctxt,
|
||||||
xmlDocPtr instance);
|
xmlDocPtr instance);
|
||||||
|
XMLPUBFUN int XMLCALL
|
||||||
|
xmlSchemaValidateOneElement (xmlSchemaValidCtxtPtr ctxt,
|
||||||
|
xmlNodePtr elem);
|
||||||
XMLPUBFUN int XMLCALL
|
XMLPUBFUN int XMLCALL
|
||||||
xmlSchemaValidateStream (xmlSchemaValidCtxtPtr ctxt,
|
xmlSchemaValidateStream (xmlSchemaValidCtxtPtr ctxt,
|
||||||
xmlParserInputBufferPtr input,
|
xmlParserInputBufferPtr input,
|
||||||
|
22
xmlschemas.c
22
xmlschemas.c
@@ -14275,6 +14275,28 @@ xmlSchemaValidateElement(xmlSchemaValidCtxtPtr ctxt, xmlNodePtr elem)
|
|||||||
return (ctxt->err);
|
return (ctxt->err);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* xmlSchemaValidateOneElement:
|
||||||
|
* @ctxt: a schema validation context
|
||||||
|
* @elem: an element node
|
||||||
|
*
|
||||||
|
* Validate a branch of a tree, starting with the given @elem.
|
||||||
|
*
|
||||||
|
* Returns 0 if the element and its subtree is valid, a positive error
|
||||||
|
* code number otherwise and -1 in case of an internal or API error.
|
||||||
|
*/
|
||||||
|
int
|
||||||
|
xmlSchemaValidateOneElement(xmlSchemaValidCtxtPtr ctxt, xmlNodePtr elem)
|
||||||
|
{
|
||||||
|
if ((ctxt == NULL) || (elem == NULL))
|
||||||
|
return (-1);
|
||||||
|
|
||||||
|
ctxt->doc = elem->doc;
|
||||||
|
ctxt->err = 0;
|
||||||
|
ctxt->nberrors = 0;
|
||||||
|
return (xmlSchemaValidateElement(ctxt, elem));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* xmlSchemaValidateDocument:
|
* xmlSchemaValidateDocument:
|
||||||
* @ctxt: a schema validation context
|
* @ctxt: a schema validation context
|
||||||
|
Reference in New Issue
Block a user