Blame doc/devhelp/libxml2-valid.html

Packit 423ecb
Packit 423ecb
<html>
Packit 423ecb
  <head>
Packit 423ecb
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
Packit 423ecb
    <title>valid: The DTD validation</title>
Packit 423ecb
    <meta name="generator" content="Libxml2 devhelp stylesheet"/>
Packit 423ecb
    <link rel="start" href="index.html" title="libxml2 Reference Manual"/>
Packit 423ecb
    <link rel="up" href="general.html" title="API"/>
Packit 423ecb
    <link rel="stylesheet" href="style.css" type="text/css"/>
Packit 423ecb
    <link rel="chapter" href="general.html" title="API"/>
Packit 423ecb
  </head>
Packit 423ecb
  <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
Packit 423ecb
    
Packit 423ecb
      
Packit 423ecb
        
Packit 423ecb
          
Packit 423ecb
            Prev
Packit 423ecb
          
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb
          
Packit 423ecb
            Up
Packit 423ecb
          
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb
          
Packit 423ecb
            Home
Packit 423ecb
          
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb
          
Packit 423ecb
            Next
Packit 423ecb
          
Packit 423ecb
        
Packit 423ecb
        libxml2 Reference Manual
Packit 423ecb
      
Packit 423ecb
    
Packit 423ecb
    

Packit 423ecb
      valid
Packit 423ecb
    
Packit 423ecb
    

valid - The DTD validation

Packit 423ecb
    

API for the DTD handling and the validity checking

Packit 423ecb
    

Author(s): Daniel Veillard

Packit 423ecb
    
Packit 423ecb
      

Synopsis

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

Description

Packit 423ecb
    
Packit 423ecb
    
Packit 423ecb
      

Details

Packit 423ecb
      
Packit 423ecb
        

Macro XML_CTXT_FINISH_DTD_0

#define XML_CTXT_FINISH_DTD_0;
Packit 423ecb

Special value for finishDtd field when embedded in an xmlParserCtxt

Packit 423ecb
Packit 423ecb
        
Packit 423ecb
        

Macro XML_CTXT_FINISH_DTD_1

#define XML_CTXT_FINISH_DTD_1;
Packit 423ecb

Special value for finishDtd field when embedded in an xmlParserCtxt

Packit 423ecb
Packit 423ecb
        
Packit 423ecb
        

Structure xmlAttributeTable

struct _xmlHashTable {
Packit 423ecb
The content of this structure is not made public by the API.
Packit 423ecb
} xmlAttributeTable;
Packit 423ecb

Packit 423ecb
Packit 423ecb
        
Packit 423ecb
        

Typedef xmlAttributeTablePtr

xmlAttributeTable * xmlAttributeTablePtr;
Packit 423ecb

Packit 423ecb
Packit 423ecb
        
Packit 423ecb
        

Structure xmlElementTable

struct _xmlHashTable {
Packit 423ecb
The content of this structure is not made public by the API.
Packit 423ecb
} xmlElementTable;
Packit 423ecb

Packit 423ecb
Packit 423ecb
        
Packit 423ecb
        

Typedef xmlElementTablePtr

xmlElementTable * xmlElementTablePtr;
Packit 423ecb

Packit 423ecb
Packit 423ecb
        
Packit 423ecb
        

Structure xmlIDTable

struct _xmlHashTable {
Packit 423ecb
The content of this structure is not made public by the API.
Packit 423ecb
} xmlIDTable;
Packit 423ecb

Packit 423ecb
Packit 423ecb
        
Packit 423ecb
        

Typedef xmlIDTablePtr

xmlIDTable * xmlIDTablePtr;
Packit 423ecb

Packit 423ecb
Packit 423ecb
        
Packit 423ecb
        

Structure xmlNotationTable

struct _xmlHashTable {
Packit 423ecb
The content of this structure is not made public by the API.
Packit 423ecb
} xmlNotationTable;
Packit 423ecb

Packit 423ecb
Packit 423ecb
        
Packit 423ecb
        

Typedef xmlNotationTablePtr

xmlNotationTable * xmlNotationTablePtr;
Packit 423ecb

Packit 423ecb
Packit 423ecb
        
Packit 423ecb
        

Structure xmlRefTable

struct _xmlHashTable {
Packit 423ecb
The content of this structure is not made public by the API.
Packit 423ecb
} xmlRefTable;
Packit 423ecb

Packit 423ecb
Packit 423ecb
        
Packit 423ecb
        

Typedef xmlRefTablePtr

xmlRefTable * xmlRefTablePtr;
Packit 423ecb

Packit 423ecb
Packit 423ecb
        
Packit 423ecb
        

Structure xmlValidCtxt

struct _xmlValidCtxt {
Packit 423ecb
    void *	userData	: user specific data block
Packit 423ecb
    xmlValidityErrorFunc	error	: the callback in case of errors
Packit 423ecb
    xmlValidityWarningFunc	warning	: the callback in case of warning Node analysis stack used when validat
Packit 423ecb
    xmlNodePtr	node	: Current parsed Node
Packit 423ecb
    int	nodeNr	: Depth of the parsing stack
Packit 423ecb
    int	nodeMax	: Max depth of the parsing stack
Packit 423ecb
    xmlNodePtr *	nodeTab	: array of nodes
Packit 423ecb
    unsigned int	finishDtd	: finished validating the Dtd ?
Packit 423ecb
    xmlDocPtr	doc	: the document
Packit 423ecb
    int	valid	: temporary validity check result state state used for non-determinist
Packit 423ecb
    xmlValidState *	vstate	: current state
Packit 423ecb
    int	vstateNr	: Depth of the validation stack
Packit 423ecb
    int	vstateMax	: Max depth of the validation stack
Packit 423ecb
    xmlValidState *	vstateTab	: array of validation states
Packit 423ecb
    xmlAutomataPtr	am	: the automata
Packit 423ecb
    xmlAutomataStatePtr	state	: used to build the automata
Packit 423ecb
    void *	am
Packit 423ecb
    void *	state
Packit 423ecb
} xmlValidCtxt;
Packit 423ecb

Packit 423ecb
Packit 423ecb
        
Packit 423ecb
        

Typedef xmlValidCtxtPtr

xmlValidCtxt * xmlValidCtxtPtr;
Packit 423ecb

Packit 423ecb
Packit 423ecb
        
Packit 423ecb
        

Structure xmlValidState

struct _xmlValidState {
Packit 423ecb
The content of this structure is not made public by the API.
Packit 423ecb
} xmlValidState;
Packit 423ecb

Packit 423ecb
Packit 423ecb
        
Packit 423ecb
        

Typedef xmlValidStatePtr

xmlValidState * xmlValidStatePtr;
Packit 423ecb

Packit 423ecb
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb

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

Packit 423ecb
<tt>ctx</tt>:usually an xmlValidCtxtPtr to a validity error context, but comes from ctxt->userData (which normally contains such a pointer); ctxt->userData can be changed by the user.
<tt>msg</tt>:the string to format *printf like vararg
<tt>...</tt>:remaining arguments to the format
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb

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

Packit 423ecb
<tt>ctx</tt>:usually an xmlValidCtxtPtr to a validity error context, but comes from ctxt->userData (which normally contains such a pointer); ctxt->userData can be changed by the user.
<tt>msg</tt>:the string to format *printf like vararg
<tt>...</tt>:remaining arguments to the format
Packit 423ecb
        
Packit 423ecb
        

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)
Packit 423ecb

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

Packit 423ecb
<tt>ctxt</tt>:the validation context
<tt>dtd</tt>:pointer to the DTD
<tt>elem</tt>:the element name
<tt>name</tt>:the attribute name
<tt>ns</tt>:the attribute namespace prefix
<tt>type</tt>:the attribute type
<tt>def</tt>:the attribute default type
<tt>defaultValue</tt>:the attribute default value
<tt>tree</tt>:if it's an enumeration, the associated list
<tt>Returns</tt>:NULL if not new, otherwise the attribute decl
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb

Register a new element declaration

Packit 423ecb
<tt>ctxt</tt>:the validation context
<tt>dtd</tt>:pointer to the DTD
<tt>name</tt>:the entity name
<tt>type</tt>:the element type
<tt>content</tt>:the element content tree or NULL
<tt>Returns</tt>:NULL if not, otherwise the entity
Packit 423ecb
        
Packit 423ecb
        

xmlAddID ()

xmlIDPtr	xmlAddID		(xmlValidCtxtPtr ctxt, 
xmlDocPtr doc,
const xmlChar * value,
xmlAttrPtr attr)
Packit 423ecb

Register a new id declaration

Packit 423ecb
<tt>ctxt</tt>:the validation context
<tt>doc</tt>:pointer to the document
<tt>value</tt>:the value name
<tt>attr</tt>:the attribute holding the ID
<tt>Returns</tt>:NULL if not, otherwise the new xmlIDPtr
Packit 423ecb
        
Packit 423ecb
        

xmlAddNotationDecl ()

xmlNotationPtr	xmlAddNotationDecl	(xmlValidCtxtPtr ctxt, 
xmlDtdPtr dtd,
const xmlChar * name,
const xmlChar * PublicID,
const xmlChar * SystemID)
Packit 423ecb

Register a new notation declaration

Packit 423ecb
<tt>ctxt</tt>:the validation context
<tt>dtd</tt>:pointer to the DTD
<tt>name</tt>:the entity name
<tt>PublicID</tt>:the public identifier or NULL
<tt>SystemID</tt>:the system identifier or NULL
<tt>Returns</tt>:NULL if not, otherwise the entity
Packit 423ecb
        
Packit 423ecb
        

xmlAddRef ()

xmlRefPtr	xmlAddRef		(xmlValidCtxtPtr ctxt, 
xmlDocPtr doc,
const xmlChar * value,
xmlAttrPtr attr)
Packit 423ecb

Register a new ref declaration

Packit 423ecb
<tt>ctxt</tt>:the validation context
<tt>doc</tt>:pointer to the document
<tt>value</tt>:the value name
<tt>attr</tt>:the attribute holding the Ref
<tt>Returns</tt>:NULL if not, otherwise the new xmlRefPtr
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb

Build a copy of an attribute table.

Packit 423ecb
<tt>table</tt>:An attribute table
<tt>Returns</tt>:the new xmlAttributeTablePtr or NULL in case of error.
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb

Build a copy of an element content description.

Packit 423ecb
<tt>doc</tt>:the document owning the element declaration
<tt>cur</tt>:An element content pointer.
<tt>Returns</tt>:the new xmlElementContentPtr or NULL in case of error.
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb

Build a copy of an element content description. Deprecated, use xmlCopyDocElementContent instead

Packit 423ecb
<tt>cur</tt>:An element content pointer.
<tt>Returns</tt>:the new xmlElementContentPtr or NULL in case of error.
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb

Build a copy of an element table.

Packit 423ecb
<tt>table</tt>:An element table
<tt>Returns</tt>:the new xmlElementTablePtr or NULL in case of error.
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb

Copy an enumeration attribute node (recursive).

Packit 423ecb
<tt>cur</tt>:the tree to copy.
<tt>Returns</tt>:the xmlEnumerationPtr just created or NULL in case of error.
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb

Build a copy of a notation table.

Packit 423ecb
<tt>table</tt>:A notation table
<tt>Returns</tt>:the new xmlNotationTablePtr or NULL in case of error.
Packit 423ecb
        
Packit 423ecb
        

xmlCreateEnumeration ()

xmlEnumerationPtr	xmlCreateEnumeration	(const xmlChar * name)
Packit 423ecb

create and initialize an enumeration attribute node.

Packit 423ecb
<tt>name</tt>:the enumeration name or NULL
<tt>Returns</tt>:the xmlEnumerationPtr just created or NULL in case of error.
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb

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

Packit 423ecb
<tt>buf</tt>:the XML buffer output
<tt>attr</tt>:An attribute declaration
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb

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

Packit 423ecb
<tt>buf</tt>:the XML buffer output
<tt>table</tt>:An attribute table
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb

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

Packit 423ecb
<tt>buf</tt>:the XML buffer output
<tt>elem</tt>:An element table
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb

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

Packit 423ecb
<tt>buf</tt>:the XML buffer output
<tt>table</tt>:An element table
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb

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

Packit 423ecb
<tt>buf</tt>:the XML buffer output
<tt>nota</tt>:A notation declaration
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb

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

Packit 423ecb
<tt>buf</tt>:the XML buffer output
<tt>table</tt>:A notation table
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb

Deallocate the memory used by an entities hash table.

Packit 423ecb
<tt>table</tt>:An attribute table
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb

Free an element content structure. The whole subtree is removed.

Packit 423ecb
<tt>doc</tt>:the document owning the element declaration
<tt>cur</tt>:the element content tree to free
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb

Free an element content structure. The whole subtree is removed. Deprecated, use xmlFreeDocElementContent instead

Packit 423ecb
<tt>cur</tt>:the element content tree to free
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb

Deallocate the memory used by an element hash table.

Packit 423ecb
<tt>table</tt>:An element table
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb

free an enumeration attribute node (recursive).

Packit 423ecb
<tt>cur</tt>:the tree to free.
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb

Deallocate the memory used by an ID hash table.

Packit 423ecb
<tt>table</tt>:An id table
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb

Deallocate the memory used by an entities hash table.

Packit 423ecb
<tt>table</tt>:An notation table
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb

Deallocate the memory used by an Ref hash table.

Packit 423ecb
<tt>table</tt>:An ref table
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb

Free a validation context structure.

Packit 423ecb
<tt>cur</tt>:the validation context to free
Packit 423ecb
        
Packit 423ecb
        

xmlGetDtdAttrDesc ()

xmlAttributePtr	xmlGetDtdAttrDesc	(xmlDtdPtr dtd, 
const xmlChar * elem,
const xmlChar * name)
Packit 423ecb

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

Packit 423ecb
<tt>dtd</tt>:a pointer to the DtD to search
<tt>elem</tt>:the element name
<tt>name</tt>:the attribute name
<tt>Returns</tt>:the xmlAttributePtr if found or NULL
Packit 423ecb
        
Packit 423ecb
        

xmlGetDtdElementDesc ()

xmlElementPtr	xmlGetDtdElementDesc	(xmlDtdPtr dtd, 
const xmlChar * name)
Packit 423ecb

Search the DTD for the description of this element

Packit 423ecb
<tt>dtd</tt>:a pointer to the DtD to search
<tt>name</tt>:the element name
<tt>Returns</tt>:the xmlElementPtr if found or NULL
Packit 423ecb
        
Packit 423ecb
        

xmlGetDtdNotationDesc ()

xmlNotationPtr	xmlGetDtdNotationDesc	(xmlDtdPtr dtd, 
const xmlChar * name)
Packit 423ecb

Search the DTD for the description of this notation

Packit 423ecb
<tt>dtd</tt>:a pointer to the DtD to search
<tt>name</tt>:the notation name
<tt>Returns</tt>:the xmlNotationPtr if found or NULL
Packit 423ecb
        
Packit 423ecb
        

xmlGetDtdQAttrDesc ()

xmlAttributePtr	xmlGetDtdQAttrDesc	(xmlDtdPtr dtd, 
const xmlChar * elem,
const xmlChar * name,
const xmlChar * prefix)
Packit 423ecb

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

Packit 423ecb
<tt>dtd</tt>:a pointer to the DtD to search
<tt>elem</tt>:the element name
<tt>name</tt>:the attribute name
<tt>prefix</tt>:the attribute namespace prefix
<tt>Returns</tt>:the xmlAttributePtr if found or NULL
Packit 423ecb
        
Packit 423ecb
        

xmlGetDtdQElementDesc ()

xmlElementPtr	xmlGetDtdQElementDesc	(xmlDtdPtr dtd, 
const xmlChar * name,
const xmlChar * prefix)
Packit 423ecb

Search the DTD for the description of this element

Packit 423ecb
<tt>dtd</tt>:a pointer to the DtD to search
<tt>name</tt>:the element name
<tt>prefix</tt>:the element namespace prefix
<tt>Returns</tt>:the xmlElementPtr if found or NULL
Packit 423ecb
        
Packit 423ecb
        

xmlGetID ()

xmlAttrPtr	xmlGetID		(xmlDocPtr doc, 
const xmlChar * ID)
Packit 423ecb

Search the attribute declaring the given ID

Packit 423ecb
<tt>doc</tt>:pointer to the document
<tt>ID</tt>:the ID value
<tt>Returns</tt>:NULL if not found, otherwise the xmlAttrPtr defining the ID
Packit 423ecb
        
Packit 423ecb
        

xmlGetRefs ()

xmlListPtr	xmlGetRefs		(xmlDocPtr doc, 
const xmlChar * ID)
Packit 423ecb

Find the set of references for the supplied ID.

Packit 423ecb
<tt>doc</tt>:pointer to the document
<tt>ID</tt>:the ID value
<tt>Returns</tt>:NULL if not found, otherwise node set for the ID.
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb

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.

Packit 423ecb
<tt>doc</tt>:the document
<tt>elem</tt>:the element carrying the attribute
<tt>attr</tt>:the attribute
<tt>Returns</tt>:0 or 1 depending on the lookup result
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb

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

Packit 423ecb
<tt>doc</tt>:the document
<tt>name</tt>:the element name
<tt>Returns</tt>:0 if no, 1 if yes, and -1 if no element description is available
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb

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

Packit 423ecb
<tt>doc</tt>:the document
<tt>elem</tt>:the element carrying the attribute
<tt>attr</tt>:the attribute
<tt>Returns</tt>:0 or 1 depending on the lookup result
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb

Allocate an element content structure for the document.

Packit 423ecb
<tt>doc</tt>:the document
<tt>name</tt>:the subelement name or NULL
<tt>type</tt>:the type of element content decl
<tt>Returns</tt>:NULL if not, otherwise the new element content structure
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb

Allocate an element content structure. Deprecated in favor of xmlNewDocElementContent

Packit 423ecb
<tt>name</tt>:the subelement name or NULL
<tt>type</tt>:the type of element content decl
<tt>Returns</tt>:NULL if not, otherwise the new element content structure
Packit 423ecb
        
Packit 423ecb
        

xmlNewValidCtxt ()

xmlValidCtxtPtr	xmlNewValidCtxt		(void)
Packit 423ecb

Allocate a validation context structure.

Packit 423ecb
<tt>Returns</tt>:NULL if not, otherwise the new validation context structure
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb

Remove the given attribute from the ID table maintained internally.

Packit 423ecb
<tt>doc</tt>:the document
<tt>attr</tt>:the attribute
<tt>Returns</tt>:-1 if the lookup failed and 0 otherwise
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb

Remove the given attribute from the Ref table maintained internally.

Packit 423ecb
<tt>doc</tt>:the document
<tt>attr</tt>:the attribute
<tt>Returns</tt>:-1 if the lookup failed and 0 otherwise
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb

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

Packit 423ecb
<tt>buf</tt>:an output buffer
<tt>size</tt>:the buffer size
<tt>content</tt>:An element table
<tt>englob</tt>:1 if one must print the englobing parenthesis, 0 otherwise
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb

Deprecated, unsafe, use xmlSnprintfElementContent

Packit 423ecb
<tt>buf</tt>:an output buffer
<tt>content</tt>:An element table
<tt>englob</tt>:1 if one must print the englobing parenthesis, 0 otherwise
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb

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

Packit 423ecb
<tt>ctxt</tt>:a validation context
<tt>elem</tt>:an element declaration node
<tt>Returns</tt>:1 in case of success, 0 in case of error
Packit 423ecb
        
Packit 423ecb
        

xmlValidCtxtNormalizeAttributeValue ()

xmlChar *	xmlValidCtxtNormalizeAttributeValue	(xmlValidCtxtPtr ctxt, 
xmlDocPtr doc,
xmlNodePtr elem,
const xmlChar * name,
const xmlChar * value)
Packit 423ecb

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

Packit 423ecb
<tt>ctxt</tt>:the validation context or NULL
<tt>doc</tt>:the document
<tt>elem</tt>:the parent
<tt>name</tt>:the attribute name
<tt>value</tt>:the attribute value
<tt>Returns</tt>:a new normalized string if normalization is needed, NULL otherwise the caller must free the returned value.
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb

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

Packit 423ecb
<tt>ctree</tt>:an element content tree
<tt>names</tt>:an array to store the list of child names
<tt>len</tt>:a pointer to the number of element in the list
<tt>max</tt>:the size of the array
<tt>Returns</tt>:the number of element in the list, or -1 in case of error.
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb

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.

Packit 423ecb
<tt>prev</tt>:an element to insert after
<tt>next</tt>:an element to insert next
<tt>names</tt>:an array to store the list of child names
<tt>max</tt>:the size of the array
<tt>Returns</tt>:the number of element in the list, or -1 in case of error. If the function returns the value @max the caller is invited to grow the receiving array and retry.
Packit 423ecb
        
Packit 423ecb
        

xmlValidNormalizeAttributeValue ()

xmlChar *	xmlValidNormalizeAttributeValue	(xmlDocPtr doc, 
xmlNodePtr elem,
const xmlChar * name,
const xmlChar * value)
Packit 423ecb

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.

Packit 423ecb
<tt>doc</tt>:the document
<tt>elem</tt>:the parent
<tt>name</tt>:the attribute name
<tt>value</tt>:the attribute value
<tt>Returns</tt>:a new normalized string if normalization is needed, NULL otherwise the caller must free the returned value.
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb

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

Packit 423ecb
<tt>ctxt</tt>:the validation context
<tt>doc</tt>:a document instance
<tt>attr</tt>:an attribute definition
<tt>Returns</tt>:1 if valid or 0 otherwise
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb

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.

Packit 423ecb
<tt>type</tt>:an attribute type
<tt>value</tt>:an attribute value
<tt>Returns</tt>:1 if valid or 0 otherwise
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb

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.

Packit 423ecb
<tt>ctxt</tt>:the validation context
<tt>doc</tt>:a document instance
<tt>Returns</tt>:1 if valid or 0 otherwise
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb

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

Packit 423ecb
<tt>ctxt</tt>:the validation context
<tt>doc</tt>:a document instance
<tt>Returns</tt>:1 if valid or 0 otherwise
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb

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.

Packit 423ecb
<tt>ctxt</tt>:the validation context
<tt>doc</tt>:a document instance
<tt>dtd</tt>:a dtd instance
<tt>Returns</tt>:1 if valid or 0 otherwise
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb

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.

Packit 423ecb
<tt>ctxt</tt>:the validation context
<tt>doc</tt>:a document instance
<tt>Returns</tt>:1 if valid or 0 if invalid and -1 if not well-formed
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb

Try to validate the subtree under an element

Packit 423ecb
<tt>ctxt</tt>:the validation context
<tt>doc</tt>:a document instance
<tt>elem</tt>:an element instance
<tt>Returns</tt>:1 if valid or 0 otherwise
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb

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 ]

Packit 423ecb
<tt>ctxt</tt>:the validation context
<tt>doc</tt>:a document instance
<tt>elem</tt>:an element definition
<tt>Returns</tt>:1 if valid or 0 otherwise
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb

Validate that the given value match Name production

Packit 423ecb
<tt>value</tt>:an Name value
<tt>Returns</tt>:1 if valid or 0 otherwise
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb

Validate that the given value match Names production

Packit 423ecb
<tt>value</tt>:an Names value
<tt>Returns</tt>:1 if valid or 0 otherwise
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb

Validate that the given value match Nmtoken production [ VC: Name Token ]

Packit 423ecb
<tt>value</tt>:an Nmtoken value
<tt>Returns</tt>:1 if valid or 0 otherwise
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb

Validate that the given value match Nmtokens production [ VC: Name Token ]

Packit 423ecb
<tt>value</tt>:an Nmtokens value
<tt>Returns</tt>:1 if valid or 0 otherwise
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb

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

Packit 423ecb
<tt>ctxt</tt>:the validation context
<tt>doc</tt>:a document instance
<tt>nota</tt>:a notation definition
<tt>Returns</tt>:1 if valid or 0 otherwise
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb

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

Packit 423ecb
<tt>ctxt</tt>:the validation context
<tt>doc</tt>:the document
<tt>notationName</tt>:the notation name to check
<tt>Returns</tt>:1 if valid or 0 otherwise
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb

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

Packit 423ecb
<tt>ctxt</tt>:the validation context
<tt>doc</tt>:a document instance
<tt>elem</tt>:an element instance
<tt>attr</tt>:an attribute instance
<tt>value</tt>:the attribute value (without entities processing)
<tt>Returns</tt>:1 if valid or 0 otherwise
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb

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

Packit 423ecb
<tt>ctxt</tt>:the validation context
<tt>doc</tt>:a document instance
<tt>elem</tt>:an element instance
<tt>Returns</tt>:1 if valid or 0 otherwise
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb

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

Packit 423ecb
<tt>ctxt</tt>:the validation context
<tt>doc</tt>:a document instance
<tt>elem</tt>:an element instance
<tt>prefix</tt>:the namespace prefix
<tt>ns</tt>:an namespace declaration instance
<tt>value</tt>:the attribute value (without entities processing)
<tt>Returns</tt>:1 if valid or 0 otherwise
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb

Pop the element end from the validation stack.

Packit 423ecb
<tt>ctxt</tt>:the validation context
<tt>doc</tt>:a document instance
<tt>elem</tt>:an element instance
<tt>qname</tt>:the qualified name as appearing in the serialization
<tt>Returns</tt>:1 if no validation problem was found or 0 otherwise
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb

check the CData parsed for validation in the current stack

Packit 423ecb
<tt>ctxt</tt>:the validation context
<tt>data</tt>:some character data read
<tt>len</tt>:the length of the data
<tt>Returns</tt>:1 if no validation problem was found or 0 otherwise
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb

Push a new element start on the validation stack.

Packit 423ecb
<tt>ctxt</tt>:the validation context
<tt>doc</tt>:a document instance
<tt>elem</tt>:an element instance
<tt>qname</tt>:the qualified name as appearing in the serialization
<tt>Returns</tt>:1 if no validation problem was found or 0 otherwise
Packit 423ecb
        
Packit 423ecb
        
Packit 423ecb

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

Packit 423ecb
<tt>ctxt</tt>:the validation context
<tt>doc</tt>:a document instance
<tt>Returns</tt>:1 if valid or 0 otherwise
Packit 423ecb
        
Packit 423ecb
      
Packit 423ecb
    
Packit 423ecb
  </body>
Packit 423ecb
</html>