The XML_SCHEMA
signature describes the elements and attributes of
an XML schema that are required to parse files of that schema.
Synopsis
signature XML_SCHEMA
Interface
type element
type attribute
val element : string -> element option
val preserveWS : element -> bool
val preserveComment : element -> bool
val same : element * element -> bool
val toString : element -> string
val attribute : (string * string) -> attribute
Description
type element
-
the representation type for XML elements. Note that this type is not the type of a tree node in an XML tree, but rather the label or tag associated with the tree.
type attribute
-
the representation type for XML attributes.
val element : string -> element option
-
element tag
returnsSOME elem
whereelem
is the representation of the element with the given tag. It returnsNONE
whentag
is not the name of any element in the schema. val preserveWS : element -> bool
-
preserveWS elem
returnstrue
if whitespace should be preserved in the element’s content andfalse
if whitespace can be normalized in the element’s content. Note that if true, this property is inherited by any nested elements. val preserveComment : element -> bool
-
preserveComment elem
returnstrue
if comments should be preserved in the element’s content andfalse
if comments if they should be deleted. val same : element * element -> bool
-
same (elem1, elem2)
returnstrue
if, and only if, the two elements are the same. val toString : element -> string
-
toString elem
returns the string representation of the element (without the “<” and “>” brackets). val attribute : (string * string) -> attribute
-
attribute (name, value)
returns an attribute value for the given name-value pair.