View Source Exogiri.Xml.Schema (exogiri v0.2.2)
Encapsulates an XML schema.
Link to this section Summary
Functions
Read a schema from a string.
Read a schema from a string with a path.
Validate a document against a schema.
Link to this section Types
Specs
t()
The Schema type.
Link to this section Functions
Specs
Read a schema from a string.
As you don't have a path, this doesn't handle more complex cases like included or imported schemas, if either is local.
Specs
Read a schema from a string with a path.
This version handles local includes and imports correctly. The path argument is the location of the actual schema you are parsing as a string, NOT its directory. The schema isn't read from the path, so it doesn't have to be real - the path is used to establish the base location for any local schema references.
Specs
validate_document(t(), Exogiri.Xml.Document.t()) :: {:error, :validation_context_creation_failure | [String.t()]} | :ok
Validate a document against a schema.