libxml-valid.html revision c6e07559fa002911c7a14b696c4f69d481b54802
1<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>valid</title><meta name="generator" content="DocBook XSL Stylesheets V1.60.1"><meta xmlns="http://www.w3.org/TR/xhtml1/transitional" name="generator" content="GTK-Doc V1.0 (XML mode)"></meta><style xmlns="http://www.w3.org/TR/xhtml1/transitional" type="text/css"> 2 .synopsis, .classsynopsis { 3 background: #eeeeee; 4 border: solid 1px #aaaaaa; 5 padding: 0.5em; 6 } 7 .programlisting { 8 background: #eeeeff; 9 border: solid 1px #aaaaff; 10 padding: 0.5em; 11 } 12 .variablelist { 13 padding: 4px; 14 margin-left: 3em; 15 } 16 .navigation { 17 background: #ffeeee; 18 border: solid 1px #ffaaaa; 19 margin-top: 0.5em; 20 margin-bottom: 0.5em; 21 } 22 .navigation a { 23 color: #770000; 24 } 25 .navigation a:visited { 26 color: #550000; 27 } 28 .navigation .title { 29 font-size: 200%; 30 } 31 </style><link rel="home" href="index.html" title="[Insert name here] Reference Manual"><link rel="up" href="ch01.html" title="[Insert title here]"><link rel="previous" href="libxml-HTMLparser.html" title="HTMLparser"><link rel="next" href="libxml-catalog.html" title="catalog"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><table xmlns="http://www.w3.org/TR/xhtml1/transitional" class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle"><td><a accesskey="p" href="libxml-HTMLparser.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></img></a></td><td><a accesskey="u" href="ch01.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></img></a></td><td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></img></a></td><th width="100%" align="center">[Insert name here] Reference Manual</th><td><a accesskey="n" href="libxml-catalog.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></img></a></td></tr></table><div class="refentry" lang="en"><a name="libxml-valid"></a><div class="titlepage"><div></div><div></div></div><div class="refnamediv"><h2><span class="refentrytitle">valid</span></h2><p>valid — </p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><pre class="synopsis"> 32 33 34 35struct <a href="libxml-valid.html#xmlValidState">xmlValidState</a>; 36typedef <a href="libxml-valid.html#xmlValidStatePtr">xmlValidStatePtr</a>; 37void (<a href="libxml-valid.html#xmlValidityErrorFunc">*xmlValidityErrorFunc</a>) (void *ctx, 38 const char *msg, 39 ...); 40void (<a href="libxml-valid.html#xmlValidityWarningFunc">*xmlValidityWarningFunc</a>) (void *ctx, 41 const char *msg, 42 ...); 43struct <a href="libxml-valid.html#xmlValidCtxt">xmlValidCtxt</a>; 44typedef <a href="libxml-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a>; 45typedef <a href="libxml-valid.html#xmlNotationTablePtr">xmlNotationTablePtr</a>; 46typedef <a href="libxml-valid.html#xmlElementTablePtr">xmlElementTablePtr</a>; 47typedef <a href="libxml-valid.html#xmlAttributeTablePtr">xmlAttributeTablePtr</a>; 48typedef <a href="libxml-valid.html#xmlIDTablePtr">xmlIDTablePtr</a>; 49typedef <a href="libxml-valid.html#xmlRefTablePtr">xmlRefTablePtr</a>; 50<a href="libxml-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a> <a href="libxml-valid.html#xmlNewValidCtxt">xmlNewValidCtxt</a> (void); 51void <a href="libxml-valid.html#xmlFreeValidCtxt">xmlFreeValidCtxt</a> (<a href="libxml-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a>); 52<a href="libxml-tree.html#xmlNotationPtr">xmlNotationPtr</a> <a href="libxml-valid.html#xmlAddNotationDecl">xmlAddNotationDecl</a> (<a href="libxml-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a> ctxt, 53 <a href="libxml-tree.html#xmlDtdPtr">xmlDtdPtr</a> dtd, 54 const <a href="libxml-tree.html#xmlChar">xmlChar</a> *name, 55 const <a href="libxml-tree.html#xmlChar">xmlChar</a> *PublicID, 56 const <a href="libxml-tree.html#xmlChar">xmlChar</a> *SystemID); 57<a href="libxml-valid.html#xmlNotationTablePtr">xmlNotationTablePtr</a> <a href="libxml-valid.html#xmlCopyNotationTable">xmlCopyNotationTable</a> (<a href="libxml-valid.html#xmlNotationTablePtr">xmlNotationTablePtr</a> table); 58void <a href="libxml-valid.html#xmlFreeNotationTable">xmlFreeNotationTable</a> (<a href="libxml-valid.html#xmlNotationTablePtr">xmlNotationTablePtr</a> table); 59void <a href="libxml-valid.html#xmlDumpNotationDecl">xmlDumpNotationDecl</a> (<a href="libxml-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf, 60 <a href="libxml-tree.html#xmlNotationPtr">xmlNotationPtr</a> nota); 61void <a href="libxml-valid.html#xmlDumpNotationTable">xmlDumpNotationTable</a> (<a href="libxml-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf, 62 <a href="libxml-valid.html#xmlNotationTablePtr">xmlNotationTablePtr</a> table); 63<a href="libxml-tree.html#xmlElementContentPtr">xmlElementContentPtr</a> <a href="libxml-valid.html#xmlNewElementContent">xmlNewElementContent</a> (<a href="libxml-tree.html#xmlChar">xmlChar</a> *name, 64 <a href="libxml-tree.html#xmlElementContentType">xmlElementContentType</a> type); 65<a href="libxml-tree.html#xmlElementContentPtr">xmlElementContentPtr</a> <a href="libxml-valid.html#xmlCopyElementContent">xmlCopyElementContent</a> (<a href="libxml-tree.html#xmlElementContentPtr">xmlElementContentPtr</a> content); 66void <a href="libxml-valid.html#xmlFreeElementContent">xmlFreeElementContent</a> (<a href="libxml-tree.html#xmlElementContentPtr">xmlElementContentPtr</a> cur); 67void <a href="libxml-valid.html#xmlSnprintfElementContent">xmlSnprintfElementContent</a> (char *buf, 68 int size, 69 <a href="libxml-tree.html#xmlElementContentPtr">xmlElementContentPtr</a> content, 70 int glob); 71void <a href="libxml-valid.html#xmlSprintfElementContent">xmlSprintfElementContent</a> (char *buf, 72 <a href="libxml-tree.html#xmlElementContentPtr">xmlElementContentPtr</a> content, 73 int glob); 74<a href="libxml-tree.html#xmlElementPtr">xmlElementPtr</a> <a href="libxml-valid.html#xmlAddElementDecl">xmlAddElementDecl</a> (<a href="libxml-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a> ctxt, 75 <a href="libxml-tree.html#xmlDtdPtr">xmlDtdPtr</a> dtd, 76 const <a href="libxml-tree.html#xmlChar">xmlChar</a> *name, 77 <a href="libxml-tree.html#xmlElementTypeVal">xmlElementTypeVal</a> type, 78 <a href="libxml-tree.html#xmlElementContentPtr">xmlElementContentPtr</a> content); 79<a href="libxml-valid.html#xmlElementTablePtr">xmlElementTablePtr</a> <a href="libxml-valid.html#xmlCopyElementTable">xmlCopyElementTable</a> (<a href="libxml-valid.html#xmlElementTablePtr">xmlElementTablePtr</a> table); 80void <a href="libxml-valid.html#xmlFreeElementTable">xmlFreeElementTable</a> (<a href="libxml-valid.html#xmlElementTablePtr">xmlElementTablePtr</a> table); 81void <a href="libxml-valid.html#xmlDumpElementTable">xmlDumpElementTable</a> (<a href="libxml-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf, 82 <a href="libxml-valid.html#xmlElementTablePtr">xmlElementTablePtr</a> table); 83void <a href="libxml-valid.html#xmlDumpElementDecl">xmlDumpElementDecl</a> (<a href="libxml-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf, 84 <a href="libxml-tree.html#xmlElementPtr">xmlElementPtr</a> elem); 85<a href="libxml-tree.html#xmlEnumerationPtr">xmlEnumerationPtr</a> <a href="libxml-valid.html#xmlCreateEnumeration">xmlCreateEnumeration</a> (<a href="libxml-tree.html#xmlChar">xmlChar</a> *name); 86void <a href="libxml-valid.html#xmlFreeEnumeration">xmlFreeEnumeration</a> (<a href="libxml-tree.html#xmlEnumerationPtr">xmlEnumerationPtr</a> cur); 87<a href="libxml-tree.html#xmlEnumerationPtr">xmlEnumerationPtr</a> <a href="libxml-valid.html#xmlCopyEnumeration">xmlCopyEnumeration</a> (<a href="libxml-tree.html#xmlEnumerationPtr">xmlEnumerationPtr</a> cur); 88<a href="libxml-tree.html#xmlAttributePtr">xmlAttributePtr</a> <a href="libxml-valid.html#xmlAddAttributeDecl">xmlAddAttributeDecl</a> (<a href="libxml-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a> ctxt, 89 <a href="libxml-tree.html#xmlDtdPtr">xmlDtdPtr</a> dtd, 90 const <a href="libxml-tree.html#xmlChar">xmlChar</a> *elem, 91 const <a href="libxml-tree.html#xmlChar">xmlChar</a> *name, 92 const <a href="libxml-tree.html#xmlChar">xmlChar</a> *ns, 93 <a href="libxml-tree.html#xmlAttributeType">xmlAttributeType</a> type, 94 <a href="libxml-tree.html#xmlAttributeDefault">xmlAttributeDefault</a> def, 95 const <a href="libxml-tree.html#xmlChar">xmlChar</a> *defaultValue, 96 <a href="libxml-tree.html#xmlEnumerationPtr">xmlEnumerationPtr</a> tree); 97<a href="libxml-valid.html#xmlAttributeTablePtr">xmlAttributeTablePtr</a> <a href="libxml-valid.html#xmlCopyAttributeTable">xmlCopyAttributeTable</a> (<a href="libxml-valid.html#xmlAttributeTablePtr">xmlAttributeTablePtr</a> table); 98void <a href="libxml-valid.html#xmlFreeAttributeTable">xmlFreeAttributeTable</a> (<a href="libxml-valid.html#xmlAttributeTablePtr">xmlAttributeTablePtr</a> table); 99void <a href="libxml-valid.html#xmlDumpAttributeTable">xmlDumpAttributeTable</a> (<a href="libxml-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf, 100 <a href="libxml-valid.html#xmlAttributeTablePtr">xmlAttributeTablePtr</a> table); 101void <a href="libxml-valid.html#xmlDumpAttributeDecl">xmlDumpAttributeDecl</a> (<a href="libxml-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf, 102 <a href="libxml-tree.html#xmlAttributePtr">xmlAttributePtr</a> attr); 103<a href="libxml-tree.html#xmlIDPtr">xmlIDPtr</a> <a href="libxml-valid.html#xmlAddID">xmlAddID</a> (<a href="libxml-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a> ctxt, 104 <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, 105 const <a href="libxml-tree.html#xmlChar">xmlChar</a> *value, 106 <a href="libxml-tree.html#xmlAttrPtr">xmlAttrPtr</a> attr); 107void <a href="libxml-valid.html#xmlFreeIDTable">xmlFreeIDTable</a> (<a href="libxml-valid.html#xmlIDTablePtr">xmlIDTablePtr</a> table); 108<a href="libxml-tree.html#xmlAttrPtr">xmlAttrPtr</a> <a href="libxml-valid.html#xmlGetID">xmlGetID</a> (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, 109 const <a href="libxml-tree.html#xmlChar">xmlChar</a> *ID); 110int <a href="libxml-valid.html#xmlIsID">xmlIsID</a> (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, 111 <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> elem, 112 <a href="libxml-tree.html#xmlAttrPtr">xmlAttrPtr</a> attr); 113int <a href="libxml-valid.html#xmlRemoveID">xmlRemoveID</a> (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, 114 <a href="libxml-tree.html#xmlAttrPtr">xmlAttrPtr</a> attr); 115<a href="libxml-tree.html#xmlRefPtr">xmlRefPtr</a> <a href="libxml-valid.html#xmlAddRef">xmlAddRef</a> (<a href="libxml-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a> ctxt, 116 <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, 117 const <a href="libxml-tree.html#xmlChar">xmlChar</a> *value, 118 <a href="libxml-tree.html#xmlAttrPtr">xmlAttrPtr</a> attr); 119void <a href="libxml-valid.html#xmlFreeRefTable">xmlFreeRefTable</a> (<a href="libxml-valid.html#xmlRefTablePtr">xmlRefTablePtr</a> table); 120int <a href="libxml-valid.html#xmlIsRef">xmlIsRef</a> (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, 121 <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> elem, 122 <a href="libxml-tree.html#xmlAttrPtr">xmlAttrPtr</a> attr); 123int <a href="libxml-valid.html#xmlRemoveRef">xmlRemoveRef</a> (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, 124 <a href="libxml-tree.html#xmlAttrPtr">xmlAttrPtr</a> attr); 125<a href="libxml-list.html#xmlListPtr">xmlListPtr</a> <a href="libxml-valid.html#xmlGetRefs">xmlGetRefs</a> (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, 126 const <a href="libxml-tree.html#xmlChar">xmlChar</a> *ID); 127int <a href="libxml-valid.html#xmlValidateRoot">xmlValidateRoot</a> (<a href="libxml-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a> ctxt, 128 <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc); 129int <a href="libxml-valid.html#xmlValidateElementDecl">xmlValidateElementDecl</a> (<a href="libxml-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a> ctxt, 130 <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, 131 <a href="libxml-tree.html#xmlElementPtr">xmlElementPtr</a> elem); 132<a href="libxml-tree.html#xmlChar">xmlChar</a>* <a href="libxml-valid.html#xmlValidNormalizeAttributeValue">xmlValidNormalizeAttributeValue</a> (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, 133 <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> elem, 134 const <a href="libxml-tree.html#xmlChar">xmlChar</a> *name, 135 const <a href="libxml-tree.html#xmlChar">xmlChar</a> *value); 136<a href="libxml-tree.html#xmlChar">xmlChar</a>* <a href="libxml-valid.html#xmlValidCtxtNormalizeAttributeValue">xmlValidCtxtNormalizeAttributeValue</a> 137 (<a href="libxml-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a> ctxt, 138 <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, 139 <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> elem, 140 const <a href="libxml-tree.html#xmlChar">xmlChar</a> *name, 141 const <a href="libxml-tree.html#xmlChar">xmlChar</a> *value); 142int <a href="libxml-valid.html#xmlValidateAttributeDecl">xmlValidateAttributeDecl</a> (<a href="libxml-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a> ctxt, 143 <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, 144 <a href="libxml-tree.html#xmlAttributePtr">xmlAttributePtr</a> attr); 145int <a href="libxml-valid.html#xmlValidateAttributeValue">xmlValidateAttributeValue</a> (<a href="libxml-tree.html#xmlAttributeType">xmlAttributeType</a> type, 146 const <a href="libxml-tree.html#xmlChar">xmlChar</a> *value); 147int <a href="libxml-valid.html#xmlValidateNotationDecl">xmlValidateNotationDecl</a> (<a href="libxml-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a> ctxt, 148 <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, 149 <a href="libxml-tree.html#xmlNotationPtr">xmlNotationPtr</a> nota); 150int <a href="libxml-valid.html#xmlValidateDtd">xmlValidateDtd</a> (<a href="libxml-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a> ctxt, 151 <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, 152 <a href="libxml-tree.html#xmlDtdPtr">xmlDtdPtr</a> dtd); 153int <a href="libxml-valid.html#xmlValidateDtdFinal">xmlValidateDtdFinal</a> (<a href="libxml-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a> ctxt, 154 <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc); 155int <a href="libxml-valid.html#xmlValidateDocument">xmlValidateDocument</a> (<a href="libxml-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a> ctxt, 156 <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc); 157int <a href="libxml-valid.html#xmlValidateElement">xmlValidateElement</a> (<a href="libxml-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a> ctxt, 158 <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, 159 <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> elem); 160int <a href="libxml-valid.html#xmlValidateOneElement">xmlValidateOneElement</a> (<a href="libxml-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a> ctxt, 161 <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, 162 <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> elem); 163int <a href="libxml-valid.html#xmlValidateOneAttribute">xmlValidateOneAttribute</a> (<a href="libxml-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a> ctxt, 164 <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, 165 <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> elem, 166 <a href="libxml-tree.html#xmlAttrPtr">xmlAttrPtr</a> attr, 167 const <a href="libxml-tree.html#xmlChar">xmlChar</a> *value); 168int <a href="libxml-valid.html#xmlValidateOneNamespace">xmlValidateOneNamespace</a> (<a href="libxml-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a> ctxt, 169 <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, 170 <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> elem, 171 const <a href="libxml-tree.html#xmlChar">xmlChar</a> *prefix, 172 <a href="libxml-tree.html#xmlNsPtr">xmlNsPtr</a> ns, 173 const <a href="libxml-tree.html#xmlChar">xmlChar</a> *value); 174int <a href="libxml-valid.html#xmlValidateDocumentFinal">xmlValidateDocumentFinal</a> (<a href="libxml-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a> ctxt, 175 <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc); 176int <a href="libxml-valid.html#xmlValidateNotationUse">xmlValidateNotationUse</a> (<a href="libxml-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a> ctxt, 177 <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, 178 const <a href="libxml-tree.html#xmlChar">xmlChar</a> *notationName); 179int <a href="libxml-valid.html#xmlIsMixedElement">xmlIsMixedElement</a> (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, 180 const <a href="libxml-tree.html#xmlChar">xmlChar</a> *name); 181<a href="libxml-tree.html#xmlAttributePtr">xmlAttributePtr</a> <a href="libxml-valid.html#xmlGetDtdAttrDesc">xmlGetDtdAttrDesc</a> (<a href="libxml-tree.html#xmlDtdPtr">xmlDtdPtr</a> dtd, 182 const <a href="libxml-tree.html#xmlChar">xmlChar</a> *elem, 183 const <a href="libxml-tree.html#xmlChar">xmlChar</a> *name); 184<a href="libxml-tree.html#xmlAttributePtr">xmlAttributePtr</a> <a href="libxml-valid.html#xmlGetDtdQAttrDesc">xmlGetDtdQAttrDesc</a> (<a href="libxml-tree.html#xmlDtdPtr">xmlDtdPtr</a> dtd, 185 const <a href="libxml-tree.html#xmlChar">xmlChar</a> *elem, 186 const <a href="libxml-tree.html#xmlChar">xmlChar</a> *name, 187 const <a href="libxml-tree.html#xmlChar">xmlChar</a> *prefix); 188<a href="libxml-tree.html#xmlNotationPtr">xmlNotationPtr</a> <a href="libxml-valid.html#xmlGetDtdNotationDesc">xmlGetDtdNotationDesc</a> (<a href="libxml-tree.html#xmlDtdPtr">xmlDtdPtr</a> dtd, 189 const <a href="libxml-tree.html#xmlChar">xmlChar</a> *name); 190<a href="libxml-tree.html#xmlElementPtr">xmlElementPtr</a> <a href="libxml-valid.html#xmlGetDtdQElementDesc">xmlGetDtdQElementDesc</a> (<a href="libxml-tree.html#xmlDtdPtr">xmlDtdPtr</a> dtd, 191 const <a href="libxml-tree.html#xmlChar">xmlChar</a> *name, 192 const <a href="libxml-tree.html#xmlChar">xmlChar</a> *prefix); 193<a href="libxml-tree.html#xmlElementPtr">xmlElementPtr</a> <a href="libxml-valid.html#xmlGetDtdElementDesc">xmlGetDtdElementDesc</a> (<a href="libxml-tree.html#xmlDtdPtr">xmlDtdPtr</a> dtd, 194 const <a href="libxml-tree.html#xmlChar">xmlChar</a> *name); 195int <a href="libxml-valid.html#xmlValidGetValidElements">xmlValidGetValidElements</a> (<a href="libxml-tree.html#xmlNode">xmlNode</a> *prev, 196 <a href="libxml-tree.html#xmlNode">xmlNode</a> *next, 197 const <a href="libxml-tree.html#xmlChar">xmlChar</a> **list, 198 int max); 199int <a href="libxml-valid.html#xmlValidGetPotentialChildren">xmlValidGetPotentialChildren</a> (<a href="libxml-tree.html#xmlElementContent">xmlElementContent</a> *ctree, 200 const <a href="libxml-tree.html#xmlChar">xmlChar</a> **list, 201 int *len, 202 int max); 203int <a href="libxml-valid.html#xmlValidateNameValue">xmlValidateNameValue</a> (const <a href="libxml-tree.html#xmlChar">xmlChar</a> *value); 204int <a href="libxml-valid.html#xmlValidateNamesValue">xmlValidateNamesValue</a> (const <a href="libxml-tree.html#xmlChar">xmlChar</a> *value); 205int <a href="libxml-valid.html#xmlValidateNmtokenValue">xmlValidateNmtokenValue</a> (const <a href="libxml-tree.html#xmlChar">xmlChar</a> *value); 206int <a href="libxml-valid.html#xmlValidateNmtokensValue">xmlValidateNmtokensValue</a> (const <a href="libxml-tree.html#xmlChar">xmlChar</a> *value); 207int <a href="libxml-valid.html#xmlValidBuildContentModel">xmlValidBuildContentModel</a> (<a href="libxml-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a> ctxt, 208 <a href="libxml-tree.html#xmlElementPtr">xmlElementPtr</a> elem); 209int <a href="libxml-valid.html#xmlValidatePushElement">xmlValidatePushElement</a> (<a href="libxml-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a> ctxt, 210 <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, 211 <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> elem, 212 const <a href="libxml-tree.html#xmlChar">xmlChar</a> *qname); 213int <a href="libxml-valid.html#xmlValidatePushCData">xmlValidatePushCData</a> (<a href="libxml-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a> ctxt, 214 const <a href="libxml-tree.html#xmlChar">xmlChar</a> *data, 215 int len); 216int <a href="libxml-valid.html#xmlValidatePopElement">xmlValidatePopElement</a> (<a href="libxml-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a> ctxt, 217 <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, 218 <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> elem, 219 const <a href="libxml-tree.html#xmlChar">xmlChar</a> *qname); 220</pre></div><div class="refsect1" lang="en"><h2>Description</h2><p> 221 222</p></div><div class="refsect1" lang="en"><h2>Details</h2><div class="refsect2" lang="en"><h3><a name="xmlValidState"></a>struct xmlValidState</h3><pre class="programlisting">struct xmlValidState;</pre><p> 223 224</p></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlValidStatePtr"></a>xmlValidStatePtr</h3><pre class="programlisting">typedef xmlValidState *xmlValidStatePtr; 225</pre><p> 226 227</p></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlValidityErrorFunc"></a>xmlValidityErrorFunc ()</h3><pre class="programlisting">void (*xmlValidityErrorFunc) (void *ctx, 228 const char *msg, 229 ...);</pre><p> 230Callback called when a validity error is found. This is a message 231oriented function similar to an *printf function.</p><p> 232 233</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>ctx</tt></i>�:</span></td><td> an xmlValidCtxtPtr validity error context 234</td></tr><tr><td><span class="term"><i class="parameter"><tt>msg</tt></i>�:</span></td><td> the string to format *printf like vararg 235</td></tr><tr><td><span class="term"><i class="parameter"><tt>...</tt></i>�:</span></td><td> remaining arguments to the format 236</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlValidityWarningFunc"></a>xmlValidityWarningFunc ()</h3><pre class="programlisting">void (*xmlValidityWarningFunc) (void *ctx, 237 const char *msg, 238 ...);</pre><p> 239Callback called when a validity warning is found. This is a message 240oriented function similar to an *printf function.</p><p> 241 242</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>ctx</tt></i>�:</span></td><td> an xmlValidCtxtPtr validity error context 243</td></tr><tr><td><span class="term"><i class="parameter"><tt>msg</tt></i>�:</span></td><td> the string to format *printf like vararg 244</td></tr><tr><td><span class="term"><i class="parameter"><tt>...</tt></i>�:</span></td><td> remaining arguments to the format 245</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlValidCtxt"></a>struct xmlValidCtxt</h3><pre class="programlisting">struct xmlValidCtxt { 246 247 void *userData; /* user specific data block */ 248 xmlValidityErrorFunc error; /* the callback in case of errors */ 249 xmlValidityWarningFunc warning; /* the callback in case of warning */ 250 251 /* Node analysis stack used when validating within entities */ 252 xmlNodePtr node; /* Current parsed Node */ 253 int nodeNr; /* Depth of the parsing stack */ 254 int nodeMax; /* Max depth of the parsing stack */ 255 xmlNodePtr *nodeTab; /* array of nodes */ 256 257 int finishDtd; /* finished validating the Dtd ? */ 258 xmlDocPtr doc; /* the document */ 259 int valid; /* temporary validity check result */ 260 261 /* state state used for non-determinist content validation */ 262 xmlValidState *vstate; /* current state */ 263 int vstateNr; /* Depth of the validation stack */ 264 int vstateMax; /* Max depth of the validation stack */ 265 xmlValidState *vstateTab; /* array of validation states */ 266 267#ifdef LIBXML_REGEXP_ENABLED 268 xmlAutomataPtr am; /* the automata */ 269 xmlAutomataStatePtr state; /* used to build the automata */ 270#else 271 void *am; 272 void *state; 273#endif 274}; 275</pre><p> 276</p><p> 277 278</p></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlValidCtxtPtr"></a>xmlValidCtxtPtr</h3><pre class="programlisting">typedef xmlValidCtxt *xmlValidCtxtPtr; 279</pre><p> 280 281</p></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlNotationTablePtr"></a>xmlNotationTablePtr</h3><pre class="programlisting">typedef xmlNotationTable *xmlNotationTablePtr; 282</pre><p> 283 284</p></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlElementTablePtr"></a>xmlElementTablePtr</h3><pre class="programlisting">typedef xmlElementTable *xmlElementTablePtr; 285</pre><p> 286 287</p></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlAttributeTablePtr"></a>xmlAttributeTablePtr</h3><pre class="programlisting">typedef xmlAttributeTable *xmlAttributeTablePtr; 288</pre><p> 289 290</p></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlIDTablePtr"></a>xmlIDTablePtr</h3><pre class="programlisting">typedef xmlIDTable *xmlIDTablePtr; 291</pre><p> 292 293</p></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlRefTablePtr"></a>xmlRefTablePtr</h3><pre class="programlisting">typedef xmlRefTable *xmlRefTablePtr; 294</pre><p> 295 296</p></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlNewValidCtxt"></a>xmlNewValidCtxt ()</h3><pre class="programlisting"><a href="libxml-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a> xmlNewValidCtxt (void);</pre><p> 297Allocate a validation context structure.</p><p> 298 299</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>NULL if not, otherwise the new validation context structure 300</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlFreeValidCtxt"></a>xmlFreeValidCtxt ()</h3><pre class="programlisting">void xmlFreeValidCtxt (<a href="libxml-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a>);</pre><p> 301Free a validation context structure.</p><p> 302 303</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>Param1</tt></i>�:</span></td><td> 304 305 306</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlAddNotationDecl"></a>xmlAddNotationDecl ()</h3><pre class="programlisting"><a href="libxml-tree.html#xmlNotationPtr">xmlNotationPtr</a> xmlAddNotationDecl (<a href="libxml-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a> ctxt, 307 <a href="libxml-tree.html#xmlDtdPtr">xmlDtdPtr</a> dtd, 308 const <a href="libxml-tree.html#xmlChar">xmlChar</a> *name, 309 const <a href="libxml-tree.html#xmlChar">xmlChar</a> *PublicID, 310 const <a href="libxml-tree.html#xmlChar">xmlChar</a> *SystemID);</pre><p> 311Register a new notation declaration</p><p> 312 313</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>ctxt</tt></i>�:</span></td><td> the validation context 314</td></tr><tr><td><span class="term"><i class="parameter"><tt>dtd</tt></i>�:</span></td><td> pointer to the DTD 315</td></tr><tr><td><span class="term"><i class="parameter"><tt>name</tt></i>�:</span></td><td> the entity name 316</td></tr><tr><td><span class="term"><i class="parameter"><tt>PublicID</tt></i>�:</span></td><td> the public identifier or NULL 317</td></tr><tr><td><span class="term"><i class="parameter"><tt>SystemID</tt></i>�:</span></td><td> the system identifier or NULL 318</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>NULL if not, otherwise the entity 319</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlCopyNotationTable"></a>xmlCopyNotationTable ()</h3><pre class="programlisting"><a href="libxml-valid.html#xmlNotationTablePtr">xmlNotationTablePtr</a> xmlCopyNotationTable (<a href="libxml-valid.html#xmlNotationTablePtr">xmlNotationTablePtr</a> table);</pre><p> 320Build a copy of a notation table.</p><p> 321 322</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>table</tt></i>�:</span></td><td> A notation table 323</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>the new xmlNotationTablePtr or NULL in case of error. 324</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlFreeNotationTable"></a>xmlFreeNotationTable ()</h3><pre class="programlisting">void xmlFreeNotationTable (<a href="libxml-valid.html#xmlNotationTablePtr">xmlNotationTablePtr</a> table);</pre><p> 325Deallocate the memory used by an entities hash table.</p><p> 326 327</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>table</tt></i>�:</span></td><td> An notation table 328</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlDumpNotationDecl"></a>xmlDumpNotationDecl ()</h3><pre class="programlisting">void xmlDumpNotationDecl (<a href="libxml-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf, 329 <a href="libxml-tree.html#xmlNotationPtr">xmlNotationPtr</a> nota);</pre><p> 330This will dump the content the notation declaration as an XML DTD definition</p><p> 331 332</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>buf</tt></i>�:</span></td><td> the XML buffer output 333</td></tr><tr><td><span class="term"><i class="parameter"><tt>nota</tt></i>�:</span></td><td> A notation declaration 334</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlDumpNotationTable"></a>xmlDumpNotationTable ()</h3><pre class="programlisting">void xmlDumpNotationTable (<a href="libxml-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf, 335 <a href="libxml-valid.html#xmlNotationTablePtr">xmlNotationTablePtr</a> table);</pre><p> 336This will dump the content of the notation table as an XML DTD definition</p><p> 337 338</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>buf</tt></i>�:</span></td><td> the XML buffer output 339</td></tr><tr><td><span class="term"><i class="parameter"><tt>table</tt></i>�:</span></td><td> A notation table 340</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlNewElementContent"></a>xmlNewElementContent ()</h3><pre class="programlisting"><a href="libxml-tree.html#xmlElementContentPtr">xmlElementContentPtr</a> xmlNewElementContent (<a href="libxml-tree.html#xmlChar">xmlChar</a> *name, 341 <a href="libxml-tree.html#xmlElementContentType">xmlElementContentType</a> type);</pre><p> 342Allocate an element content structure.</p><p> 343 344</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>name</tt></i>�:</span></td><td> the subelement name or NULL 345</td></tr><tr><td><span class="term"><i class="parameter"><tt>type</tt></i>�:</span></td><td> the type of element content decl 346</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>NULL if not, otherwise the new element content structure 347</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlCopyElementContent"></a>xmlCopyElementContent ()</h3><pre class="programlisting"><a href="libxml-tree.html#xmlElementContentPtr">xmlElementContentPtr</a> xmlCopyElementContent (<a href="libxml-tree.html#xmlElementContentPtr">xmlElementContentPtr</a> content);</pre><p> 348Build a copy of an element content description.</p><p> 349 350</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>content</tt></i>�:</span></td><td> 351</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>the new xmlElementContentPtr or NULL in case of error. 352</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlFreeElementContent"></a>xmlFreeElementContent ()</h3><pre class="programlisting">void xmlFreeElementContent (<a href="libxml-tree.html#xmlElementContentPtr">xmlElementContentPtr</a> cur);</pre><p> 353Free an element content structure. This is a recursive call !</p><p> 354 355</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>cur</tt></i>�:</span></td><td> the element content tree to free 356</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlSnprintfElementContent"></a>xmlSnprintfElementContent ()</h3><pre class="programlisting">void xmlSnprintfElementContent (char *buf, 357 int size, 358 <a href="libxml-tree.html#xmlElementContentPtr">xmlElementContentPtr</a> content, 359 int glob);</pre><p> 360This will dump the content of the element content definition 361Intended just for the debug routine</p><p> 362 363</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>buf</tt></i>�:</span></td><td> an output buffer 364</td></tr><tr><td><span class="term"><i class="parameter"><tt>size</tt></i>�:</span></td><td> the buffer size 365</td></tr><tr><td><span class="term"><i class="parameter"><tt>content</tt></i>�:</span></td><td> An element table 366</td></tr><tr><td><span class="term"><i class="parameter"><tt>glob</tt></i>�:</span></td><td> 1 if one must print the englobing parenthesis, 0 otherwise 367</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlSprintfElementContent"></a>xmlSprintfElementContent ()</h3><pre class="programlisting">void xmlSprintfElementContent (char *buf, 368 <a href="libxml-tree.html#xmlElementContentPtr">xmlElementContentPtr</a> content, 369 int glob);</pre><p> 370Deprecated, unsafe, use xmlSnprintfElementContent</p><p> 371 372</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>buf</tt></i>�:</span></td><td> an output buffer 373</td></tr><tr><td><span class="term"><i class="parameter"><tt>content</tt></i>�:</span></td><td> An element table 374</td></tr><tr><td><span class="term"><i class="parameter"><tt>glob</tt></i>�:</span></td><td> 1 if one must print the englobing parenthesis, 0 otherwise 375</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlAddElementDecl"></a>xmlAddElementDecl ()</h3><pre class="programlisting"><a href="libxml-tree.html#xmlElementPtr">xmlElementPtr</a> xmlAddElementDecl (<a href="libxml-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a> ctxt, 376 <a href="libxml-tree.html#xmlDtdPtr">xmlDtdPtr</a> dtd, 377 const <a href="libxml-tree.html#xmlChar">xmlChar</a> *name, 378 <a href="libxml-tree.html#xmlElementTypeVal">xmlElementTypeVal</a> type, 379 <a href="libxml-tree.html#xmlElementContentPtr">xmlElementContentPtr</a> content);</pre><p> 380Register a new element declaration</p><p> 381 382</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>ctxt</tt></i>�:</span></td><td> the validation context 383</td></tr><tr><td><span class="term"><i class="parameter"><tt>dtd</tt></i>�:</span></td><td> pointer to the DTD 384</td></tr><tr><td><span class="term"><i class="parameter"><tt>name</tt></i>�:</span></td><td> the entity name 385</td></tr><tr><td><span class="term"><i class="parameter"><tt>type</tt></i>�:</span></td><td> the element type 386</td></tr><tr><td><span class="term"><i class="parameter"><tt>content</tt></i>�:</span></td><td> the element content tree or NULL 387</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>NULL if not, otherwise the entity 388</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlCopyElementTable"></a>xmlCopyElementTable ()</h3><pre class="programlisting"><a href="libxml-valid.html#xmlElementTablePtr">xmlElementTablePtr</a> xmlCopyElementTable (<a href="libxml-valid.html#xmlElementTablePtr">xmlElementTablePtr</a> table);</pre><p> 389Build a copy of an element table.</p><p> 390 391</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>table</tt></i>�:</span></td><td> An element table 392</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>the new xmlElementTablePtr or NULL in case of error. 393</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlFreeElementTable"></a>xmlFreeElementTable ()</h3><pre class="programlisting">void xmlFreeElementTable (<a href="libxml-valid.html#xmlElementTablePtr">xmlElementTablePtr</a> table);</pre><p> 394Deallocate the memory used by an element hash table.</p><p> 395 396</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>table</tt></i>�:</span></td><td> An element table 397</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlDumpElementTable"></a>xmlDumpElementTable ()</h3><pre class="programlisting">void xmlDumpElementTable (<a href="libxml-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf, 398 <a href="libxml-valid.html#xmlElementTablePtr">xmlElementTablePtr</a> table);</pre><p> 399This will dump the content of the element table as an XML DTD definition</p><p> 400 401</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>buf</tt></i>�:</span></td><td> the XML buffer output 402</td></tr><tr><td><span class="term"><i class="parameter"><tt>table</tt></i>�:</span></td><td> An element table 403</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlDumpElementDecl"></a>xmlDumpElementDecl ()</h3><pre class="programlisting">void xmlDumpElementDecl (<a href="libxml-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf, 404 <a href="libxml-tree.html#xmlElementPtr">xmlElementPtr</a> elem);</pre><p> 405This will dump the content of the element declaration as an XML 406DTD definition</p><p> 407 408</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>buf</tt></i>�:</span></td><td> the XML buffer output 409</td></tr><tr><td><span class="term"><i class="parameter"><tt>elem</tt></i>�:</span></td><td> An element table 410</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlCreateEnumeration"></a>xmlCreateEnumeration ()</h3><pre class="programlisting"><a href="libxml-tree.html#xmlEnumerationPtr">xmlEnumerationPtr</a> xmlCreateEnumeration (<a href="libxml-tree.html#xmlChar">xmlChar</a> *name);</pre><p> 411create and initialize an enumeration attribute node.</p><p> 412 413</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>name</tt></i>�:</span></td><td> the enumeration name or NULL 414</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>the xmlEnumerationPtr just created or NULL in case 415 of error. 416</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlFreeEnumeration"></a>xmlFreeEnumeration ()</h3><pre class="programlisting">void xmlFreeEnumeration (<a href="libxml-tree.html#xmlEnumerationPtr">xmlEnumerationPtr</a> cur);</pre><p> 417free an enumeration attribute node (recursive).</p><p> 418 419</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>cur</tt></i>�:</span></td><td> the tree to free. 420</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlCopyEnumeration"></a>xmlCopyEnumeration ()</h3><pre class="programlisting"><a href="libxml-tree.html#xmlEnumerationPtr">xmlEnumerationPtr</a> xmlCopyEnumeration (<a href="libxml-tree.html#xmlEnumerationPtr">xmlEnumerationPtr</a> cur);</pre><p> 421Copy an enumeration attribute node (recursive).</p><p> 422 423</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>cur</tt></i>�:</span></td><td> the tree to copy. 424</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>the xmlEnumerationPtr just created or NULL in case 425 of error. 426</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlAddAttributeDecl"></a>xmlAddAttributeDecl ()</h3><pre class="programlisting"><a href="libxml-tree.html#xmlAttributePtr">xmlAttributePtr</a> xmlAddAttributeDecl (<a href="libxml-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a> ctxt, 427 <a href="libxml-tree.html#xmlDtdPtr">xmlDtdPtr</a> dtd, 428 const <a href="libxml-tree.html#xmlChar">xmlChar</a> *elem, 429 const <a href="libxml-tree.html#xmlChar">xmlChar</a> *name, 430 const <a href="libxml-tree.html#xmlChar">xmlChar</a> *ns, 431 <a href="libxml-tree.html#xmlAttributeType">xmlAttributeType</a> type, 432 <a href="libxml-tree.html#xmlAttributeDefault">xmlAttributeDefault</a> def, 433 const <a href="libxml-tree.html#xmlChar">xmlChar</a> *defaultValue, 434 <a href="libxml-tree.html#xmlEnumerationPtr">xmlEnumerationPtr</a> tree);</pre><p> 435Register a new attribute declaration 436Note that <i class="parameter"><tt>tree</tt></i> becomes the ownership of the DTD</p><p> 437 438</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>ctxt</tt></i>�:</span></td><td> the validation context 439</td></tr><tr><td><span class="term"><i class="parameter"><tt>dtd</tt></i>�:</span></td><td> pointer to the DTD 440</td></tr><tr><td><span class="term"><i class="parameter"><tt>elem</tt></i>�:</span></td><td> the element name 441</td></tr><tr><td><span class="term"><i class="parameter"><tt>name</tt></i>�:</span></td><td> the attribute name 442</td></tr><tr><td><span class="term"><i class="parameter"><tt>ns</tt></i>�:</span></td><td> the attribute namespace prefix 443</td></tr><tr><td><span class="term"><i class="parameter"><tt>type</tt></i>�:</span></td><td> the attribute type 444</td></tr><tr><td><span class="term"><i class="parameter"><tt>def</tt></i>�:</span></td><td> the attribute default type 445</td></tr><tr><td><span class="term"><i class="parameter"><tt>defaultValue</tt></i>�:</span></td><td> the attribute default value 446</td></tr><tr><td><span class="term"><i class="parameter"><tt>tree</tt></i>�:</span></td><td> if it's an enumeration, the associated list 447</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>NULL if not new, otherwise the attribute decl 448</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlCopyAttributeTable"></a>xmlCopyAttributeTable ()</h3><pre class="programlisting"><a href="libxml-valid.html#xmlAttributeTablePtr">xmlAttributeTablePtr</a> xmlCopyAttributeTable (<a href="libxml-valid.html#xmlAttributeTablePtr">xmlAttributeTablePtr</a> table);</pre><p> 449Build a copy of an attribute table.</p><p> 450 451</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>table</tt></i>�:</span></td><td> An attribute table 452</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>the new xmlAttributeTablePtr or NULL in case of error. 453</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlFreeAttributeTable"></a>xmlFreeAttributeTable ()</h3><pre class="programlisting">void xmlFreeAttributeTable (<a href="libxml-valid.html#xmlAttributeTablePtr">xmlAttributeTablePtr</a> table);</pre><p> 454Deallocate the memory used by an entities hash table.</p><p> 455 456</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>table</tt></i>�:</span></td><td> An attribute table 457</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlDumpAttributeTable"></a>xmlDumpAttributeTable ()</h3><pre class="programlisting">void xmlDumpAttributeTable (<a href="libxml-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf, 458 <a href="libxml-valid.html#xmlAttributeTablePtr">xmlAttributeTablePtr</a> table);</pre><p> 459This will dump the content of the attribute table as an XML DTD definition</p><p> 460 461</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>buf</tt></i>�:</span></td><td> the XML buffer output 462</td></tr><tr><td><span class="term"><i class="parameter"><tt>table</tt></i>�:</span></td><td> An attribute table 463</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlDumpAttributeDecl"></a>xmlDumpAttributeDecl ()</h3><pre class="programlisting">void xmlDumpAttributeDecl (<a href="libxml-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf, 464 <a href="libxml-tree.html#xmlAttributePtr">xmlAttributePtr</a> attr);</pre><p> 465This will dump the content of the attribute declaration as an XML 466DTD definition</p><p> 467 468</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>buf</tt></i>�:</span></td><td> the XML buffer output 469</td></tr><tr><td><span class="term"><i class="parameter"><tt>attr</tt></i>�:</span></td><td> An attribute declaration 470</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlAddID"></a>xmlAddID ()</h3><pre class="programlisting"><a href="libxml-tree.html#xmlIDPtr">xmlIDPtr</a> xmlAddID (<a href="libxml-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a> ctxt, 471 <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, 472 const <a href="libxml-tree.html#xmlChar">xmlChar</a> *value, 473 <a href="libxml-tree.html#xmlAttrPtr">xmlAttrPtr</a> attr);</pre><p> 474Register a new id declaration</p><p> 475 476</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>ctxt</tt></i>�:</span></td><td> the validation context 477</td></tr><tr><td><span class="term"><i class="parameter"><tt>doc</tt></i>�:</span></td><td> pointer to the document 478</td></tr><tr><td><span class="term"><i class="parameter"><tt>value</tt></i>�:</span></td><td> the value name 479</td></tr><tr><td><span class="term"><i class="parameter"><tt>attr</tt></i>�:</span></td><td> the attribute holding the ID 480</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>NULL if not, otherwise the new xmlIDPtr 481</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlFreeIDTable"></a>xmlFreeIDTable ()</h3><pre class="programlisting">void xmlFreeIDTable (<a href="libxml-valid.html#xmlIDTablePtr">xmlIDTablePtr</a> table);</pre><p> 482Deallocate the memory used by an ID hash table.</p><p> 483 484</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>table</tt></i>�:</span></td><td> An id table 485</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlGetID"></a>xmlGetID ()</h3><pre class="programlisting"><a href="libxml-tree.html#xmlAttrPtr">xmlAttrPtr</a> xmlGetID (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, 486 const <a href="libxml-tree.html#xmlChar">xmlChar</a> *ID);</pre><p> 487Search the attribute declaring the given ID</p><p> 488 489</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>doc</tt></i>�:</span></td><td> pointer to the document 490</td></tr><tr><td><span class="term"><i class="parameter"><tt>ID</tt></i>�:</span></td><td> the ID value 491</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>NULL if not found, otherwise the xmlAttrPtr defining the ID 492</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlIsID"></a>xmlIsID ()</h3><pre class="programlisting">int xmlIsID (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, 493 <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> elem, 494 <a href="libxml-tree.html#xmlAttrPtr">xmlAttrPtr</a> attr);</pre><p> 495Determine whether an attribute is of type ID. In case we have DTD(s) 496then this is done if DTD loading has been requested. In the case 497of HTML documents parsed with the HTML parser, then ID detection is 498done systematically.</p><p> 499 500</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>doc</tt></i>�:</span></td><td> the document 501</td></tr><tr><td><span class="term"><i class="parameter"><tt>elem</tt></i>�:</span></td><td> the element carrying the attribute 502</td></tr><tr><td><span class="term"><i class="parameter"><tt>attr</tt></i>�:</span></td><td> the attribute 503</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>0 or 1 depending on the lookup result 504</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlRemoveID"></a>xmlRemoveID ()</h3><pre class="programlisting">int xmlRemoveID (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, 505 <a href="libxml-tree.html#xmlAttrPtr">xmlAttrPtr</a> attr);</pre><p> 506Remove the given attribute from the ID table maintained internally.</p><p> 507 508</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>doc</tt></i>�:</span></td><td> the document 509</td></tr><tr><td><span class="term"><i class="parameter"><tt>attr</tt></i>�:</span></td><td> the attribute 510</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>-1 if the lookup failed and 0 otherwise 511</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlAddRef"></a>xmlAddRef ()</h3><pre class="programlisting"><a href="libxml-tree.html#xmlRefPtr">xmlRefPtr</a> xmlAddRef (<a href="libxml-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a> ctxt, 512 <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, 513 const <a href="libxml-tree.html#xmlChar">xmlChar</a> *value, 514 <a href="libxml-tree.html#xmlAttrPtr">xmlAttrPtr</a> attr);</pre><p> 515Register a new ref declaration</p><p> 516 517</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>ctxt</tt></i>�:</span></td><td> the validation context 518</td></tr><tr><td><span class="term"><i class="parameter"><tt>doc</tt></i>�:</span></td><td> pointer to the document 519</td></tr><tr><td><span class="term"><i class="parameter"><tt>value</tt></i>�:</span></td><td> the value name 520</td></tr><tr><td><span class="term"><i class="parameter"><tt>attr</tt></i>�:</span></td><td> the attribute holding the Ref 521</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>NULL if not, otherwise the new xmlRefPtr 522</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlFreeRefTable"></a>xmlFreeRefTable ()</h3><pre class="programlisting">void xmlFreeRefTable (<a href="libxml-valid.html#xmlRefTablePtr">xmlRefTablePtr</a> table);</pre><p> 523Deallocate the memory used by an Ref hash table.</p><p> 524 525</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>table</tt></i>�:</span></td><td> An ref table 526</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlIsRef"></a>xmlIsRef ()</h3><pre class="programlisting">int xmlIsRef (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, 527 <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> elem, 528 <a href="libxml-tree.html#xmlAttrPtr">xmlAttrPtr</a> attr);</pre><p> 529Determine whether an attribute is of type Ref. In case we have DTD(s) 530then this is simple, otherwise we use an heuristic: name Ref (upper 531or lowercase).</p><p> 532 533</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>doc</tt></i>�:</span></td><td> the document 534</td></tr><tr><td><span class="term"><i class="parameter"><tt>elem</tt></i>�:</span></td><td> the element carrying the attribute 535</td></tr><tr><td><span class="term"><i class="parameter"><tt>attr</tt></i>�:</span></td><td> the attribute 536</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>0 or 1 depending on the lookup result 537</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlRemoveRef"></a>xmlRemoveRef ()</h3><pre class="programlisting">int xmlRemoveRef (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, 538 <a href="libxml-tree.html#xmlAttrPtr">xmlAttrPtr</a> attr);</pre><p> 539Remove the given attribute from the Ref table maintained internally.</p><p> 540 541</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>doc</tt></i>�:</span></td><td> the document 542</td></tr><tr><td><span class="term"><i class="parameter"><tt>attr</tt></i>�:</span></td><td> the attribute 543</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>-1 if the lookup failed and 0 otherwise 544</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlGetRefs"></a>xmlGetRefs ()</h3><pre class="programlisting"><a href="libxml-list.html#xmlListPtr">xmlListPtr</a> xmlGetRefs (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, 545 const <a href="libxml-tree.html#xmlChar">xmlChar</a> *ID);</pre><p> 546Find the set of references for the supplied ID.</p><p> 547 548</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>doc</tt></i>�:</span></td><td> pointer to the document 549</td></tr><tr><td><span class="term"><i class="parameter"><tt>ID</tt></i>�:</span></td><td> the ID value 550</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>NULL if not found, otherwise node set for the ID. 551</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlValidateRoot"></a>xmlValidateRoot ()</h3><pre class="programlisting">int xmlValidateRoot (<a href="libxml-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a> ctxt, 552 <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc);</pre><p> 553Try to validate a the root element 554basically it does the following check as described by the 555XML-1.0 recommendation: 556 - [ VC: Root Element Type ] 557it doesn't try to recurse or apply other check to the element</p><p> 558 559</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>ctxt</tt></i>�:</span></td><td> the validation context 560</td></tr><tr><td><span class="term"><i class="parameter"><tt>doc</tt></i>�:</span></td><td> a document instance 561</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>1 if valid or 0 otherwise 562</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlValidateElementDecl"></a>xmlValidateElementDecl ()</h3><pre class="programlisting">int xmlValidateElementDecl (<a href="libxml-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a> ctxt, 563 <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, 564 <a href="libxml-tree.html#xmlElementPtr">xmlElementPtr</a> elem);</pre><p> 565Try to validate a single element definition 566basically it does the following checks as described by the 567XML-1.0 recommendation: 568 - [ VC: One ID per Element Type ] 569 - [ VC: No Duplicate Types ] 570 - [ VC: Unique Element Type Declaration ]</p><p> 571 572</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>ctxt</tt></i>�:</span></td><td> the validation context 573</td></tr><tr><td><span class="term"><i class="parameter"><tt>doc</tt></i>�:</span></td><td> a document instance 574</td></tr><tr><td><span class="term"><i class="parameter"><tt>elem</tt></i>�:</span></td><td> an element definition 575</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>1 if valid or 0 otherwise 576</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlValidNormalizeAttributeValue"></a>xmlValidNormalizeAttributeValue ()</h3><pre class="programlisting"><a href="libxml-tree.html#xmlChar">xmlChar</a>* xmlValidNormalizeAttributeValue (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, 577 <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> elem, 578 const <a href="libxml-tree.html#xmlChar">xmlChar</a> *name, 579 const <a href="libxml-tree.html#xmlChar">xmlChar</a> *value);</pre><p> 580Does the validation related extra step of the normalization of attribute 581values: 582</p><p> 583If the declared value is not CDATA, then the XML processor must further 584process the normalized attribute value by discarding any leading and 585trailing space (<GTKDOCLINK xmlns="http://www.w3.org/TR/xhtml1/transitional" HREF="x20">x20</GTKDOCLINK>) characters, and by replacing sequences of space 586(<GTKDOCLINK xmlns="http://www.w3.org/TR/xhtml1/transitional" HREF="x20">x20</GTKDOCLINK>) characters by single space (<GTKDOCLINK xmlns="http://www.w3.org/TR/xhtml1/transitional" HREF="x20">x20</GTKDOCLINK>) character.</p><p> 587 588</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>doc</tt></i>�:</span></td><td> the document 589</td></tr><tr><td><span class="term"><i class="parameter"><tt>elem</tt></i>�:</span></td><td> the parent 590</td></tr><tr><td><span class="term"><i class="parameter"><tt>name</tt></i>�:</span></td><td> the attribute name 591</td></tr><tr><td><span class="term"><i class="parameter"><tt>value</tt></i>�:</span></td><td> the attribute value 592</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>a new normalized string if normalization is needed, NULL otherwise 593 the caller must free the returned value. 594</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlValidCtxtNormalizeAttributeValue"></a>xmlValidCtxtNormalizeAttributeValue ()</h3><pre class="programlisting"><a href="libxml-tree.html#xmlChar">xmlChar</a>* xmlValidCtxtNormalizeAttributeValue 595 (<a href="libxml-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a> ctxt, 596 <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, 597 <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> elem, 598 const <a href="libxml-tree.html#xmlChar">xmlChar</a> *name, 599 const <a href="libxml-tree.html#xmlChar">xmlChar</a> *value);</pre><p> 600Does the validation related extra step of the normalization of attribute 601values: 602</p><p> 603If the declared value is not CDATA, then the XML processor must further 604process the normalized attribute value by discarding any leading and 605trailing space (<GTKDOCLINK xmlns="http://www.w3.org/TR/xhtml1/transitional" HREF="x20">x20</GTKDOCLINK>) characters, and by replacing sequences of space 606(<GTKDOCLINK xmlns="http://www.w3.org/TR/xhtml1/transitional" HREF="x20">x20</GTKDOCLINK>) characters by single space (<GTKDOCLINK xmlns="http://www.w3.org/TR/xhtml1/transitional" HREF="x20">x20</GTKDOCLINK>) character. 607</p><p> 608Also check VC: Standalone Document Declaration in P32, and update 609 ctxt->valid accordingly</p><p> 610 611</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>ctxt</tt></i>�:</span></td><td> the validation context 612</td></tr><tr><td><span class="term"><i class="parameter"><tt>doc</tt></i>�:</span></td><td> the document 613</td></tr><tr><td><span class="term"><i class="parameter"><tt>elem</tt></i>�:</span></td><td> the parent 614</td></tr><tr><td><span class="term"><i class="parameter"><tt>name</tt></i>�:</span></td><td> the attribute name 615</td></tr><tr><td><span class="term"><i class="parameter"><tt>value</tt></i>�:</span></td><td> the attribute value 616</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>a new normalized string if normalization is needed, NULL otherwise 617 the caller must free the returned value. 618</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlValidateAttributeDecl"></a>xmlValidateAttributeDecl ()</h3><pre class="programlisting">int xmlValidateAttributeDecl (<a href="libxml-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a> ctxt, 619 <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, 620 <a href="libxml-tree.html#xmlAttributePtr">xmlAttributePtr</a> attr);</pre><p> 621Try to validate a single attribute definition 622basically it does the following checks as described by the 623XML-1.0 recommendation: 624 - [ VC: Attribute Default Legal ] 625 - [ VC: Enumeration ] 626 - [ VC: ID Attribute Default ] 627</p><p> 628The ID/IDREF uniqueness and matching are done separately</p><p> 629 630</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>ctxt</tt></i>�:</span></td><td> the validation context 631</td></tr><tr><td><span class="term"><i class="parameter"><tt>doc</tt></i>�:</span></td><td> a document instance 632</td></tr><tr><td><span class="term"><i class="parameter"><tt>attr</tt></i>�:</span></td><td> an attribute definition 633</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>1 if valid or 0 otherwise 634</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlValidateAttributeValue"></a>xmlValidateAttributeValue ()</h3><pre class="programlisting">int xmlValidateAttributeValue (<a href="libxml-tree.html#xmlAttributeType">xmlAttributeType</a> type, 635 const <a href="libxml-tree.html#xmlChar">xmlChar</a> *value);</pre><p> 636Validate that the given attribute value match the proper production 637</p><p> 638[ VC: ID ] 639Values of type ID must match the Name production.... 640</p><p> 641[ VC: IDREF ] 642Values of type IDREF must match the Name production, and values 643of type IDREFS must match Names ... 644</p><p> 645[ VC: Entity Name ] 646Values of type ENTITY must match the Name production, values 647of type ENTITIES must match Names ... 648</p><p> 649[ VC: Name Token ] 650Values of type NMTOKEN must match the Nmtoken production; values 651of type NMTOKENS must match Nmtokens.</p><p> 652 653</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>type</tt></i>�:</span></td><td> an attribute type 654</td></tr><tr><td><span class="term"><i class="parameter"><tt>value</tt></i>�:</span></td><td> an attribute value 655</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>1 if valid or 0 otherwise 656</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlValidateNotationDecl"></a>xmlValidateNotationDecl ()</h3><pre class="programlisting">int xmlValidateNotationDecl (<a href="libxml-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a> ctxt, 657 <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, 658 <a href="libxml-tree.html#xmlNotationPtr">xmlNotationPtr</a> nota);</pre><p> 659Try to validate a single notation definition 660basically it does the following checks as described by the 661XML-1.0 recommendation: 662 - it seems that no validity constraint exists on notation declarations 663But this function get called anyway ...</p><p> 664 665</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>ctxt</tt></i>�:</span></td><td> the validation context 666</td></tr><tr><td><span class="term"><i class="parameter"><tt>doc</tt></i>�:</span></td><td> a document instance 667</td></tr><tr><td><span class="term"><i class="parameter"><tt>nota</tt></i>�:</span></td><td> a notation definition 668</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>1 if valid or 0 otherwise 669</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlValidateDtd"></a>xmlValidateDtd ()</h3><pre class="programlisting">int xmlValidateDtd (<a href="libxml-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a> ctxt, 670 <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, 671 <a href="libxml-tree.html#xmlDtdPtr">xmlDtdPtr</a> dtd);</pre><p> 672Try to validate the document against the dtd instance 673</p><p> 674basically it does check all the definitions in the DtD.</p><p> 675 676</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>ctxt</tt></i>�:</span></td><td> the validation context 677</td></tr><tr><td><span class="term"><i class="parameter"><tt>doc</tt></i>�:</span></td><td> a document instance 678</td></tr><tr><td><span class="term"><i class="parameter"><tt>dtd</tt></i>�:</span></td><td> a dtd instance 679</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>1 if valid or 0 otherwise 680</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlValidateDtdFinal"></a>xmlValidateDtdFinal ()</h3><pre class="programlisting">int xmlValidateDtdFinal (<a href="libxml-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a> ctxt, 681 <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc);</pre><p> 682Does the final step for the dtds validation once all the 683subsets have been parsed 684</p><p> 685basically it does the following checks described by the XML Rec 686- check that ENTITY and ENTITIES type attributes default or 687 possible values matches one of the defined entities. 688- check that NOTATION type attributes default or 689 possible values matches one of the defined notations.</p><p> 690 691</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>ctxt</tt></i>�:</span></td><td> the validation context 692</td></tr><tr><td><span class="term"><i class="parameter"><tt>doc</tt></i>�:</span></td><td> a document instance 693</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>1 if valid or 0 if invalid and -1 if not well-formed 694</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlValidateDocument"></a>xmlValidateDocument ()</h3><pre class="programlisting">int xmlValidateDocument (<a href="libxml-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a> ctxt, 695 <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc);</pre><p> 696Try to validate the document instance 697</p><p> 698basically it does the all the checks described by the XML Rec 699i.e. validates the internal and external subset (if present) 700and validate the document tree.</p><p> 701 702</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>ctxt</tt></i>�:</span></td><td> the validation context 703</td></tr><tr><td><span class="term"><i class="parameter"><tt>doc</tt></i>�:</span></td><td> a document instance 704</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>1 if valid or 0 otherwise 705</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlValidateElement"></a>xmlValidateElement ()</h3><pre class="programlisting">int xmlValidateElement (<a href="libxml-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a> ctxt, 706 <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, 707 <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> elem);</pre><p> 708Try to validate the subtree under an element</p><p> 709 710</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>ctxt</tt></i>�:</span></td><td> the validation context 711</td></tr><tr><td><span class="term"><i class="parameter"><tt>doc</tt></i>�:</span></td><td> a document instance 712</td></tr><tr><td><span class="term"><i class="parameter"><tt>elem</tt></i>�:</span></td><td> an element instance 713</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>1 if valid or 0 otherwise 714</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlValidateOneElement"></a>xmlValidateOneElement ()</h3><pre class="programlisting">int xmlValidateOneElement (<a href="libxml-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a> ctxt, 715 <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, 716 <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> elem);</pre><p> 717Try to validate a single element and it's attributes, 718basically it does the following checks as described by the 719XML-1.0 recommendation: 720 - [ VC: Element Valid ] 721 - [ VC: Required Attribute ] 722Then call <a href="libxml-valid.html#xmlValidateOneAttribute">xmlValidateOneAttribute</a>() for each attribute present. 723</p><p> 724The ID/IDREF checkings are done separately</p><p> 725 726</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>ctxt</tt></i>�:</span></td><td> the validation context 727</td></tr><tr><td><span class="term"><i class="parameter"><tt>doc</tt></i>�:</span></td><td> a document instance 728</td></tr><tr><td><span class="term"><i class="parameter"><tt>elem</tt></i>�:</span></td><td> an element instance 729</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>1 if valid or 0 otherwise 730</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlValidateOneAttribute"></a>xmlValidateOneAttribute ()</h3><pre class="programlisting">int xmlValidateOneAttribute (<a href="libxml-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a> ctxt, 731 <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, 732 <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> elem, 733 <a href="libxml-tree.html#xmlAttrPtr">xmlAttrPtr</a> attr, 734 const <a href="libxml-tree.html#xmlChar">xmlChar</a> *value);</pre><p> 735Try to validate a single attribute for an element 736basically it does the following checks as described by the 737XML-1.0 recommendation: 738 - [ VC: Attribute Value Type ] 739 - [ VC: Fixed Attribute Default ] 740 - [ VC: Entity Name ] 741 - [ VC: Name Token ] 742 - [ VC: ID ] 743 - [ VC: IDREF ] 744 - [ VC: Entity Name ] 745 - [ VC: Notation Attributes ] 746</p><p> 747The ID/IDREF uniqueness and matching are done separately</p><p> 748 749</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>ctxt</tt></i>�:</span></td><td> the validation context 750</td></tr><tr><td><span class="term"><i class="parameter"><tt>doc</tt></i>�:</span></td><td> a document instance 751</td></tr><tr><td><span class="term"><i class="parameter"><tt>elem</tt></i>�:</span></td><td> an element instance 752</td></tr><tr><td><span class="term"><i class="parameter"><tt>attr</tt></i>�:</span></td><td> an attribute instance 753</td></tr><tr><td><span class="term"><i class="parameter"><tt>value</tt></i>�:</span></td><td> the attribute value (without entities processing) 754</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>1 if valid or 0 otherwise 755</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlValidateOneNamespace"></a>xmlValidateOneNamespace ()</h3><pre class="programlisting">int xmlValidateOneNamespace (<a href="libxml-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a> ctxt, 756 <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, 757 <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> elem, 758 const <a href="libxml-tree.html#xmlChar">xmlChar</a> *prefix, 759 <a href="libxml-tree.html#xmlNsPtr">xmlNsPtr</a> ns, 760 const <a href="libxml-tree.html#xmlChar">xmlChar</a> *value);</pre><p> 761Try to validate a single namespace declaration for an element 762basically it does the following checks as described by the 763XML-1.0 recommendation: 764 - [ VC: Attribute Value Type ] 765 - [ VC: Fixed Attribute Default ] 766 - [ VC: Entity Name ] 767 - [ VC: Name Token ] 768 - [ VC: ID ] 769 - [ VC: IDREF ] 770 - [ VC: Entity Name ] 771 - [ VC: Notation Attributes ] 772</p><p> 773The ID/IDREF uniqueness and matching are done separately</p><p> 774 775</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>ctxt</tt></i>�:</span></td><td> the validation context 776</td></tr><tr><td><span class="term"><i class="parameter"><tt>doc</tt></i>�:</span></td><td> a document instance 777</td></tr><tr><td><span class="term"><i class="parameter"><tt>elem</tt></i>�:</span></td><td> an element instance 778</td></tr><tr><td><span class="term"><i class="parameter"><tt>prefix</tt></i>�:</span></td><td> the namespace prefix 779</td></tr><tr><td><span class="term"><i class="parameter"><tt>ns</tt></i>�:</span></td><td> an namespace declaration instance 780</td></tr><tr><td><span class="term"><i class="parameter"><tt>value</tt></i>�:</span></td><td> the attribute value (without entities processing) 781</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>1 if valid or 0 otherwise 782</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlValidateDocumentFinal"></a>xmlValidateDocumentFinal ()</h3><pre class="programlisting">int xmlValidateDocumentFinal (<a href="libxml-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a> ctxt, 783 <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc);</pre><p> 784Does the final step for the document validation once all the 785incremental validation steps have been completed 786</p><p> 787basically it does the following checks described by the XML Rec 788</p><p> 789Check all the IDREF/IDREFS attributes definition for validity</p><p> 790 791</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>ctxt</tt></i>�:</span></td><td> the validation context 792</td></tr><tr><td><span class="term"><i class="parameter"><tt>doc</tt></i>�:</span></td><td> a document instance 793</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>1 if valid or 0 otherwise 794</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlValidateNotationUse"></a>xmlValidateNotationUse ()</h3><pre class="programlisting">int xmlValidateNotationUse (<a href="libxml-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a> ctxt, 795 <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, 796 const <a href="libxml-tree.html#xmlChar">xmlChar</a> *notationName);</pre><p> 797Validate that the given name match a notation declaration. 798- [ VC: Notation Declared ]</p><p> 799 800</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>ctxt</tt></i>�:</span></td><td> the validation context 801</td></tr><tr><td><span class="term"><i class="parameter"><tt>doc</tt></i>�:</span></td><td> the document 802</td></tr><tr><td><span class="term"><i class="parameter"><tt>notationName</tt></i>�:</span></td><td> the notation name to check 803</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>1 if valid or 0 otherwise 804</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlIsMixedElement"></a>xmlIsMixedElement ()</h3><pre class="programlisting">int xmlIsMixedElement (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, 805 const <a href="libxml-tree.html#xmlChar">xmlChar</a> *name);</pre><p> 806Search in the DtDs whether an element accept Mixed content (or ANY) 807basically if it is supposed to accept text childs</p><p> 808 809</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>doc</tt></i>�:</span></td><td> the document 810</td></tr><tr><td><span class="term"><i class="parameter"><tt>name</tt></i>�:</span></td><td> the element name 811</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>0 if no, 1 if yes, and -1 if no element description is available 812</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlGetDtdAttrDesc"></a>xmlGetDtdAttrDesc ()</h3><pre class="programlisting"><a href="libxml-tree.html#xmlAttributePtr">xmlAttributePtr</a> xmlGetDtdAttrDesc (<a href="libxml-tree.html#xmlDtdPtr">xmlDtdPtr</a> dtd, 813 const <a href="libxml-tree.html#xmlChar">xmlChar</a> *elem, 814 const <a href="libxml-tree.html#xmlChar">xmlChar</a> *name);</pre><p> 815Search the DTD for the description of this attribute on 816this element.</p><p> 817 818</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>dtd</tt></i>�:</span></td><td> a pointer to the DtD to search 819</td></tr><tr><td><span class="term"><i class="parameter"><tt>elem</tt></i>�:</span></td><td> the element name 820</td></tr><tr><td><span class="term"><i class="parameter"><tt>name</tt></i>�:</span></td><td> the attribute name 821</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>the xmlAttributePtr if found or NULL 822</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlGetDtdQAttrDesc"></a>xmlGetDtdQAttrDesc ()</h3><pre class="programlisting"><a href="libxml-tree.html#xmlAttributePtr">xmlAttributePtr</a> xmlGetDtdQAttrDesc (<a href="libxml-tree.html#xmlDtdPtr">xmlDtdPtr</a> dtd, 823 const <a href="libxml-tree.html#xmlChar">xmlChar</a> *elem, 824 const <a href="libxml-tree.html#xmlChar">xmlChar</a> *name, 825 const <a href="libxml-tree.html#xmlChar">xmlChar</a> *prefix);</pre><p> 826Search the DTD for the description of this qualified attribute on 827this element.</p><p> 828 829</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>dtd</tt></i>�:</span></td><td> a pointer to the DtD to search 830</td></tr><tr><td><span class="term"><i class="parameter"><tt>elem</tt></i>�:</span></td><td> the element name 831</td></tr><tr><td><span class="term"><i class="parameter"><tt>name</tt></i>�:</span></td><td> the attribute name 832</td></tr><tr><td><span class="term"><i class="parameter"><tt>prefix</tt></i>�:</span></td><td> the attribute namespace prefix 833</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>the xmlAttributePtr if found or NULL 834</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlGetDtdNotationDesc"></a>xmlGetDtdNotationDesc ()</h3><pre class="programlisting"><a href="libxml-tree.html#xmlNotationPtr">xmlNotationPtr</a> xmlGetDtdNotationDesc (<a href="libxml-tree.html#xmlDtdPtr">xmlDtdPtr</a> dtd, 835 const <a href="libxml-tree.html#xmlChar">xmlChar</a> *name);</pre><p> 836Search the DTD for the description of this notation</p><p> 837 838</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>dtd</tt></i>�:</span></td><td> a pointer to the DtD to search 839</td></tr><tr><td><span class="term"><i class="parameter"><tt>name</tt></i>�:</span></td><td> the notation name 840</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>the xmlNotationPtr if found or NULL 841</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlGetDtdQElementDesc"></a>xmlGetDtdQElementDesc ()</h3><pre class="programlisting"><a href="libxml-tree.html#xmlElementPtr">xmlElementPtr</a> xmlGetDtdQElementDesc (<a href="libxml-tree.html#xmlDtdPtr">xmlDtdPtr</a> dtd, 842 const <a href="libxml-tree.html#xmlChar">xmlChar</a> *name, 843 const <a href="libxml-tree.html#xmlChar">xmlChar</a> *prefix);</pre><p> 844Search the DTD for the description of this element</p><p> 845 846</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>dtd</tt></i>�:</span></td><td> a pointer to the DtD to search 847</td></tr><tr><td><span class="term"><i class="parameter"><tt>name</tt></i>�:</span></td><td> the element name 848</td></tr><tr><td><span class="term"><i class="parameter"><tt>prefix</tt></i>�:</span></td><td> the element namespace prefix 849</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>the xmlElementPtr if found or NULL 850</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlGetDtdElementDesc"></a>xmlGetDtdElementDesc ()</h3><pre class="programlisting"><a href="libxml-tree.html#xmlElementPtr">xmlElementPtr</a> xmlGetDtdElementDesc (<a href="libxml-tree.html#xmlDtdPtr">xmlDtdPtr</a> dtd, 851 const <a href="libxml-tree.html#xmlChar">xmlChar</a> *name);</pre><p> 852Search the DTD for the description of this element</p><p> 853 854</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>dtd</tt></i>�:</span></td><td> a pointer to the DtD to search 855</td></tr><tr><td><span class="term"><i class="parameter"><tt>name</tt></i>�:</span></td><td> the element name 856</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>the xmlElementPtr if found or NULL 857</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlValidGetValidElements"></a>xmlValidGetValidElements ()</h3><pre class="programlisting">int xmlValidGetValidElements (<a href="libxml-tree.html#xmlNode">xmlNode</a> *prev, 858 <a href="libxml-tree.html#xmlNode">xmlNode</a> *next, 859 const <a href="libxml-tree.html#xmlChar">xmlChar</a> **list, 860 int max);</pre><p> 861This function returns the list of authorized children to insert 862within an existing tree while respecting the validity constraints 863forced by the Dtd. The insertion point is defined using <i class="parameter"><tt>prev</tt></i> and 864<i class="parameter"><tt>next</tt></i> in the following ways: 865 to insert before 'node': xmlValidGetValidElements(node->prev, node, ... 866 to insert next 'node': xmlValidGetValidElements(node, node->next, ... 867 to replace 'node': xmlValidGetValidElements(node->prev, node->next, ... 868 to prepend a child to 'node': xmlValidGetValidElements(NULL, node->childs, 869 to append a child to 'node': xmlValidGetValidElements(node->last, NULL, ... 870</p><p> 871pointers to the element names are inserted at the beginning of the array 872and do not need to be freed.</p><p> 873 874</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>prev</tt></i>�:</span></td><td> an element to insert after 875</td></tr><tr><td><span class="term"><i class="parameter"><tt>next</tt></i>�:</span></td><td> an element to insert next 876</td></tr><tr><td><span class="term"><i class="parameter"><tt>list</tt></i>�:</span></td><td> an array to store the list of child names 877</td></tr><tr><td><span class="term"><i class="parameter"><tt>max</tt></i>�:</span></td><td> the size of the array 878</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>the number of element in the list, or -1 in case of error. If 879 the function returns the value <i class="parameter"><tt>max</tt></i> the caller is invited to grow the 880 receiving array and retry. 881</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlValidGetPotentialChildren"></a>xmlValidGetPotentialChildren ()</h3><pre class="programlisting">int xmlValidGetPotentialChildren (<a href="libxml-tree.html#xmlElementContent">xmlElementContent</a> *ctree, 882 const <a href="libxml-tree.html#xmlChar">xmlChar</a> **list, 883 int *len, 884 int max);</pre><p> 885Build/extend a list of potential children allowed by the content tree</p><p> 886 887</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>ctree</tt></i>�:</span></td><td> an element content tree 888</td></tr><tr><td><span class="term"><i class="parameter"><tt>list</tt></i>�:</span></td><td> an array to store the list of child names 889</td></tr><tr><td><span class="term"><i class="parameter"><tt>len</tt></i>�:</span></td><td> a pointer to the number of element in the list 890</td></tr><tr><td><span class="term"><i class="parameter"><tt>max</tt></i>�:</span></td><td> the size of the array 891</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>the number of element in the list, or -1 in case of error. 892</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlValidateNameValue"></a>xmlValidateNameValue ()</h3><pre class="programlisting">int xmlValidateNameValue (const <a href="libxml-tree.html#xmlChar">xmlChar</a> *value);</pre><p> 893Validate that the given value match Name production</p><p> 894 895</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>value</tt></i>�:</span></td><td> an Name value 896</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>1 if valid or 0 otherwise 897</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlValidateNamesValue"></a>xmlValidateNamesValue ()</h3><pre class="programlisting">int xmlValidateNamesValue (const <a href="libxml-tree.html#xmlChar">xmlChar</a> *value);</pre><p> 898Validate that the given value match Names production</p><p> 899 900</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>value</tt></i>�:</span></td><td> an Names value 901</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>1 if valid or 0 otherwise 902</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlValidateNmtokenValue"></a>xmlValidateNmtokenValue ()</h3><pre class="programlisting">int xmlValidateNmtokenValue (const <a href="libxml-tree.html#xmlChar">xmlChar</a> *value);</pre><p> 903Validate that the given value match Nmtoken production 904</p><p> 905[ VC: Name Token ]</p><p> 906 907</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>value</tt></i>�:</span></td><td> an Nmtoken value 908</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>1 if valid or 0 otherwise 909</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlValidateNmtokensValue"></a>xmlValidateNmtokensValue ()</h3><pre class="programlisting">int xmlValidateNmtokensValue (const <a href="libxml-tree.html#xmlChar">xmlChar</a> *value);</pre><p> 910Validate that the given value match Nmtokens production 911</p><p> 912[ VC: Name Token ]</p><p> 913 914</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>value</tt></i>�:</span></td><td> an Nmtokens value 915</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>1 if valid or 0 otherwise 916</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlValidBuildContentModel"></a>xmlValidBuildContentModel ()</h3><pre class="programlisting">int xmlValidBuildContentModel (<a href="libxml-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a> ctxt, 917 <a href="libxml-tree.html#xmlElementPtr">xmlElementPtr</a> elem);</pre><p> 918(Re)Build the automata associated to the content model of this 919element</p><p> 920 921</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>ctxt</tt></i>�:</span></td><td> a validation context 922</td></tr><tr><td><span class="term"><i class="parameter"><tt>elem</tt></i>�:</span></td><td> an element declaration node 923</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>1 in case of success, 0 in case of error 924</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlValidatePushElement"></a>xmlValidatePushElement ()</h3><pre class="programlisting">int xmlValidatePushElement (<a href="libxml-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a> ctxt, 925 <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, 926 <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> elem, 927 const <a href="libxml-tree.html#xmlChar">xmlChar</a> *qname);</pre><p> 928Push a new element start on the validation stack.</p><p> 929 930</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>ctxt</tt></i>�:</span></td><td> the validation context 931</td></tr><tr><td><span class="term"><i class="parameter"><tt>doc</tt></i>�:</span></td><td> a document instance 932</td></tr><tr><td><span class="term"><i class="parameter"><tt>elem</tt></i>�:</span></td><td> an element instance 933</td></tr><tr><td><span class="term"><i class="parameter"><tt>qname</tt></i>�:</span></td><td> the qualified name as appearing in the serialization 934</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>1 if no validation problem was found or 0 otherwise 935</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlValidatePushCData"></a>xmlValidatePushCData ()</h3><pre class="programlisting">int xmlValidatePushCData (<a href="libxml-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a> ctxt, 936 const <a href="libxml-tree.html#xmlChar">xmlChar</a> *data, 937 int len);</pre><p> 938check the CData parsed for validation in the current stack</p><p> 939 940</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>ctxt</tt></i>�:</span></td><td> the validation context 941</td></tr><tr><td><span class="term"><i class="parameter"><tt>data</tt></i>�:</span></td><td> some character data read 942</td></tr><tr><td><span class="term"><i class="parameter"><tt>len</tt></i>�:</span></td><td> the lenght of the data 943</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>1 if no validation problem was found or 0 otherwise 944</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlValidatePopElement"></a>xmlValidatePopElement ()</h3><pre class="programlisting">int xmlValidatePopElement (<a href="libxml-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a> ctxt, 945 <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, 946 <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> elem, 947 const <a href="libxml-tree.html#xmlChar">xmlChar</a> *qname);</pre><p> 948Pop the element end from the validation stack.</p><p> 949 950</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>ctxt</tt></i>�:</span></td><td> the validation context 951</td></tr><tr><td><span class="term"><i class="parameter"><tt>doc</tt></i>�:</span></td><td> a document instance 952</td></tr><tr><td><span class="term"><i class="parameter"><tt>elem</tt></i>�:</span></td><td> an element instance 953</td></tr><tr><td><span class="term"><i class="parameter"><tt>qname</tt></i>�:</span></td><td> the qualified name as appearing in the serialization 954</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>1 if no validation problem was found or 0 otherwise 955</td></tr></tbody></table></div></div></div></div><table xmlns="http://www.w3.org/TR/xhtml1/transitional" class="navigation" width="100%" summary="Navigation footer" cellpadding="2" cellspacing="0"><tr valign="middle"><td align="left"><a accesskey="p" href="libxml-HTMLparser.html"><b><<�HTMLparser</b></a></td><td align="right"><a accesskey="n" href="libxml-catalog.html"><b>catalog�>></b></a></td></tr></table></body></html> 956