Details
xmlValidityErrorFunc ()
void (*xmlValidityErrorFunc) (void *ctx,
const char *msg,
...); |
xmlValidityWarningFunc ()
void (*xmlValidityWarningFunc) (void *ctx,
const char *msg,
...); |
struct xmlValidCtxt
struct xmlValidCtxt {
void *userData; /* user specific data block */
xmlValidityErrorFunc error; /* the callback in case of errors */
xmlValidityWarningFunc warning; /* the callback in case of warning */
/* Node analysis stack used when validating within entities */
xmlNodePtr node; /* Current parsed Node */
int nodeNr; /* Depth of the parsing stack */
int nodeMax; /* Max depth of the parsing stack */
xmlNodePtr *nodeTab; /* array of nodes */
int finishDtd; /* finished validating the Dtd ? */
xmlDocPtr doc; /* the document */
int valid; /* temporary validity check result */
}; |
xmlValidCtxtPtr
typedef xmlValidCtxt *xmlValidCtxtPtr; |
xmlNotationTablePtr
typedef xmlNotationTable *xmlNotationTablePtr; |
xmlElementTablePtr
typedef xmlElementTable *xmlElementTablePtr; |
xmlAttributeTablePtr
typedef xmlAttributeTable *xmlAttributeTablePtr; |
xmlIDTablePtr
typedef xmlIDTable *xmlIDTablePtr; |
xmlRefTablePtr
typedef xmlRefTable *xmlRefTablePtr; |
xmlSplitQName2 ()
parse an XML qualified name string
[NS 5] QName ::= (Prefix ':')? LocalPart
[NS 6] Prefix ::= NCName
[NS 7] LocalPart ::= NCName
xmlAddNotationDecl ()
Register a new notation declaration
xmlCopyNotationTable ()
Build a copy of a notation table.
xmlFreeNotationTable ()
Deallocate the memory used by an entities hash table.
xmlDumpNotationDecl ()
This will dump the content the notation declaration as an XML DTD definition
xmlDumpNotationTable ()
This will dump the content of the notation table as an XML DTD definition
xmlNewElementContent ()
Allocate an element content structure.
xmlCopyElementContent ()
Build a copy of an element content description.
xmlFreeElementContent ()
Free an element content structure. This is a recursive call !
xmlSprintfElementContent ()
This will dump the content of the element content definition
Intended just for the debug routine
xmlAddElementDecl ()
Register a new element declaration
xmlCopyElementTable ()
Build a copy of an element table.
xmlFreeElementTable ()
Deallocate the memory used by an element hash table.
xmlDumpElementTable ()
This will dump the content of the element table as an XML DTD definition
xmlDumpElementDecl ()
This will dump the content of the element declaration as an XML
DTD definition
xmlCreateEnumeration ()
create and initialize an enumeration attribute node.
xmlFreeEnumeration ()
free an enumeration attribute node (recursive).
xmlCopyEnumeration ()
Copy an enumeration attribute node (recursive).
xmlAddAttributeDecl ()
Register a new attribute declaration
Note that tree becomes the ownership of the DTD
xmlCopyAttributeTable ()
Build a copy of an attribute table.
xmlFreeAttributeTable ()
Deallocate the memory used by an entities hash table.
xmlDumpAttributeTable ()
This will dump the content of the attribute table as an XML DTD definition
xmlDumpAttributeDecl ()
This will dump the content of the attribute declaration as an XML
DTD definition
xmlAddID ()
Register a new id declaration
xmlFreeIDTable ()
Deallocate the memory used by an ID hash table.
xmlGetID ()
Search the attribute declaring the given ID
xmlIsID ()
Determine whether an attribute is of type ID. In case we have Dtd(s)
then this is simple, otherwise we use an heuristic: name ID (upper
or lowercase).
xmlRemoveID ()
Remove the given attribute from the ID table maintained internally.
xmlAddRef ()
Register a new ref declaration
xmlFreeRefTable ()
Deallocate the memory used by an Ref hash table.
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).
xmlRemoveRef ()
Remove the given attribute from the Ref table maintained internally.
xmlValidateRoot ()
Try to validate a the root element
basically it does the following check as described by the
XML-1.0 recommendation:
- [ VC: Root Element Type ]
it doesn't try to recurse or apply other check to the element
xmlValidateElementDecl ()
Try to validate a single element definition
basically it does the following checks as described by the
XML-1.0 recommendation:
- [ VC: One ID per Element Type ]
- [ VC: No Duplicate Types ]
- [ VC: Unique Element Type Declaration ]
xmlValidNormalizeAttributeValue ()
Does the validation related extra step of the normalization of attribute
values:
If the declared value is not CDATA, then the XML processor must further
process the normalized attribute value by discarding any leading and
trailing space (x20) characters, and by replacing sequences of space
(x20) characters by single space (x20) character.
xmlValidateAttributeDecl ()
Try to validate a single attribute definition
basically it does the following checks as described by the
XML-1.0 recommendation:
- [ VC: Attribute Default Legal ]
- [ VC: Enumeration ]
- [ VC: ID Attribute Default ]
The ID/IDREF uniqueness and matching are done separately
xmlValidateAttributeValue ()
Validate that the given attribute value match the proper production
[ VC: ID ]
Values of type ID must match the Name production....
[ VC: IDREF ]
Values of type IDREF must match the Name production, and values
of type IDREFS must match Names ...
[ VC: Entity Name ]
Values of type ENTITY must match the Name production, values
of type ENTITIES must match Names ...
[ VC: Name Token ]
Values of type NMTOKEN must match the Nmtoken production; values
of type NMTOKENS must match Nmtokens.
xmlValidateNotationDecl ()
Try to validate a single notation definition
basically it does the following checks as described by the
XML-1.0 recommendation:
- it seems that no validity constraing exist on notation declarations
But this function get called anyway ...
xmlValidateDtd ()
Try to validate the document against the dtd instance
basically it does check all the definitions in the DtD.
xmlValidateDtdFinal ()
Does the final step for the dtds validation once all the
subsets have been parsed
basically it does the following checks described by the XML Rec
- check that ENTITY and ENTITIES type attributes default or
possible values matches one of the defined entities.
- check that NOTATION type attributes default or
possible values matches one of the defined notations.
xmlValidateDocument ()
Try to validate the document instance
basically it does the all the checks described by the XML Rec
i.e. validates the internal and external subset (if present)
and validate the document tree.
xmlValidateElement ()
Try to validate the subtree under an element
xmlValidateOneElement ()
Try to validate a single element and it's attributes,
basically it does the following checks as described by the
XML-1.0 recommendation:
- [ VC: Element Valid ]
- [ VC: Required Attribute ]
Then call xmlValidateOneAttribute() for each attribute present.
The ID/IDREF checkings are done separately
xmlValidateOneAttribute ()
Try to validate a single attribute for an element
basically it does the following checks as described by the
XML-1.0 recommendation:
- [ VC: Attribute Value Type ]
- [ VC: Fixed Attribute Default ]
- [ VC: Entity Name ]
- [ VC: Name Token ]
- [ VC: ID ]
- [ VC: IDREF ]
- [ VC: Entity Name ]
- [ VC: Notation Attributes ]
The ID/IDREF uniqueness and matching are done separately
xmlValidateDocumentFinal ()
Does the final step for the document validation once all the
incremental validation steps have been completed
basically it does the following checks described by the XML Rec
xmlValidateNotationUse ()
Validate that the given mame match a notation declaration.
- [ VC: Notation Declared ]
xmlIsMixedElement ()
Search in the DtDs whether an element accept Mixed content (or ANY)
basically if it is supposed to accept text childs
xmlGetDtdAttrDesc ()
Search the Dtd for the description of this attribute on
this element.
xmlGetDtdNotationDesc ()
Search the Dtd for the description of this notation
xmlGetDtdElementDesc ()
Search the Dtd for the description of this element
xmlValidGetValidElements ()
This function returns the list of authorized children to insert
within an existing tree while respecting the validity constraints
forced by the Dtd. The insertion point is defined using prev and
next in the following ways:
to insert before 'node': xmlValidGetValidElements(node->prev, node, ...
to insert next 'node': xmlValidGetValidElements(node, node->next, ...
to replace 'node': xmlValidGetValidElements(node->prev, node->next, ...
to prepend a child to 'node': xmlValidGetValidElements(NULL, node->childs,
to append a child to 'node': xmlValidGetValidElements(node->last, NULL, ...
pointers to the element names are inserted at the beginning of the array
and do not need to be freed.
xmlValidGetPotentialChildren ()
Build/extend a list of potential children allowed by the content tree