typedef struct _xmlValidState | xmlValidState |
typedef xmlValidState * | xmlValidStatePtr |
typedef void(* | xmlValidityErrorFunc |
xmlValidityErrorFunc: Callback called when a validity error is found. This is a message oriented function similar to an *printf function.
typedef void(* | xmlValidityWarningFunc |
xmlValidityWarningFunc: Callback called when a validity warning is found. This is a message oriented function similar to an *printf function.
typedef struct _xmlValidCtxt | xmlValidCtxt |
typedef xmlValidCtxt * | xmlValidCtxtPtr |
typedef struct _xmlHashTable | xmlNotationTable |
typedef xmlNotationTable * | xmlNotationTablePtr |
typedef struct _xmlHashTable | xmlElementTable |
typedef xmlElementTable * | xmlElementTablePtr |
typedef struct _xmlHashTable | xmlAttributeTable |
typedef xmlAttributeTable * | xmlAttributeTablePtr |
typedef struct _xmlHashTable | xmlIDTable |
typedef xmlIDTable * | xmlIDTablePtr |
typedef struct _xmlHashTable | xmlRefTable |
typedef xmlRefTable * | xmlRefTablePtr |
XMLPUBFUN xmlValidCtxtPtr XMLCALL | xmlNewValidCtxt | ( | void | ) |
XMLPUBFUN void XMLCALL | xmlFreeValidCtxt | ( | xmlValidCtxtPtr | ) |
XMLPUBFUN xmlNotationPtr XMLCALL | xmlAddNotationDecl | ( | xmlValidCtxtPtr | ctxt, |
xmlDtdPtr | dtd, | |||
const xmlChar * | name, | |||
const xmlChar * | PublicID, | |||
const xmlChar * | SystemID | |||
) |
xmlAddNotationDecl: Register a new notation declaration
Returns NULL if not, otherwise the entity
Parameters | |
---|---|
ctxt | the validation context |
dtd | pointer to the DTD |
name | the entity name |
PublicID | the public identifier or NULL |
SystemID | the system identifier or NULL |
XMLPUBFUN xmlNotationTablePtr XMLCALL | xmlCopyNotationTable | ( | xmlNotationTablePtr | table | ) |
XMLPUBFUN void XMLCALL | xmlFreeNotationTable | ( | xmlNotationTablePtr | table | ) |
xmlFreeNotationTable: Deallocate the memory used by an entities hash table.
Parameters | |
---|---|
table | An notation table |
XMLPUBFUN xmlElementContentPtr XMLCALL | xmlNewElementContent | ( | const xmlChar * | name, |
xmlElementContentType | type | |||
) |
xmlNewElementContent: Allocate an element content structure.
Returns NULL if not, otherwise the new element content structure
OOM: possible --> returns NULL for valid arguments
Parameters | |
---|---|
name | the subelement name or NULL |
type | the type of element content decl |
XMLPUBFUN xmlElementContentPtr XMLCALL | xmlCopyElementContent | ( | xmlElementContentPtr | content | ) |
xmlCopyElementContent: Build a copy of an element content description.
Returns the new xmlElementContentPtr or NULL in case of error.
Parameters | |
---|---|
content | An element content pointer. |
XMLPUBFUN void XMLCALL | xmlFreeElementContent | ( | xmlElementContentPtr | cur | ) |
xmlFreeElementContent: Free an element content structure. This is a recursive call !
Parameters | |
---|---|
cur | the element content tree to free |
XMLPUBFUN void XMLCALL | xmlSnprintfElementContent | ( | char * | buf, |
int | size, | |||
xmlElementContentPtr | content, | |||
int | glob | |||
) |
xmlSnprintfElementContent: This will dump the content of the element content definition Intended just for the debug routine
Parameters | |
---|---|
buf | an output buffer |
size | the buffer size |
content | An element table |
glob | 1 if one must print the enclobing parenthesis, 0 otherwise |
XMLPUBFUN void XMLCALL | xmlSprintfElementContent | ( | char * | buf, |
xmlElementContentPtr | content, | |||
int | glob | |||
) |
XMLPUBFUN xmlElementPtr XMLCALL | xmlAddElementDecl | ( | xmlValidCtxtPtr | ctxt, |
xmlDtdPtr | dtd, | |||
const xmlChar * | name, | |||
xmlElementTypeVal | type, | |||
xmlElementContentPtr | content | |||
) |
xmlAddElementDecl: Register a new element declaration
Returns NULL if not, otherwise the entity
Parameters | |
---|---|
ctxt | the validation context |
dtd | pointer to the DTD |
name | the entity name |
type | the element type |
content | the element content tree or NULL |
XMLPUBFUN xmlElementTablePtr XMLCALL | xmlCopyElementTable | ( | xmlElementTablePtr | table | ) |
XMLPUBFUN void XMLCALL | xmlFreeElementTable | ( | xmlElementTablePtr | table | ) |
xmlFreeElementTable: Deallocate the memory used by an element hash table.
Parameters | |
---|---|
table | An element table |
XMLPUBFUN xmlEnumerationPtr XMLCALL | xmlCreateEnumeration | ( | const xmlChar * | name | ) |
xmlCreateEnumeration: create and initialize an enumeration attribute node.
Returns the xmlEnumerationPtr just created or NULL in case of error.
Parameters | |
---|---|
name | the enumeration name or NULL |
XMLPUBFUN void XMLCALL | xmlFreeEnumeration | ( | xmlEnumerationPtr | cur | ) |
xmlFreeEnumeration: free an enumeration attribute node (recursive).
Parameters | |
---|---|
cur | the tree to free. |
XMLPUBFUN xmlEnumerationPtr XMLCALL | xmlCopyEnumeration | ( | xmlEnumerationPtr | cur | ) |
XMLPUBFUN xmlAttributePtr XMLCALL | xmlAddAttributeDecl | ( | xmlValidCtxtPtr | ctxt, |
xmlDtdPtr | dtd, | |||
const xmlChar * | elem, | |||
const xmlChar * | name, | |||
const xmlChar * | ns, | |||
xmlAttributeType | type, | |||
xmlAttributeDefault | def, | |||
const xmlChar * | defaultValue, | |||
xmlEnumerationPtr | tree | |||
) |
xmlAddAttributeDecl: Register a new attribute declaration Note that tree becomes the ownership of the DTD
Returns NULL if not new, otherwise the attribute decl
Parameters | |
---|---|
ctxt | the validation context |
dtd | pointer to the DTD |
elem | the element name |
name | the attribute name |
ns | the attribute namespace prefix |
type | the attribute type |
def | the attribute default type |
defaultValue | the attribute default value |
tree | if it's an enumeration, the associated list |
XMLPUBFUN xmlAttributeTablePtr XMLCALL | xmlCopyAttributeTable | ( | xmlAttributeTablePtr | table | ) |
XMLPUBFUN void XMLCALL | xmlFreeAttributeTable | ( | xmlAttributeTablePtr | table | ) |
xmlFreeAttributeTable: Deallocate the memory used by an entities hash table.
Parameters | |
---|---|
table | An attribute table |
XMLPUBFUN xmlIDPtr XMLCALL | xmlAddID | ( | xmlValidCtxtPtr | ctxt, |
xmlDocPtr | doc, | |||
const xmlChar * | value, | |||
xmlAttrPtr | attr | |||
) |
xmlAddID: Register a new id declaration
Returns NULL if not, otherwise the new xmlIDPtr
OOM: possible --> check OOM flag if returns NULL
Parameters | |
---|---|
ctxt | the validation context |
doc | pointer to the document |
value | the value name |
attr | the attribute holding the ID |
XMLPUBFUN void XMLCALL | xmlFreeIDTable | ( | xmlIDTablePtr | table | ) |
xmlFreeIDTable: Deallocate the memory used by an ID hash table.
Parameters | |
---|---|
table | An id table |
XMLPUBFUN xmlAttrPtr XMLCALL | xmlGetID | ( | xmlDocPtr | doc, |
const xmlChar * | ID | |||
) |
xmlGetID: Search the attribute declaring the given ID
Returns NULL if not found, otherwise the xmlAttrPtr defining the ID
Parameters | |
---|---|
doc | pointer to the document |
ID | the ID value |
XMLPUBFUN int XMLCALL | xmlIsID | ( | xmlDocPtr | doc, |
xmlNodePtr | elem, | |||
xmlAttrPtr | attr | |||
) |
xmlIsID: Determine whether an attribute is of type ID. In case we have DTD(s) then this is done if DTD loading has been requested. In the case of HTML documents parsed with the HTML parser, then ID detection is done systematically.
Returns 0 or 1 depending on the lookup result
OOM: possible --> set OOM flag when returns 0
Parameters | |
---|---|
doc | the document |
elem | the element carrying the attribute |
attr | the attribute |
XMLPUBFUN int XMLCALL | xmlRemoveID | ( | xmlDocPtr | doc, |
xmlAttrPtr | attr | |||
) |
xmlRemoveID: Remove the given attribute from the ID table maintained internally.
Returns -1 if the lookup failed and 0 otherwise
Parameters | |
---|---|
doc | the document |
attr | the attribute |
XMLPUBFUN xmlRefPtr XMLCALL | xmlAddRef | ( | xmlValidCtxtPtr | ctxt, |
xmlDocPtr | doc, | |||
const xmlChar * | value, | |||
xmlAttrPtr | attr | |||
) |
xmlAddRef: Register a new ref declaration
Returns NULL if not, otherwise the new xmlRefPtr
Parameters | |
---|---|
ctxt | the validation context |
doc | pointer to the document |
value | the value name |
attr | the attribute holding the Ref |
XMLPUBFUN void XMLCALL | xmlFreeRefTable | ( | xmlRefTablePtr | table | ) |
xmlFreeRefTable: Deallocate the memory used by an Ref hash table.
Parameters | |
---|---|
table | An ref table |
XMLPUBFUN int XMLCALL | xmlIsRef | ( | xmlDocPtr | doc, |
xmlNodePtr | elem, | |||
xmlAttrPtr | attr | |||
) |
xmlIsRef: Determine whether an attribute is of type Ref. In case we have DTD(s) then this is simple, otherwise we use an heuristic: name Ref (upper or lowercase).
Returns 0 or 1 depending on the lookup result
Parameters | |
---|---|
doc | the document |
elem | the element carrying the attribute |
attr | the attribute |
XMLPUBFUN int XMLCALL | xmlRemoveRef | ( | xmlDocPtr | doc, |
xmlAttrPtr | attr | |||
) |
xmlRemoveRef: Remove the given attribute from the Ref table maintained internally.
Returns -1 if the lookup failed and 0 otherwise
Parameters | |
---|---|
doc | the document |
attr | the attribute |
XMLPUBFUN xmlListPtr XMLCALL | xmlGetRefs | ( | xmlDocPtr | doc, |
const xmlChar * | ID | |||
) |
xmlGetRefs: Find the set of references for the supplied ID.
Returns NULL if not found, otherwise node set for the ID.
Parameters | |
---|---|
doc | pointer to the document |
ID | the ID value |
XMLPUBFUN int XMLCALL | xmlValidateRoot | ( | xmlValidCtxtPtr | ctxt, |
xmlDocPtr | doc | |||
) |
The public function calls related to validity checking.
XMLPUBFUN int XMLCALL | xmlValidateElementDecl | ( | xmlValidCtxtPtr | ctxt, |
xmlDocPtr | doc, | |||
xmlElementPtr | elem | |||
) |
XMLPUBFUN xmlChar *XMLCALL | xmlValidNormalizeAttributeValue | ( | xmlDocPtr | doc, |
xmlNodePtr | elem, | |||
const xmlChar * | name, | |||
const xmlChar * | value | |||
) |
XMLPUBFUN xmlChar *XMLCALL | xmlValidCtxtNormalizeAttributeValue | ( | xmlValidCtxtPtr | ctxt, |
xmlDocPtr | doc, | |||
xmlNodePtr | elem, | |||
const xmlChar * | name, | |||
const xmlChar * | value | |||
) |
XMLPUBFUN int XMLCALL | xmlValidateAttributeDecl | ( | xmlValidCtxtPtr | ctxt, |
xmlDocPtr | doc, | |||
xmlAttributePtr | attr | |||
) |
XMLPUBFUN int XMLCALL | xmlValidateAttributeValue | ( | xmlAttributeType | type, |
const xmlChar * | value | |||
) |
XMLPUBFUN int XMLCALL | xmlValidateNotationDecl | ( | xmlValidCtxtPtr | ctxt, |
xmlDocPtr | doc, | |||
xmlNotationPtr | nota | |||
) |
XMLPUBFUN int XMLCALL | xmlValidateDtd | ( | xmlValidCtxtPtr | ctxt, |
xmlDocPtr | doc, | |||
xmlDtdPtr | dtd | |||
) |
XMLPUBFUN int XMLCALL | xmlValidateDtdFinal | ( | xmlValidCtxtPtr | ctxt, |
xmlDocPtr | doc | |||
) |
XMLPUBFUN int XMLCALL | xmlValidateDocument | ( | xmlValidCtxtPtr | ctxt, |
xmlDocPtr | doc | |||
) |
XMLPUBFUN int XMLCALL | xmlValidateElement | ( | xmlValidCtxtPtr | ctxt, |
xmlDocPtr | doc, | |||
xmlNodePtr | elem | |||
) |
XMLPUBFUN int XMLCALL | xmlValidateOneElement | ( | xmlValidCtxtPtr | ctxt, |
xmlDocPtr | doc, | |||
xmlNodePtr | elem | |||
) |
XMLPUBFUN int XMLCALL | xmlValidateOneAttribute | ( | xmlValidCtxtPtr | ctxt, |
xmlDocPtr | doc, | |||
xmlNodePtr | elem, | |||
xmlAttrPtr | attr, | |||
const xmlChar * | value | |||
) |
XMLPUBFUN int XMLCALL | xmlValidateOneNamespace | ( | xmlValidCtxtPtr | ctxt, |
xmlDocPtr | doc, | |||
xmlNodePtr | elem, | |||
const xmlChar * | prefix, | |||
xmlNsPtr | ns, | |||
const xmlChar * | value | |||
) |
XMLPUBFUN int XMLCALL | xmlValidateDocumentFinal | ( | xmlValidCtxtPtr | ctxt, |
xmlDocPtr | doc | |||
) |
XMLPUBFUN int XMLCALL | xmlValidateNotationUse | ( | xmlValidCtxtPtr | ctxt, |
xmlDocPtr | doc, | |||
const xmlChar * | notationName | |||
) |
xmlIsMixedElement: Search in the DtDs whether an element accept Mixed content (or ANY) basically if it is supposed to accept text childs
returns 0 if no, 1 if yes, and -1 if no element description is available
Parameters | |
---|---|
doc | the document |
name | the element name |
XMLPUBFUN xmlAttributePtr XMLCALL | xmlGetDtdAttrDesc | ( | xmlDtdPtr | dtd, |
const xmlChar * | elem, | |||
const xmlChar * | name | |||
) |
xmlGetDtdAttrDesc: Search the DTD for the description of this attribute on this element.
returns the xmlAttributePtr if found or NULL
OOM: iif returns NULL and OOM flag is set
Parameters | |
---|---|
dtd | a pointer to the DtD to search |
elem | the element name |
name | the attribute name |
XMLPUBFUN xmlAttributePtr XMLCALL | xmlGetDtdQAttrDesc | ( | xmlDtdPtr | dtd, |
const xmlChar * | elem, | |||
const xmlChar * | name, | |||
const xmlChar * | prefix | |||
) |
xmlGetDtdQAttrDesc: Search the DTD for the description of this qualified attribute on this element.
returns the xmlAttributePtr if found or NULL
OOM: never
Parameters | |
---|---|
dtd | a pointer to the DtD to search |
elem | the element name |
name | the attribute name |
prefix | the attribute namespace prefix |
XMLPUBFUN xmlNotationPtr XMLCALL | xmlGetDtdNotationDesc | ( | xmlDtdPtr | dtd, |
const xmlChar * | name | |||
) |
xmlGetDtdNotationDesc: Search the DTD for the description of this notation
returns the xmlNotationPtr if found or NULL
Parameters | |
---|---|
dtd | a pointer to the DtD to search |
name | the notation name |
XMLPUBFUN xmlElementPtr XMLCALL | xmlGetDtdQElementDesc | ( | xmlDtdPtr | dtd, |
const xmlChar * | name, | |||
const xmlChar * | prefix | |||
) |
xmlGetDtdQElementDesc: Search the DTD for the description of this element
returns the xmlElementPtr if found or NULL
OOM: never
Parameters | |
---|---|
dtd | a pointer to the DtD to search |
name | the element name |
prefix | the element namespace prefix |
XMLPUBFUN xmlElementPtr XMLCALL | xmlGetDtdElementDesc | ( | xmlDtdPtr | dtd, |
const xmlChar * | name | |||
) |
xmlGetDtdElementDesc: Search the DTD for the description of this element
returns the xmlElementPtr if found or NULL
Parameters | |
---|---|
dtd | a pointer to the DtD to search |
name | the element name |
XMLPUBFUN int XMLCALL | xmlValidGetValidElements | ( | xmlNode * | prev, |
xmlNode * | next, | |||
const xmlChar ** | names, | |||
int | max | |||
) |
XMLPUBFUN int XMLCALL | xmlValidGetPotentialChildren | ( | xmlElementContent * | ctree, |
const xmlChar ** | list, | |||
int * | len, | |||
int | max | |||
) |
XMLPUBFUN int XMLCALL | xmlValidateNameValue | ( | const xmlChar * | value | ) |