Class Xsd10Valid

java.lang.Object
org.libxmq.imp.xml.xsd10.Xsd10Valid

public final class Xsd10Valid extends Object
Port of xml_xsd10_valid.c: simple type validation, dom validation and the identity constraints.
  • Method Details

    • newValidCtxt

      public static Xsd10ValidCtxt newValidCtxt(Xsd10Schema schema)
      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

      public static void validateSetFilename(Xsd10ValidCtxt vctxt, String filename)
      Port of xmlSchemaValidateSetFilename. Workaround to provide file error reporting information when this is not provided by current APIs.
      Parameters:
      vctxt - the schema validation context
      filename - the file name
    • freeValidCtxt

      public static void freeValidCtxt(Xsd10ValidCtxt ctxt)
      Port of xmlSchemaFreeValidCtxt. Free the resources associated to the schema validation context.
      Parameters:
      ctxt - the schema validation context
    • validateOneElement

      public static int validateOneElement(Xsd10ValidCtxt ctxt, XmlNode elem)
      Port of xmlSchemaValidateOneElement. Validate a branch of a tree, starting with the given elem.
      Parameters:
      ctxt - a schema validation context
      elem - 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

      public static int validateDoc(Xsd10ValidCtxt ctxt, XmlDocument doc)
      Port of xmlSchemaValidateDoc. Validate a document tree in memory.
      Parameters:
      ctxt - a schema validation context
      doc - 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.