Gnome XML Library Reference Manual
<<< Previous Page | Home | Up | Next Page >>>

# valid

## Name

valid --

## Synopsis

    struct      xmlValidState;
    typedef     xmlValidStatePtr;
    void        (*xmlValidityErrorFunc)         (void *ctx,
                                                 const char *msg,
                                                 ...);
    void        (*xmlValidityWarningFunc)       (void *ctx,
                                                 const char *msg,
                                                 ...);
    struct      xmlValidCtxt;
    typedef     xmlValidCtxtPtr;
    typedef     xmlNotationTablePtr;
    typedef     xmlElementTablePtr;
    typedef     xmlAttributeTablePtr;
    typedef     xmlIDTablePtr;
    typedef     xmlRefTablePtr;
    xmlChar*    xmlSplitQName2                  (const xmlChar *name,
                                                 xmlChar **prefix);
    xmlNotationPtr xmlAddNotationDecl           (xmlValidCtxtPtr ctxt,
                                                 xmlDtdPtr dtd,
                                                 const xmlChar *name,
                                                 const xmlChar *PublicID,
                                                 const xmlChar *SystemID);
    xmlNotationTablePtr xmlCopyNotationTable    (xmlNotationTablePtr table);
    void        xmlFreeNotationTable            (xmlNotationTablePtr table);
    void        xmlDumpNotationDecl             (xmlBufferPtr buf,
                                                 xmlNotationPtr nota);
    void        xmlDumpNotationTable            (xmlBufferPtr buf,
                                                 xmlNotationTablePtr table);
    xmlElementContentPtr xmlNewElementContent   (xmlChar *name,
                                                 xmlElementContentType type);
    xmlElementContentPtr xmlCopyElementContent  (xmlElementContentPtr content);
    void        xmlFreeElementContent           (xmlElementContentPtr cur);
    void        xmlSnprintfElementContent       (char *buf,
                                                 int size,
                                                 xmlElementContentPtr content,
                                                 int glob);
    void        xmlSprintfElementContent        (char *buf,
                                                 xmlElementContentPtr content,
                                                 int glob);
    xmlElementPtr xmlAddElementDecl             (xmlValidCtxtPtr ctxt,
                                                 xmlDtdPtr dtd,
                                                 const xmlChar *name,
                                                 xmlElementTypeVal type,
                                                 xmlElementContentPtr content);
    xmlElementTablePtr xmlCopyElementTable      (xmlElementTablePtr table);
    void        xmlFreeElementTable             (xmlElementTablePtr table);
    void        xmlDumpElementTable             (xmlBufferPtr buf,
                                                 xmlElementTablePtr table);
    void        xmlDumpElementDecl              (xmlBufferPtr buf,
                                                 xmlElementPtr elem);
    xmlEnumerationPtr xmlCreateEnumeration      (xmlChar *name);
    void        xmlFreeEnumeration              (xmlEnumerationPtr cur);
    xmlEnumerationPtr xmlCopyEnumeration        (xmlEnumerationPtr cur);
    xmlAttributePtr xmlAddAttributeDecl         (xmlValidCtxtPtr ctxt,
                                                 xmlDtdPtr dtd,
                                                 const xmlChar *elem,
                                                 const xmlChar *name,
                                                 const xmlChar *ns,
                                                 xmlAttributeType type,
                                                 xmlAttributeDefault def,
                                                 const xmlChar *defaultValue,
                                                 xmlEnumerationPtr tree);
    xmlAttributeTablePtr xmlCopyAttributeTable  (xmlAttributeTablePtr table);
    void        xmlFreeAttributeTable           (xmlAttributeTablePtr table);
    void        xmlDumpAttributeTable           (xmlBufferPtr buf,
                                                 xmlAttributeTablePtr table);
    void        xmlDumpAttributeDecl            (xmlBufferPtr buf,
                                                 xmlAttributePtr attr);
    xmlIDPtr    xmlAddID                        (xmlValidCtxtPtr ctxt,
                                                 xmlDocPtr doc,
                                                 const xmlChar *value,
                                                 xmlAttrPtr attr);
    void        xmlFreeIDTable                  (xmlIDTablePtr table);
    xmlAttrPtr  xmlGetID                        (xmlDocPtr doc,
                                                 const xmlChar *ID);
    int         xmlIsID                         (xmlDocPtr doc,
                                                 xmlNodePtr elem,
                                                 xmlAttrPtr attr);
    int         xmlRemoveID                     (xmlDocPtr doc,
                                                 xmlAttrPtr attr);
    xmlRefPtr   xmlAddRef                       (xmlValidCtxtPtr ctxt,
                                                 xmlDocPtr doc,
                                                 const xmlChar *value,
                                                 xmlAttrPtr attr);
    void        xmlFreeRefTable                 (xmlRefTablePtr table);
    int         xmlIsRef                        (xmlDocPtr doc,
                                                 xmlNodePtr elem,
                                                 xmlAttrPtr attr);
    int         xmlRemoveRef                    (xmlDocPtr doc,
                                                 xmlAttrPtr attr);
    xmlListPtr  xmlGetRefs                      (xmlDocPtr doc,
                                                 const xmlChar *ID);
    int         xmlValidateRoot                 (xmlValidCtxtPtr ctxt,
                                                 xmlDocPtr doc);
    int         xmlValidateElementDecl          (xmlValidCtxtPtr ctxt,
                                                 xmlDocPtr doc,
                                                 xmlElementPtr elem);
    xmlChar*    xmlValidNormalizeAttributeValue (xmlDocPtr doc,
                                                 xmlNodePtr elem,
                                                 const xmlChar *name,
                                                 const xmlChar *value);
    xmlChar*    xmlValidCtxtNormalizeAttributeValue
                                                (xmlValidCtxtPtr ctxt,
                                                 xmlDocPtr doc,
                                                 xmlNodePtr elem,
                                                 const xmlChar *name,
                                                 const xmlChar *value);
    int         xmlValidateAttributeDecl        (xmlValidCtxtPtr ctxt,
                                                 xmlDocPtr doc,
                                                 xmlAttributePtr attr);
    int         xmlValidateAttributeValue       (xmlAttributeType type,
                                                 const xmlChar *value);
    int         xmlValidateNotationDecl         (xmlValidCtxtPtr ctxt,
                                                 xmlDocPtr doc,
                                                 xmlNotationPtr nota);
    int         xmlValidateDtd                  (xmlValidCtxtPtr ctxt,
                                                 xmlDocPtr doc,
                                                 xmlDtdPtr dtd);
    int         xmlValidateDtdFinal             (xmlValidCtxtPtr ctxt,
                                                 xmlDocPtr doc);
    int         xmlValidateDocument             (xmlValidCtxtPtr ctxt,
                                                 xmlDocPtr doc);
    int         xmlValidateElement              (xmlValidCtxtPtr ctxt,
                                                 xmlDocPtr doc,
                                                 xmlNodePtr elem);
    int         xmlValidateOneElement           (xmlValidCtxtPtr ctxt,
                                                 xmlDocPtr doc,
                                                 xmlNodePtr elem);
    int         xmlValidateOneAttribute         (xmlValidCtxtPtr ctxt,
                                                 xmlDocPtr doc,
                                                 xmlNodePtr elem,
                                                 xmlAttrPtr attr,
                                                 const xmlChar *value);
    int         xmlValidateOneNamespace         (xmlValidCtxtPtr ctxt,
                                                 xmlDocPtr doc,
                                                 xmlNodePtr elem,
                                                 const xmlChar *prefix,
                                                 xmlNsPtr ns,
                                                 const xmlChar *value);
    int         xmlValidateDocumentFinal        (xmlValidCtxtPtr ctxt,
                                                 xmlDocPtr doc);
    int         xmlValidateNotationUse          (xmlValidCtxtPtr ctxt,
                                                 xmlDocPtr doc,
                                                 const xmlChar *notationName);
    int         xmlIsMixedElement               (xmlDocPtr doc,
                                                 const xmlChar *name);
    xmlAttributePtr xmlGetDtdAttrDesc           (xmlDtdPtr dtd,
                                                 const xmlChar *elem,
                                                 const xmlChar *name);
    xmlAttributePtr xmlGetDtdQAttrDesc          (xmlDtdPtr dtd,
                                                 const xmlChar *elem,
                                                 const xmlChar *name,
                                                 const xmlChar *prefix);
    xmlNotationPtr xmlGetDtdNotationDesc        (xmlDtdPtr dtd,
                                                 const xmlChar *name);
    xmlElementPtr xmlGetDtdQElementDesc         (xmlDtdPtr dtd,
                                                 const xmlChar *name,
                                                 const xmlChar *prefix);
    xmlElementPtr xmlGetDtdElementDesc          (xmlDtdPtr dtd,
                                                 const xmlChar *name);
    int         xmlValidGetValidElements        (xmlNode *prev,
                                                 xmlNode *next,
                                                 const xmlChar **list,
                                                 int max);
    int         xmlValidGetPotentialChildren    (xmlElementContent *ctree,
                                                 const xmlChar **list,
                                                 int *len,
                                                 int max);
    int         xmlValidateNameValue            (const xmlChar *value);
    int         xmlValidateNamesValue           (const xmlChar *value);
    int         xmlValidateNmtokenValue         (const xmlChar *value);
    int         xmlValidateNmtokensValue        (const xmlChar *value);
    int         xmlValidBuildContentModel       (xmlValidCtxtPtr ctxt,
                                                 xmlElementPtr elem);
    int         xmlValidatePushElement          (xmlValidCtxtPtr ctxt,
                                                 xmlDocPtr doc,
                                                 xmlNodePtr elem,
                                                 const xmlChar *qname);
    int         xmlValidatePushCData            (xmlValidCtxtPtr ctxt,
                                                 const xmlChar *data,
                                                 int len);
    int         xmlValidatePopElement           (xmlValidCtxtPtr ctxt,
                                                 xmlDocPtr doc,
                                                 xmlNodePtr elem,
                                                 const xmlChar *qname);

## Description

## Details

### struct xmlValidState

    struct xmlValidState;

### xmlValidStatePtr

### xmlValidityErrorFunc ()

    void        (*xmlValidityErrorFunc)         (void *ctx,
                                                 const char *msg,
                                                 ...);

Callback called when a validity error is found. This is a message oriented function similar to an *printf function.

`ctx` : |
`msg` : |
`...` : |

### xmlValidityWarningFunc ()

    void        (*xmlValidityWarningFunc)       (void *ctx,
                                                 const char *msg,
                                                 ...);

Callback called when a validity warning is found. This is a message oriented function similar to an *printf function.

`ctx` : |
`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 */

        /* state state used for non-determinist content validation */
        xmlValidState     *vstate;        /* current state */
        int                vstateNr;      /* Depth of the validation stack */
        int                vstateMax;     /* Max depth of the validation stack */
        xmlValidState     *vstateTab;     /* array of validation states */

    #ifdef LIBXML_REGEXP_ENABLED
        xmlAutomataPtr            am;     /* the automata */
        xmlAutomataStatePtr    state;     /* used to build the automata */
    #else
        void                     *am;
        void                  *state;
    #endif
    };

### xmlValidCtxtPtr

### xmlNotationTablePtr

### xmlElementTablePtr

### xmlAttributeTablePtr

### xmlIDTablePtr

### xmlRefTablePtr

### xmlSplitQName2 ()

    xmlChar*    xmlSplitQName2                  (const xmlChar *name,
                                                 xmlChar **prefix);

parse an XML qualified name string

[NS 5] QName ::= (Prefix ':')? LocalPart

[NS 6] Prefix ::= NCName

[NS 7] LocalPart ::= NCName

`name` : |
`prefix` : |
Returns : |

### xmlAddNotationDecl ()

    xmlNotationPtr xmlAddNotationDecl           (xmlValidCtxtPtr ctxt,
                                                 xmlDtdPtr dtd,
                                                 const xmlChar *name,
                                                 const xmlChar *PublicID,
                                                 const xmlChar *SystemID);

Register a new notation declaration

`ctxt` : |
`dtd` : |
`name` : |
`PublicID` : |
`SystemID` : |
Returns : |

### xmlCopyNotationTable ()

    xmlNotationTablePtr xmlCopyNotationTable    (xmlNotationTablePtr table);

Build a copy of a notation table.

`table` : |
Returns : |

### xmlFreeNotationTable ()

    void        xmlFreeNotationTable            (xmlNotationTablePtr table);

Deallocate the memory used by an entities hash table.

`table` : |

### xmlDumpNotationDecl ()

    void        xmlDumpNotationDecl             (xmlBufferPtr buf,
                                                 xmlNotationPtr nota);

This will dump the content the notation declaration as an XML DTD definition

`buf` : |
`nota` : |

### xmlDumpNotationTable ()

    void        xmlDumpNotationTable            (xmlBufferPtr buf,
                                                 xmlNotationTablePtr table);

This will dump the content of the notation table as an XML DTD definition

`buf` : |
`table` : |

### xmlNewElementContent ()

    xmlElementContentPtr xmlNewElementContent   (xmlChar *name,
                                                 xmlElementContentType type);

Allocate an element content structure.

`name` : |
`type` : |
Returns : |

### xmlCopyElementContent ()

    xmlElementContentPtr xmlCopyElementContent  (xmlElementContentPtr content);

Build a copy of an element content description.

`content` : |
Returns : |

### xmlFreeElementContent ()

    void        xmlFreeElementContent           (xmlElementContentPtr cur);

Free an element content structure. This is a recursive call !

`cur` : |

### xmlSnprintfElementContent ()

    void        xmlSnprintfElementContent       (char *buf,
                                                 int size,
                                                 xmlElementContentPtr content,
                                                 int glob);

This will dump the content of the element content definition Intended just for the debug routine

`buf` : |
`size` : |
`content` : |
`glob` : |

### xmlSprintfElementContent ()

    void        xmlSprintfElementContent        (char *buf,
                                                 xmlElementContentPtr content,
                                                 int glob);

Deprecated, unsafe, use xmlSnprintfElementContent

`buf` : |
`content` : |
`glob` : |

### xmlAddElementDecl ()

    xmlElementPtr xmlAddElementDecl             (xmlValidCtxtPtr ctxt,
                                                 xmlDtdPtr dtd,
                                                 const xmlChar *name,
                                                 xmlElementTypeVal type,
                                                 xmlElementContentPtr content);

Register a new element declaration

`ctxt` : |
`dtd` : |
`name` : |
`type` : |
`content` : |
Returns : |

### xmlCopyElementTable ()

    xmlElementTablePtr xmlCopyElementTable      (xmlElementTablePtr table);

Build a copy of an element table.

`table` : |
Returns : |

### xmlFreeElementTable ()

    void        xmlFreeElementTable             (xmlElementTablePtr table);

Deallocate the memory used by an element hash table.

`table` : |

### xmlDumpElementTable ()

    void        xmlDumpElementTable             (xmlBufferPtr buf,
                                                 xmlElementTablePtr table);

This will dump the content of the element table as an XML DTD definition

`buf` : |
`table` : |

### xmlDumpElementDecl ()

    void        xmlDumpElementDecl              (xmlBufferPtr buf,
                                                 xmlElementPtr elem);

This will dump the content of the element declaration as an XML DTD definition

`buf` : |
`elem` : |

### xmlCreateEnumeration ()

    xmlEnumerationPtr xmlCreateEnumeration      (xmlChar *name);

create and initialize an enumeration attribute node.

`name` : |
Returns : |

### xmlFreeEnumeration ()

    void        xmlFreeEnumeration              (xmlEnumerationPtr cur);

free an enumeration attribute node (recursive).

`cur` : |

### xmlCopyEnumeration ()

    xmlEnumerationPtr xmlCopyEnumeration        (xmlEnumerationPtr cur);

Copy an enumeration attribute node (recursive).

`cur` : |
Returns : |

### xmlAddAttributeDecl ()

    xmlAttributePtr xmlAddAttributeDecl         (xmlValidCtxtPtr ctxt,
                                                 xmlDtdPtr dtd,
                                                 const xmlChar *elem,
                                                 const xmlChar *name,
                                                 const xmlChar *ns,
                                                 xmlAttributeType type,
                                                 xmlAttributeDefault def,
                                                 const xmlChar *defaultValue,
                                                 xmlEnumerationPtr tree);

Register a new attribute declaration Note that `tree` becomes the ownership of the DTD

`ctxt` : |
`dtd` : |
`elem` : |
`name` : |
`ns` : |
`type` : |
`def` : |
`defaultValue` : |
`tree` : |
Returns : |

### xmlCopyAttributeTable ()

    xmlAttributeTablePtr xmlCopyAttributeTable  (xmlAttributeTablePtr table);

Build a copy of an attribute table.

`table` : |
Returns : |

### xmlFreeAttributeTable ()

    void        xmlFreeAttributeTable           (xmlAttributeTablePtr table);

Deallocate the memory used by an entities hash table.

`table` : |

### xmlDumpAttributeTable ()

    void        xmlDumpAttributeTable           (xmlBufferPtr buf,
                                                 xmlAttributeTablePtr table);

This will dump the content of the attribute table as an XML DTD definition

`buf` : |
`table` : |

### xmlDumpAttributeDecl ()

    void        xmlDumpAttributeDecl            (xmlBufferPtr buf,
                                                 xmlAttributePtr attr);

This will dump the content of the attribute declaration as an XML DTD definition

`buf` : |
`attr` : |

### xmlAddID ()

    xmlIDPtr    xmlAddID                        (xmlValidCtxtPtr ctxt,
                                                 xmlDocPtr doc,
                                                 const xmlChar *value,
                                                 xmlAttrPtr attr);

Register a new id declaration

`ctxt` : |
`doc` : |
`value` : |
`attr` : |
Returns : |

### xmlFreeIDTable ()

    void        xmlFreeIDTable                  (xmlIDTablePtr table);

Deallocate the memory used by an ID hash table.

`table` : |

### xmlGetID ()

    xmlAttrPtr  xmlGetID                        (xmlDocPtr doc,
                                                 const xmlChar *ID);

Search the attribute declaring the given ID

`doc` : |
`ID` : |
Returns : |

### xmlIsID ()

    int         xmlIsID                         (xmlDocPtr doc,
                                                 xmlNodePtr elem,
                                                 xmlAttrPtr attr);

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.

`doc` : |
`elem` : |
`attr` : |
Returns : |

### xmlRemoveID ()

    int         xmlRemoveID                     (xmlDocPtr doc,
                                                 xmlAttrPtr attr);

Remove the given attribute from the ID table maintained internally.

`doc` : |
`attr` : |
Returns : |

### xmlAddRef ()

    xmlRefPtr   xmlAddRef                       (xmlValidCtxtPtr ctxt,
                                                 xmlDocPtr doc,
                                                 const xmlChar *value,
                                                 xmlAttrPtr attr);

Register a new ref declaration

`ctxt` : |
`doc` : |
`value` : |
`attr` : |
Returns : |

### xmlFreeRefTable ()

    void        xmlFreeRefTable                 (xmlRefTablePtr table);

Deallocate the memory used by an Ref hash table.

`table` : |

### xmlIsRef ()

    int         xmlIsRef                        (xmlDocPtr doc,
                                                 xmlNodePtr elem,
                                                 xmlAttrPtr attr);

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).

`doc` : |
`elem` : |
`attr` : |
Returns : |

### xmlRemoveRef ()

    int         xmlRemoveRef                    (xmlDocPtr doc,
                                                 xmlAttrPtr attr);

Remove the given attribute from the Ref table maintained internally.

`doc` : |
`attr` : |
Returns : |

### xmlGetRefs ()

    xmlListPtr  xmlGetRefs                      (xmlDocPtr doc,
                                                 const xmlChar *ID);

Find the set of references for the supplied ID.

`doc` : |
`ID` : |
Returns : |

### xmlValidateRoot ()

    int         xmlValidateRoot                 (xmlValidCtxtPtr ctxt,
                                                 xmlDocPtr 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

`ctxt` : |
`doc` : |
Returns : |

### xmlValidateElementDecl ()

    int         xmlValidateElementDecl          (xmlValidCtxtPtr ctxt,
                                                 xmlDocPtr doc,
                                                 xmlElementPtr elem);

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 ]

`ctxt` : |
`doc` : |
`elem` : |
Returns : |

### xmlValidNormalizeAttributeValue ()

    xmlChar*    xmlValidNormalizeAttributeValue (xmlDocPtr doc,
                                                 xmlNodePtr elem,
                                                 const xmlChar *name,
                                                 const xmlChar *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.

`doc` : |
`elem` : |
`name` : |
`value` : |
Returns : |

### xmlValidCtxtNormalizeAttributeValue ()

    xmlChar*    xmlValidCtxtNormalizeAttributeValue
                                                (xmlValidCtxtPtr ctxt,
                                                 xmlDocPtr doc,
                                                 xmlNodePtr elem,
                                                 const xmlChar *name,
                                                 const xmlChar *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.

Also check VC: Standalone Document Declaration in P32, and update ctxt->valid accordingly

`ctxt` : | the validation context or NULL
`doc` : |
`elem` : |
`name` : |
`value` : |
Returns : |

### xmlValidateAttributeDecl ()

    int         xmlValidateAttributeDecl        (xmlValidCtxtPtr ctxt,
                                                 xmlDocPtr doc,
                                                 xmlAttributePtr attr);

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

`ctxt` : |
`doc` : |
`attr` : |
Returns : |

### xmlValidateAttributeValue ()

    int         xmlValidateAttributeValue       (xmlAttributeType type,
                                                 const xmlChar *value);

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.

`type` : |
`value` : |
Returns : |

### xmlValidateNotationDecl ()

    int         xmlValidateNotationDecl         (xmlValidCtxtPtr ctxt,
                                                 xmlDocPtr doc,
                                                 xmlNotationPtr nota);

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 constraint exists on notation declarations But this function get called anyway ...

`ctxt` : |
`doc` : |
`nota` : |
Returns : |

### xmlValidateDtd ()

    int         xmlValidateDtd                  (xmlValidCtxtPtr ctxt,
                                                 xmlDocPtr doc,
                                                 xmlDtdPtr dtd);

Try to validate the document against the dtd instance

basically it does check all the definitions in the DtD.

`ctxt` : |
`doc` : |
`dtd` : |
Returns : |

### xmlValidateDtdFinal ()

    int         xmlValidateDtdFinal             (xmlValidCtxtPtr ctxt,
                                                 xmlDocPtr 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. - check that NOTATION type attributes default or possible values matches one of the defined notations.

`ctxt` : |
`doc` : |
Returns : |

### xmlValidateDocument ()

    int         xmlValidateDocument             (xmlValidCtxtPtr ctxt,
                                                 xmlDocPtr doc);

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.

`ctxt` : |
`doc` : |
Returns : |

### xmlValidateElement ()

    int         xmlValidateElement              (xmlValidCtxtPtr ctxt,
                                                 xmlDocPtr doc,
                                                 xmlNodePtr elem);

Try to validate the subtree under an element

`ctxt` : |
`doc` : |
`elem` : |
Returns : |

### xmlValidateOneElement ()

    int         xmlValidateOneElement           (xmlValidCtxtPtr ctxt,
                                                 xmlDocPtr doc,
                                                 xmlNodePtr 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.

The ID/IDREF checkings are done separately

`ctxt` : |
`doc` : |
`elem` : |
Returns : |

### xmlValidateOneAttribute ()

    int         xmlValidateOneAttribute         (xmlValidCtxtPtr ctxt,
                                                 xmlDocPtr doc,
                                                 xmlNodePtr elem,
                                                 xmlAttrPtr attr,
                                                 const xmlChar *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

`ctxt` : |
`doc` : |
`elem` : |
`attr` : |
`value` : |
Returns : |

### xmlValidateOneNamespace ()

    int         xmlValidateOneNamespace         (xmlValidCtxtPtr ctxt,
                                                 xmlDocPtr doc,
                                                 xmlNodePtr elem,
                                                 const xmlChar *prefix,
                                                 xmlNsPtr ns,
                                                 const xmlChar *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

`ctxt` : |
`doc` : |
`elem` : |
`prefix` : |
`ns` : |
`value` : |
Returns : |

### xmlValidateDocumentFinal ()

    int         xmlValidateDocumentFinal        (xmlValidCtxtPtr ctxt,
                                                 xmlDocPtr 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

`ctxt` : |
`doc` : |
Returns : |

### xmlValidateNotationUse ()

    int         xmlValidateNotationUse          (xmlValidCtxtPtr ctxt,
                                                 xmlDocPtr doc,
                                                 const xmlChar *notationName);

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

`ctxt` : |
`doc` : |
`notationName` : |
Returns : |

### xmlIsMixedElement ()

    int         xmlIsMixedElement               (xmlDocPtr doc,
                                                 const xmlChar *name);

Search in the DtDs whether an element accept Mixed content (or ANY) basically if it is supposed to accept text childs

`doc` : |
`name` : |
Returns : |

### xmlGetDtdAttrDesc ()

    xmlAttributePtr xmlGetDtdAttrDesc           (xmlDtdPtr dtd,
                                                 const xmlChar *elem,
                                                 const xmlChar *name);

Search the DTD for the description of this attribute on this element.

`dtd` : |
`elem` : |
`name` : |
Returns : |

### xmlGetDtdQAttrDesc ()

    xmlAttributePtr xmlGetDtdQAttrDesc          (xmlDtdPtr dtd,
                                                 const xmlChar *elem,
                                                 const xmlChar *name,
                                                 const xmlChar *prefix);

Search the DTD for the description of this qualified attribute on this element.

`dtd` : |
`elem` : |
`name` : |
`prefix` : |
Returns : |

### xmlGetDtdNotationDesc ()

    xmlNotationPtr xmlGetDtdNotationDesc        (xmlDtdPtr dtd,
                                                 const xmlChar *name);

Search the DTD for the description of this notation

`dtd` : |
`name` : |
Returns : |

### xmlGetDtdQElementDesc ()

    xmlElementPtr xmlGetDtdQElementDesc         (xmlDtdPtr dtd,
                                                 const xmlChar *name,
                                                 const xmlChar *prefix);

Search the DTD for the description of this element

`dtd` : |
`name` : |
`prefix` : |
Returns : |

### xmlGetDtdElementDesc ()

    xmlElementPtr xmlGetDtdElementDesc          (xmlDtdPtr dtd,
                                                 const xmlChar *name);

Search the DTD for the description of this element

`dtd` : |
`name` : |
Returns : |

### xmlValidGetValidElements ()

    int         xmlValidGetValidElements        (xmlNode *prev,
                                                 xmlNode *next,
                                                 const xmlChar **list,
                                                 int max);

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.

`prev` : |
`next` : |
`list` : |
`max` : |
Returns : |

### xmlValidGetPotentialChildren ()

    int         xmlValidGetPotentialChildren    (xmlElementContent *ctree,
                                                 const xmlChar **list,
                                                 int *len,
                                                 int max);

Build/extend a list of potential children allowed by the content tree

`ctree` : |
`list` : |
`len` : |
`max` : |
Returns : |

### xmlValidateNameValue ()

    int         xmlValidateNameValue            (const xmlChar *value);

Validate that the given value match Name production

`value` : |
Returns : |

### xmlValidateNamesValue ()

    int         xmlValidateNamesValue           (const xmlChar *value);

Validate that the given value match Names production

`value` : |
Returns : |

### xmlValidateNmtokenValue ()

    int         xmlValidateNmtokenValue         (const xmlChar *value);

Validate that the given value match Nmtoken production

[ VC: Name Token ]

`value` : |
Returns : |

### xmlValidateNmtokensValue ()

    int         xmlValidateNmtokensValue        (const xmlChar *value);

Validate that the given value match Nmtokens production

[ VC: Name Token ]

`value` : |
Returns : |

### xmlValidBuildContentModel ()

    int         xmlValidBuildContentModel       (xmlValidCtxtPtr ctxt,
                                                 xmlElementPtr elem);

(Re)Build the automata associated to the content model of this element

`ctxt` : |
`elem` : |
Returns : |

### xmlValidatePushElement ()

    int         xmlValidatePushElement          (xmlValidCtxtPtr ctxt,
                                                 xmlDocPtr doc,
                                                 xmlNodePtr elem,
                                                 const xmlChar *qname);

Push a new element start on the validation stack.

`ctxt` : |
`doc` : |
`elem` : |
`qname` : |
Returns : |

### xmlValidatePushCData ()

    int         xmlValidatePushCData            (xmlValidCtxtPtr ctxt,
                                                 const xmlChar *data,
                                                 int len);

check the CData parsed for validation in the current stack

`ctxt` : |
`data` : |
`len` : |
Returns : |

### xmlValidatePopElement ()

    int         xmlValidatePopElement           (xmlValidCtxtPtr ctxt,
                                                 xmlDocPtr doc,
                                                 xmlNodePtr elem,
                                                 const xmlChar *qname);

Pop the element end from the validation stack.

`ctxt` : |
`doc` : |
`elem` : |
`qname` : |
Returns : |

<<< Previous Page | Home | Up | Next Page >>>
entities | relaxng