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 tagreturnsSOME elemwhereelemis the representation of the element with the given tag. It returnsNONEwhentagis not the name of any element in the schema. val preserveWS : element -> bool-
preserveWS elemreturnstrueif whitespace should be preserved in the element’s content andfalseif 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 elemreturnstrueif comments should be preserved in the element’s content andfalseif comments if they should be deleted. val same : element * element -> bool-
same (elem1, elem2)returnstrueif, and only if, the two elements are the same. val toString : element -> string-
toString elemreturns 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.