Class Xsd10Valid
java.lang.Object
org.libxmq.imp.xml.xsd10.Xsd10Valid
Port of xml_xsd10_valid.c: simple type validation, dom validation and the identity constraints.
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidfreeValidCtxt(Xsd10ValidCtxt ctxt) Port of xmlSchemaFreeValidCtxt.static Xsd10ValidCtxtnewValidCtxt(Xsd10Schema schema) Port of xmlSchemaNewValidCtxt.static intvalidateDoc(Xsd10ValidCtxt ctxt, XmlDocument doc) Port of xmlSchemaValidateDoc.static intvalidateOneElement(Xsd10ValidCtxt ctxt, XmlNode elem) Port of xmlSchemaValidateOneElement.static voidvalidateSetFilename(Xsd10ValidCtxt vctxt, String filename) Port of xmlSchemaValidateSetFilename.
-
Method Details
-
newValidCtxt
Port of xmlSchemaNewValidCtxt. Create an XML Schemas validation context based on the given schema.- Parameters:
schema- a precompiled XML Schemas- Returns:
- the validation context or null in case of error
-
validateSetFilename
Port of xmlSchemaValidateSetFilename. Workaround to provide file error reporting information when this is not provided by current APIs.- Parameters:
vctxt- the schema validation contextfilename- the file name
-
freeValidCtxt
Port of xmlSchemaFreeValidCtxt. Free the resources associated to the schema validation context.- Parameters:
ctxt- the schema validation context
-
validateOneElement
Port of xmlSchemaValidateOneElement. Validate a branch of a tree, starting with the given elem.- Parameters:
ctxt- a schema validation contextelem- an element node- 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.
-
validateDoc
Port of xmlSchemaValidateDoc. Validate a document tree in memory.- Parameters:
ctxt- a schema validation contextdoc- a parsed document tree- Returns:
- 0 if the document is schemas valid, a positive error code number otherwise and -1 in case of internal or API error.
-