Module libxml2 :: Class ValidCtxt
[hide private]
[frames] | no frames]

Class ValidCtxt

source code

ValidCtxtCore --+
                |
               ValidCtxt

Instance Methods [hide private]
 
__init__(self, _obj=None) source code
 
__del__(self) source code
 
validCtxtNormalizeAttributeValue(self, doc, elem, name, value)
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.
source code
 
validateDocument(self, doc)
Try to validate the document instance basically it does the all the checks described by the XML Rec i.e.
source code
 
validateDocumentFinal(self, doc)
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 Check all the IDREF/IDREFS attributes definition for validity
source code
 
validateDtd(self, doc, dtd)
Try to validate the document against the dtd instance Basically it does check all the definitions in the DtD.
source code
 
validateDtdFinal(self, doc)
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.
source code
 
validateElement(self, doc, elem)
Try to validate the subtree under an element
source code
 
validateNotationUse(self, doc, notationName)
Validate that the given name match a notation declaration.
source code
 
validateOneAttribute(self, doc, elem, attr, value)
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
source code
 
validateOneElement(self, doc, elem)
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.
source code
 
validateOneNamespace(self, doc, elem, prefix, ns, value)
Try to validate a single namespace declaration 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
source code
 
validatePopElement(self, doc, elem, qname)
Pop the element end from the validation stack.
source code
 
validatePushCData(self, data, len)
check the CData parsed for validation in the current stack
source code
 
validatePushElement(self, doc, elem, qname)
Push a new element start on the validation stack.
source code
 
validateRoot(self, doc)
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
source code

Inherited from ValidCtxtCore: setValidityErrorHandler

Method Details [hide private]

__init__(self, _obj=None)
(Constructor)

source code 
Overrides: ValidCtxtCore.__init__

validCtxtNormalizeAttributeValue(self, doc, elem, name, value)

source code 
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. Also check VC: Standalone Document Declaration in P32, and update ctxt->valid accordingly

validateDocument(self, doc)

source code 
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.

validateDtd(self, doc, dtd)

source code 
Try to validate the document against the dtd instance Basically it does check all the definitions in the DtD. Note the the internal subset (if present) is de-coupled (i.e. not used), which could give problems if ID or IDREF is present.

validateDtdFinal(self, doc)

source code 
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.

validateNotationUse(self, doc, notationName)

source code 
Validate that the given name match a notation declaration.
  • [ VC: Notation Declared ]

validateOneElement(self, doc, elem)

source code 
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