1<html> 2<head> 3<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> 4<title>xmlschemastypes: implementation of XML Schema Datatypes</title> 5<meta name="generator" content="Libxml2 devhelp stylesheet"> 6<link rel="start" href="index.html" title="libxml2 Reference Manual"> 7<link rel="up" href="general.html" title="API"> 8<link rel="stylesheet" href="style.css" type="text/css"> 9<link rel="chapter" href="general.html" title="API"> 10</head> 11<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> 12<table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle"> 13<td><a accesskey="p" href="libxml2-xmlschemas.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td> 14<td><a accesskey="u" href="general.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td> 15<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td> 16<td><a accesskey="n" href="libxml2-xmlstring.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td> 17<th width="100%" align="center">libxml2 Reference Manual</th> 18</tr></table> 19<h2><span class="refentrytitle">xmlschemastypes</span></h2> 20<p>xmlschemastypes - implementation of XML Schema Datatypes</p> 21<p>module providing the XML Schema Datatypes implementation both definition and validity checking </p> 22<p>Author(s): Daniel Veillard </p> 23<div class="refsynopsisdiv"> 24<h2>Synopsis</h2> 25<pre class="synopsis">typedef enum <a href="#xmlSchemaWhitespaceValueType">xmlSchemaWhitespaceValueType</a>; 26int <a href="#xmlSchemaCheckFacet">xmlSchemaCheckFacet</a> (<a href="libxml2-schemasInternals.html#xmlSchemaFacetPtr">xmlSchemaFacetPtr</a> facet, <br> <a href="libxml2-schemasInternals.html#xmlSchemaTypePtr">xmlSchemaTypePtr</a> typeDecl, <br> <a href="libxml2-xmlschemas.html#xmlSchemaParserCtxtPtr">xmlSchemaParserCtxtPtr</a> pctxt, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name); 27void <a href="#xmlSchemaCleanupTypes">xmlSchemaCleanupTypes</a> (void); 28<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlSchemaCollapseString">xmlSchemaCollapseString</a> (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value); 29int <a href="#xmlSchemaCompareValues">xmlSchemaCompareValues</a> (<a href="libxml2-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> x, <br> <a href="libxml2-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> y); 30int <a href="#xmlSchemaCompareValuesWhtsp">xmlSchemaCompareValuesWhtsp</a> (<a href="libxml2-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> x, <br> <a href="libxml2-xmlschemastypes.html#xmlSchemaWhitespaceValueType">xmlSchemaWhitespaceValueType</a> xws, <br> <a href="libxml2-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> y, <br> <a href="libxml2-xmlschemastypes.html#xmlSchemaWhitespaceValueType">xmlSchemaWhitespaceValueType</a> yws); 31<a href="libxml2-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> <a href="#xmlSchemaCopyValue">xmlSchemaCopyValue</a> (<a href="libxml2-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> val); 32void <a href="#xmlSchemaFreeFacet">xmlSchemaFreeFacet</a> (<a href="libxml2-schemasInternals.html#xmlSchemaFacetPtr">xmlSchemaFacetPtr</a> facet); 33void <a href="#xmlSchemaFreeValue">xmlSchemaFreeValue</a> (<a href="libxml2-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> value); 34<a href="libxml2-schemasInternals.html#xmlSchemaTypePtr">xmlSchemaTypePtr</a> <a href="#xmlSchemaGetBuiltInListSimpleTypeItemType">xmlSchemaGetBuiltInListSimpleTypeItemType</a> (<a href="libxml2-schemasInternals.html#xmlSchemaTypePtr">xmlSchemaTypePtr</a> type); 35<a href="libxml2-schemasInternals.html#xmlSchemaTypePtr">xmlSchemaTypePtr</a> <a href="#xmlSchemaGetBuiltInType">xmlSchemaGetBuiltInType</a> (<a href="libxml2-schemasInternals.html#xmlSchemaValType">xmlSchemaValType</a> type); 36int <a href="#xmlSchemaGetCanonValue">xmlSchemaGetCanonValue</a> (<a href="libxml2-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> val, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> ** retValue); 37int <a href="#xmlSchemaGetCanonValueWhtsp">xmlSchemaGetCanonValueWhtsp</a> (<a href="libxml2-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> val, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> ** retValue, <br> <a href="libxml2-xmlschemastypes.html#xmlSchemaWhitespaceValueType">xmlSchemaWhitespaceValueType</a> ws); 38unsigned long <a href="#xmlSchemaGetFacetValueAsULong">xmlSchemaGetFacetValueAsULong</a> (<a href="libxml2-schemasInternals.html#xmlSchemaFacetPtr">xmlSchemaFacetPtr</a> facet); 39<a href="libxml2-schemasInternals.html#xmlSchemaTypePtr">xmlSchemaTypePtr</a> <a href="#xmlSchemaGetPredefinedType">xmlSchemaGetPredefinedType</a> (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * ns); 40<a href="libxml2-schemasInternals.html#xmlSchemaValType">xmlSchemaValType</a> <a href="#xmlSchemaGetValType">xmlSchemaGetValType</a> (<a href="libxml2-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> val); 41int <a href="#xmlSchemaInitTypes">xmlSchemaInitTypes</a> (void); 42int <a href="#xmlSchemaIsBuiltInTypeFacet">xmlSchemaIsBuiltInTypeFacet</a> (<a href="libxml2-schemasInternals.html#xmlSchemaTypePtr">xmlSchemaTypePtr</a> type, <br> int facetType); 43<a href="libxml2-schemasInternals.html#xmlSchemaFacetPtr">xmlSchemaFacetPtr</a> <a href="#xmlSchemaNewFacet">xmlSchemaNewFacet</a> (void); 44<a href="libxml2-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> <a href="#xmlSchemaNewNOTATIONValue">xmlSchemaNewNOTATIONValue</a> (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * ns); 45<a href="libxml2-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> <a href="#xmlSchemaNewQNameValue">xmlSchemaNewQNameValue</a> (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * namespaceName, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * localName); 46<a href="libxml2-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> <a href="#xmlSchemaNewStringValue">xmlSchemaNewStringValue</a> (<a href="libxml2-schemasInternals.html#xmlSchemaValType">xmlSchemaValType</a> type, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value); 47int <a href="#xmlSchemaValPredefTypeNode">xmlSchemaValPredefTypeNode</a> (<a href="libxml2-schemasInternals.html#xmlSchemaTypePtr">xmlSchemaTypePtr</a> type, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value, <br> <a href="libxml2-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> * val, <br> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node); 48int <a href="#xmlSchemaValPredefTypeNodeNoNorm">xmlSchemaValPredefTypeNodeNoNorm</a> (<a href="libxml2-schemasInternals.html#xmlSchemaTypePtr">xmlSchemaTypePtr</a> type, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value, <br> <a href="libxml2-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> * val, <br> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node); 49int <a href="#xmlSchemaValidateFacet">xmlSchemaValidateFacet</a> (<a href="libxml2-schemasInternals.html#xmlSchemaTypePtr">xmlSchemaTypePtr</a> base, <br> <a href="libxml2-schemasInternals.html#xmlSchemaFacetPtr">xmlSchemaFacetPtr</a> facet, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value, <br> <a href="libxml2-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> val); 50int <a href="#xmlSchemaValidateFacetWhtsp">xmlSchemaValidateFacetWhtsp</a> (<a href="libxml2-schemasInternals.html#xmlSchemaFacetPtr">xmlSchemaFacetPtr</a> facet, <br> <a href="libxml2-xmlschemastypes.html#xmlSchemaWhitespaceValueType">xmlSchemaWhitespaceValueType</a> fws, <br> <a href="libxml2-schemasInternals.html#xmlSchemaValType">xmlSchemaValType</a> valType, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value, <br> <a href="libxml2-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> val, <br> <a href="libxml2-xmlschemastypes.html#xmlSchemaWhitespaceValueType">xmlSchemaWhitespaceValueType</a> ws); 51int <a href="#xmlSchemaValidateLengthFacet">xmlSchemaValidateLengthFacet</a> (<a href="libxml2-schemasInternals.html#xmlSchemaTypePtr">xmlSchemaTypePtr</a> type, <br> <a href="libxml2-schemasInternals.html#xmlSchemaFacetPtr">xmlSchemaFacetPtr</a> facet, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value, <br> <a href="libxml2-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> val, <br> unsigned long * length); 52int <a href="#xmlSchemaValidateLengthFacetWhtsp">xmlSchemaValidateLengthFacetWhtsp</a> (<a href="libxml2-schemasInternals.html#xmlSchemaFacetPtr">xmlSchemaFacetPtr</a> facet, <br> <a href="libxml2-schemasInternals.html#xmlSchemaValType">xmlSchemaValType</a> valType, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value, <br> <a href="libxml2-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> val, <br> unsigned long * length, <br> <a href="libxml2-xmlschemastypes.html#xmlSchemaWhitespaceValueType">xmlSchemaWhitespaceValueType</a> ws); 53int <a href="#xmlSchemaValidateListSimpleTypeFacet">xmlSchemaValidateListSimpleTypeFacet</a> (<a href="libxml2-schemasInternals.html#xmlSchemaFacetPtr">xmlSchemaFacetPtr</a> facet, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value, <br> unsigned long actualLen, <br> unsigned long * expectedLen); 54int <a href="#xmlSchemaValidatePredefinedType">xmlSchemaValidatePredefinedType</a> (<a href="libxml2-schemasInternals.html#xmlSchemaTypePtr">xmlSchemaTypePtr</a> type, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value, <br> <a href="libxml2-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> * val); 55int <a href="#xmlSchemaValueAppend">xmlSchemaValueAppend</a> (<a href="libxml2-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> prev, <br> <a href="libxml2-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> cur); 56int <a href="#xmlSchemaValueGetAsBoolean">xmlSchemaValueGetAsBoolean</a> (<a href="libxml2-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> val); 57const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlSchemaValueGetAsString">xmlSchemaValueGetAsString</a> (<a href="libxml2-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> val); 58<a href="libxml2-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> <a href="#xmlSchemaValueGetNext">xmlSchemaValueGetNext</a> (<a href="libxml2-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> cur); 59<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlSchemaWhiteSpaceReplace">xmlSchemaWhiteSpaceReplace</a> (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value); 60</pre> 61</div> 62<div class="refsect1" lang="en"><h2>Description</h2></div> 63<div class="refsect1" lang="en"> 64<h2>Details</h2> 65<div class="refsect2" lang="en"> 66<div class="refsect2" lang="en"> 67<h3> 68<a name="xmlSchemaWhitespaceValueType">Enum </a>xmlSchemaWhitespaceValueType</h3> 69<pre class="programlisting">enum <a href="#xmlSchemaWhitespaceValueType">xmlSchemaWhitespaceValueType</a> { 70 <a name="XML_SCHEMA_WHITESPACE_UNKNOWN">XML_SCHEMA_WHITESPACE_UNKNOWN</a> = 0 71 <a name="XML_SCHEMA_WHITESPACE_PRESERVE">XML_SCHEMA_WHITESPACE_PRESERVE</a> = 1 72 <a name="XML_SCHEMA_WHITESPACE_REPLACE">XML_SCHEMA_WHITESPACE_REPLACE</a> = 2 73 <a name="XML_SCHEMA_WHITESPACE_COLLAPSE">XML_SCHEMA_WHITESPACE_COLLAPSE</a> = 3 74}; 75</pre> 76<p></p> 77</div> 78<hr> 79<div class="refsect2" lang="en"> 80<h3> 81<a name="xmlSchemaCheckFacet"></a>xmlSchemaCheckFacet ()</h3> 82<pre class="programlisting">int xmlSchemaCheckFacet (<a href="libxml2-schemasInternals.html#xmlSchemaFacetPtr">xmlSchemaFacetPtr</a> facet, <br> <a href="libxml2-schemasInternals.html#xmlSchemaTypePtr">xmlSchemaTypePtr</a> typeDecl, <br> <a href="libxml2-xmlschemas.html#xmlSchemaParserCtxtPtr">xmlSchemaParserCtxtPtr</a> pctxt, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name)<br> 83</pre> 84<p>Checks and computes the values of facets.</p> 85<div class="variablelist"><table border="0"> 86<col align="left"> 87<tbody> 88<tr> 89<td><span class="term"><i><tt>facet</tt></i>:</span></td> 90<td>the facet</td> 91</tr> 92<tr> 93<td><span class="term"><i><tt>typeDecl</tt></i>:</span></td> 94<td>the schema type definition</td> 95</tr> 96<tr> 97<td><span class="term"><i><tt>pctxt</tt></i>:</span></td> 98<td>the schema parser context or NULL</td> 99</tr> 100<tr> 101<td><span class="term"><i><tt>name</tt></i>:</span></td> 102<td>the optional name of the type</td> 103</tr> 104<tr> 105<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 106<td>0 if valid, a positive error code if not valid and -1 in case of an internal or API error.</td> 107</tr> 108</tbody> 109</table></div> 110</div> 111<hr> 112<div class="refsect2" lang="en"> 113<h3> 114<a name="xmlSchemaCleanupTypes"></a>xmlSchemaCleanupTypes ()</h3> 115<pre class="programlisting">void xmlSchemaCleanupTypes (void)<br> 116</pre> 117<p>DEPRECATED: This function will be made private. Call <a href="libxml2-parser.html#xmlCleanupParser">xmlCleanupParser</a> to free global state but see the warnings there. <a href="libxml2-parser.html#xmlCleanupParser">xmlCleanupParser</a> should be only called once at program exit. In most cases, you don't have to call cleanup functions at all. Cleanup the default XML Schemas type library</p> 118</div> 119<hr> 120<div class="refsect2" lang="en"> 121<h3> 122<a name="xmlSchemaCollapseString"></a>xmlSchemaCollapseString ()</h3> 123<pre class="programlisting"><a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlSchemaCollapseString (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value)<br> 124</pre> 125<p>Removes and normalize white spaces in the string</p> 126<div class="variablelist"><table border="0"> 127<col align="left"> 128<tbody> 129<tr> 130<td><span class="term"><i><tt>value</tt></i>:</span></td> 131<td>a value</td> 132</tr> 133<tr> 134<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 135<td>the new string or NULL if no change was required.</td> 136</tr> 137</tbody> 138</table></div> 139</div> 140<hr> 141<div class="refsect2" lang="en"> 142<h3> 143<a name="xmlSchemaCompareValues"></a>xmlSchemaCompareValues ()</h3> 144<pre class="programlisting">int xmlSchemaCompareValues (<a href="libxml2-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> x, <br> <a href="libxml2-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> y)<br> 145</pre> 146<p>Compare 2 values</p> 147<div class="variablelist"><table border="0"> 148<col align="left"> 149<tbody> 150<tr> 151<td><span class="term"><i><tt>x</tt></i>:</span></td> 152<td>a first value</td> 153</tr> 154<tr> 155<td><span class="term"><i><tt>y</tt></i>:</span></td> 156<td>a second value</td> 157</tr> 158<tr> 159<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 160<td>-1 if x < y, 0 if x == y, 1 if x > y, 2 if x <> y, and -2 in case of error</td> 161</tr> 162</tbody> 163</table></div> 164</div> 165<hr> 166<div class="refsect2" lang="en"> 167<h3> 168<a name="xmlSchemaCompareValuesWhtsp"></a>xmlSchemaCompareValuesWhtsp ()</h3> 169<pre class="programlisting">int xmlSchemaCompareValuesWhtsp (<a href="libxml2-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> x, <br> <a href="libxml2-xmlschemastypes.html#xmlSchemaWhitespaceValueType">xmlSchemaWhitespaceValueType</a> xws, <br> <a href="libxml2-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> y, <br> <a href="libxml2-xmlschemastypes.html#xmlSchemaWhitespaceValueType">xmlSchemaWhitespaceValueType</a> yws)<br> 170</pre> 171<p>Compare 2 values</p> 172<div class="variablelist"><table border="0"> 173<col align="left"> 174<tbody> 175<tr> 176<td><span class="term"><i><tt>x</tt></i>:</span></td> 177<td>a first value</td> 178</tr> 179<tr> 180<td><span class="term"><i><tt>xws</tt></i>:</span></td> 181<td>the whitespace value of x</td> 182</tr> 183<tr> 184<td><span class="term"><i><tt>y</tt></i>:</span></td> 185<td>a second value</td> 186</tr> 187<tr> 188<td><span class="term"><i><tt>yws</tt></i>:</span></td> 189<td>the whitespace value of y</td> 190</tr> 191<tr> 192<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 193<td>-1 if x < y, 0 if x == y, 1 if x > y, 2 if x <> y, and -2 in case of error</td> 194</tr> 195</tbody> 196</table></div> 197</div> 198<hr> 199<div class="refsect2" lang="en"> 200<h3> 201<a name="xmlSchemaCopyValue"></a>xmlSchemaCopyValue ()</h3> 202<pre class="programlisting"><a href="libxml2-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> xmlSchemaCopyValue (<a href="libxml2-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> val)<br> 203</pre> 204<p>Copies the precomputed value. This duplicates any string within.</p> 205<div class="variablelist"><table border="0"> 206<col align="left"> 207<tbody> 208<tr> 209<td><span class="term"><i><tt>val</tt></i>:</span></td> 210<td>the precomputed value to be copied</td> 211</tr> 212<tr> 213<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 214<td>the copy or NULL if a copy for a data-type is not implemented.</td> 215</tr> 216</tbody> 217</table></div> 218</div> 219<hr> 220<div class="refsect2" lang="en"> 221<h3> 222<a name="xmlSchemaFreeFacet"></a>xmlSchemaFreeFacet ()</h3> 223<pre class="programlisting">void xmlSchemaFreeFacet (<a href="libxml2-schemasInternals.html#xmlSchemaFacetPtr">xmlSchemaFacetPtr</a> facet)<br> 224</pre> 225<p>Deallocate a Schema Facet structure.</p> 226<div class="variablelist"><table border="0"> 227<col align="left"> 228<tbody><tr> 229<td><span class="term"><i><tt>facet</tt></i>:</span></td> 230<td>a schema facet structure</td> 231</tr></tbody> 232</table></div> 233</div> 234<hr> 235<div class="refsect2" lang="en"> 236<h3> 237<a name="xmlSchemaFreeValue"></a>xmlSchemaFreeValue ()</h3> 238<pre class="programlisting">void xmlSchemaFreeValue (<a href="libxml2-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> value)<br> 239</pre> 240<p>Cleanup the default XML Schemas type library</p> 241<div class="variablelist"><table border="0"> 242<col align="left"> 243<tbody><tr> 244<td><span class="term"><i><tt>value</tt></i>:</span></td> 245<td>the value to free</td> 246</tr></tbody> 247</table></div> 248</div> 249<hr> 250<div class="refsect2" lang="en"> 251<h3> 252<a name="xmlSchemaGetBuiltInListSimpleTypeItemType"></a>xmlSchemaGetBuiltInListSimpleTypeItemType ()</h3> 253<pre class="programlisting"><a href="libxml2-schemasInternals.html#xmlSchemaTypePtr">xmlSchemaTypePtr</a> xmlSchemaGetBuiltInListSimpleTypeItemType (<a href="libxml2-schemasInternals.html#xmlSchemaTypePtr">xmlSchemaTypePtr</a> type)<br> 254</pre> 255<p>Lookup function</p> 256<div class="variablelist"><table border="0"> 257<col align="left"> 258<tbody> 259<tr> 260<td><span class="term"><i><tt>type</tt></i>:</span></td> 261<td>the built-in simple type.</td> 262</tr> 263<tr> 264<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 265<td>the item type of @type as defined by the built-in datatype hierarchy of XML Schema Part 2: Datatypes, or NULL in case of an error.</td> 266</tr> 267</tbody> 268</table></div> 269</div> 270<hr> 271<div class="refsect2" lang="en"> 272<h3> 273<a name="xmlSchemaGetBuiltInType"></a>xmlSchemaGetBuiltInType ()</h3> 274<pre class="programlisting"><a href="libxml2-schemasInternals.html#xmlSchemaTypePtr">xmlSchemaTypePtr</a> xmlSchemaGetBuiltInType (<a href="libxml2-schemasInternals.html#xmlSchemaValType">xmlSchemaValType</a> type)<br> 275</pre> 276<p>Gives you the type struct for a built-in type by its type id.</p> 277<div class="variablelist"><table border="0"> 278<col align="left"> 279<tbody> 280<tr> 281<td><span class="term"><i><tt>type</tt></i>:</span></td> 282<td>the type of the built in type</td> 283</tr> 284<tr> 285<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 286<td>the type if found, NULL otherwise.</td> 287</tr> 288</tbody> 289</table></div> 290</div> 291<hr> 292<div class="refsect2" lang="en"> 293<h3> 294<a name="xmlSchemaGetCanonValue"></a>xmlSchemaGetCanonValue ()</h3> 295<pre class="programlisting">int xmlSchemaGetCanonValue (<a href="libxml2-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> val, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> ** retValue)<br> 296</pre> 297<p>Get the canonical lexical representation of the value. The caller has to FREE the returned retValue. WARNING: Some value types are not supported yet, resulting in a @retValue of "???". TODO: XML Schema 1.0 does not define canonical representations for: duration, gYearMonth, gYear, gMonthDay, gMonth, gDay, anyURI, QName, NOTATION. This will be fixed in XML Schema 1.1.</p> 298<div class="variablelist"><table border="0"> 299<col align="left"> 300<tbody> 301<tr> 302<td><span class="term"><i><tt>val</tt></i>:</span></td> 303<td>the precomputed value</td> 304</tr> 305<tr> 306<td><span class="term"><i><tt>retValue</tt></i>:</span></td> 307<td>the returned value</td> 308</tr> 309<tr> 310<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 311<td>0 if the value could be built, 1 if the value type is not supported yet and -1 in case of API errors.</td> 312</tr> 313</tbody> 314</table></div> 315</div> 316<hr> 317<div class="refsect2" lang="en"> 318<h3> 319<a name="xmlSchemaGetCanonValueWhtsp"></a>xmlSchemaGetCanonValueWhtsp ()</h3> 320<pre class="programlisting">int xmlSchemaGetCanonValueWhtsp (<a href="libxml2-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> val, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> ** retValue, <br> <a href="libxml2-xmlschemastypes.html#xmlSchemaWhitespaceValueType">xmlSchemaWhitespaceValueType</a> ws)<br> 321</pre> 322<p>Get the canonical representation of the value. The caller has to free the returned @retValue.</p> 323<div class="variablelist"><table border="0"> 324<col align="left"> 325<tbody> 326<tr> 327<td><span class="term"><i><tt>val</tt></i>:</span></td> 328<td>the precomputed value</td> 329</tr> 330<tr> 331<td><span class="term"><i><tt>retValue</tt></i>:</span></td> 332<td>the returned value</td> 333</tr> 334<tr> 335<td><span class="term"><i><tt>ws</tt></i>:</span></td> 336<td>the whitespace type of the value</td> 337</tr> 338<tr> 339<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 340<td>0 if the value could be built, 1 if the value type is not supported yet and -1 in case of API errors.</td> 341</tr> 342</tbody> 343</table></div> 344</div> 345<hr> 346<div class="refsect2" lang="en"> 347<h3> 348<a name="xmlSchemaGetFacetValueAsULong"></a>xmlSchemaGetFacetValueAsULong ()</h3> 349<pre class="programlisting">unsigned long xmlSchemaGetFacetValueAsULong (<a href="libxml2-schemasInternals.html#xmlSchemaFacetPtr">xmlSchemaFacetPtr</a> facet)<br> 350</pre> 351<p>Extract the value of a facet</p> 352<div class="variablelist"><table border="0"> 353<col align="left"> 354<tbody> 355<tr> 356<td><span class="term"><i><tt>facet</tt></i>:</span></td> 357<td>an schemas type facet</td> 358</tr> 359<tr> 360<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 361<td>the value as a long</td> 362</tr> 363</tbody> 364</table></div> 365</div> 366<hr> 367<div class="refsect2" lang="en"> 368<h3> 369<a name="xmlSchemaGetPredefinedType"></a>xmlSchemaGetPredefinedType ()</h3> 370<pre class="programlisting"><a href="libxml2-schemasInternals.html#xmlSchemaTypePtr">xmlSchemaTypePtr</a> xmlSchemaGetPredefinedType (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * ns)<br> 371</pre> 372<p>Lookup a type in the default XML Schemas type library</p> 373<div class="variablelist"><table border="0"> 374<col align="left"> 375<tbody> 376<tr> 377<td><span class="term"><i><tt>name</tt></i>:</span></td> 378<td>the type name</td> 379</tr> 380<tr> 381<td><span class="term"><i><tt>ns</tt></i>:</span></td> 382<td>the URI of the namespace usually "http://www.w3.org/2001/XMLSchema"</td> 383</tr> 384<tr> 385<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 386<td>the type if found, NULL otherwise</td> 387</tr> 388</tbody> 389</table></div> 390</div> 391<hr> 392<div class="refsect2" lang="en"> 393<h3> 394<a name="xmlSchemaGetValType"></a>xmlSchemaGetValType ()</h3> 395<pre class="programlisting"><a href="libxml2-schemasInternals.html#xmlSchemaValType">xmlSchemaValType</a> xmlSchemaGetValType (<a href="libxml2-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> val)<br> 396</pre> 397<p>Accessor for the type of a value</p> 398<div class="variablelist"><table border="0"> 399<col align="left"> 400<tbody> 401<tr> 402<td><span class="term"><i><tt>val</tt></i>:</span></td> 403<td>a schemas value</td> 404</tr> 405<tr> 406<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 407<td>the <a href="libxml2-schemasInternals.html#xmlSchemaValType">xmlSchemaValType</a> of the value</td> 408</tr> 409</tbody> 410</table></div> 411</div> 412<hr> 413<div class="refsect2" lang="en"> 414<h3> 415<a name="xmlSchemaInitTypes"></a>xmlSchemaInitTypes ()</h3> 416<pre class="programlisting">int xmlSchemaInitTypes (void)<br> 417</pre> 418<p>Initialize the default XML Schemas type library</p> 419<div class="variablelist"><table border="0"> 420<col align="left"> 421<tbody><tr> 422<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 423<td>0 on success, -1 on error.</td> 424</tr></tbody> 425</table></div> 426</div> 427<hr> 428<div class="refsect2" lang="en"> 429<h3> 430<a name="xmlSchemaIsBuiltInTypeFacet"></a>xmlSchemaIsBuiltInTypeFacet ()</h3> 431<pre class="programlisting">int xmlSchemaIsBuiltInTypeFacet (<a href="libxml2-schemasInternals.html#xmlSchemaTypePtr">xmlSchemaTypePtr</a> type, <br> int facetType)<br> 432</pre> 433<p>Evaluates if a specific facet can be used in conjunction with a type.</p> 434<div class="variablelist"><table border="0"> 435<col align="left"> 436<tbody> 437<tr> 438<td><span class="term"><i><tt>type</tt></i>:</span></td> 439<td>the built-in type</td> 440</tr> 441<tr> 442<td><span class="term"><i><tt>facetType</tt></i>:</span></td> 443<td>the facet type</td> 444</tr> 445<tr> 446<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 447<td>1 if the facet can be used with the given built-in type, 0 otherwise and -1 in case the type is not a built-in type.</td> 448</tr> 449</tbody> 450</table></div> 451</div> 452<hr> 453<div class="refsect2" lang="en"> 454<h3> 455<a name="xmlSchemaNewFacet"></a>xmlSchemaNewFacet ()</h3> 456<pre class="programlisting"><a href="libxml2-schemasInternals.html#xmlSchemaFacetPtr">xmlSchemaFacetPtr</a> xmlSchemaNewFacet (void)<br> 457</pre> 458<p>Allocate a new Facet structure.</p> 459<div class="variablelist"><table border="0"> 460<col align="left"> 461<tbody><tr> 462<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 463<td>the newly allocated structure or NULL in case or error</td> 464</tr></tbody> 465</table></div> 466</div> 467<hr> 468<div class="refsect2" lang="en"> 469<h3> 470<a name="xmlSchemaNewNOTATIONValue"></a>xmlSchemaNewNOTATIONValue ()</h3> 471<pre class="programlisting"><a href="libxml2-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> xmlSchemaNewNOTATIONValue (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * ns)<br> 472</pre> 473<p>Allocate a new NOTATION value. The given values are consumed and freed with the struct.</p> 474<div class="variablelist"><table border="0"> 475<col align="left"> 476<tbody> 477<tr> 478<td><span class="term"><i><tt>name</tt></i>:</span></td> 479<td>the notation name</td> 480</tr> 481<tr> 482<td><span class="term"><i><tt>ns</tt></i>:</span></td> 483<td>the notation namespace name or NULL</td> 484</tr> 485<tr> 486<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 487<td>a pointer to the new value or NULL in case of error</td> 488</tr> 489</tbody> 490</table></div> 491</div> 492<hr> 493<div class="refsect2" lang="en"> 494<h3> 495<a name="xmlSchemaNewQNameValue"></a>xmlSchemaNewQNameValue ()</h3> 496<pre class="programlisting"><a href="libxml2-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> xmlSchemaNewQNameValue (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * namespaceName, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * localName)<br> 497</pre> 498<p>Allocate a new QName value. The given values are consumed and freed with the struct.</p> 499<div class="variablelist"><table border="0"> 500<col align="left"> 501<tbody> 502<tr> 503<td><span class="term"><i><tt>namespaceName</tt></i>:</span></td> 504<td>the namespace name</td> 505</tr> 506<tr> 507<td><span class="term"><i><tt>localName</tt></i>:</span></td> 508<td>the local name</td> 509</tr> 510<tr> 511<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 512<td>a pointer to the new value or NULL in case of an error.</td> 513</tr> 514</tbody> 515</table></div> 516</div> 517<hr> 518<div class="refsect2" lang="en"> 519<h3> 520<a name="xmlSchemaNewStringValue"></a>xmlSchemaNewStringValue ()</h3> 521<pre class="programlisting"><a href="libxml2-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> xmlSchemaNewStringValue (<a href="libxml2-schemasInternals.html#xmlSchemaValType">xmlSchemaValType</a> type, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value)<br> 522</pre> 523<p>Allocate a new simple type value. The type can be of <a href="libxml2-schemasInternals.html#XML_SCHEMAS_STRING">XML_SCHEMAS_STRING</a>. WARNING: This one is intended to be expanded for other string based types. We need this for anySimpleType as well. The given value is consumed and freed with the struct.</p> 524<div class="variablelist"><table border="0"> 525<col align="left"> 526<tbody> 527<tr> 528<td><span class="term"><i><tt>type</tt></i>:</span></td> 529<td>the value type</td> 530</tr> 531<tr> 532<td><span class="term"><i><tt>value</tt></i>:</span></td> 533<td>the value</td> 534</tr> 535<tr> 536<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 537<td>a pointer to the new value or NULL in case of error</td> 538</tr> 539</tbody> 540</table></div> 541</div> 542<hr> 543<div class="refsect2" lang="en"> 544<h3> 545<a name="xmlSchemaValPredefTypeNode"></a>xmlSchemaValPredefTypeNode ()</h3> 546<pre class="programlisting">int xmlSchemaValPredefTypeNode (<a href="libxml2-schemasInternals.html#xmlSchemaTypePtr">xmlSchemaTypePtr</a> type, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value, <br> <a href="libxml2-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> * val, <br> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node)<br> 547</pre> 548<p>Check that a value conforms to the lexical space of the predefined type. if true a value is computed and returned in @val.</p> 549<div class="variablelist"><table border="0"> 550<col align="left"> 551<tbody> 552<tr> 553<td><span class="term"><i><tt>type</tt></i>:</span></td> 554<td>the predefined type</td> 555</tr> 556<tr> 557<td><span class="term"><i><tt>value</tt></i>:</span></td> 558<td>the value to check</td> 559</tr> 560<tr> 561<td><span class="term"><i><tt>val</tt></i>:</span></td> 562<td>the return computed value</td> 563</tr> 564<tr> 565<td><span class="term"><i><tt>node</tt></i>:</span></td> 566<td>the node containing the value</td> 567</tr> 568<tr> 569<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 570<td>0 if this validates, a positive error code number otherwise and -1 in case of internal or API error.</td> 571</tr> 572</tbody> 573</table></div> 574</div> 575<hr> 576<div class="refsect2" lang="en"> 577<h3> 578<a name="xmlSchemaValPredefTypeNodeNoNorm"></a>xmlSchemaValPredefTypeNodeNoNorm ()</h3> 579<pre class="programlisting">int xmlSchemaValPredefTypeNodeNoNorm (<a href="libxml2-schemasInternals.html#xmlSchemaTypePtr">xmlSchemaTypePtr</a> type, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value, <br> <a href="libxml2-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> * val, <br> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node)<br> 580</pre> 581<p>Check that a value conforms to the lexical space of the predefined type. if true a value is computed and returned in @val. This one does apply any normalization to the value.</p> 582<div class="variablelist"><table border="0"> 583<col align="left"> 584<tbody> 585<tr> 586<td><span class="term"><i><tt>type</tt></i>:</span></td> 587<td>the predefined type</td> 588</tr> 589<tr> 590<td><span class="term"><i><tt>value</tt></i>:</span></td> 591<td>the value to check</td> 592</tr> 593<tr> 594<td><span class="term"><i><tt>val</tt></i>:</span></td> 595<td>the return computed value</td> 596</tr> 597<tr> 598<td><span class="term"><i><tt>node</tt></i>:</span></td> 599<td>the node containing the value</td> 600</tr> 601<tr> 602<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 603<td>0 if this validates, a positive error code number otherwise and -1 in case of internal or API error.</td> 604</tr> 605</tbody> 606</table></div> 607</div> 608<hr> 609<div class="refsect2" lang="en"> 610<h3> 611<a name="xmlSchemaValidateFacet"></a>xmlSchemaValidateFacet ()</h3> 612<pre class="programlisting">int xmlSchemaValidateFacet (<a href="libxml2-schemasInternals.html#xmlSchemaTypePtr">xmlSchemaTypePtr</a> base, <br> <a href="libxml2-schemasInternals.html#xmlSchemaFacetPtr">xmlSchemaFacetPtr</a> facet, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value, <br> <a href="libxml2-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> val)<br> 613</pre> 614<p>Check a value against a facet condition</p> 615<div class="variablelist"><table border="0"> 616<col align="left"> 617<tbody> 618<tr> 619<td><span class="term"><i><tt>base</tt></i>:</span></td> 620<td>the base type</td> 621</tr> 622<tr> 623<td><span class="term"><i><tt>facet</tt></i>:</span></td> 624<td>the facet to check</td> 625</tr> 626<tr> 627<td><span class="term"><i><tt>value</tt></i>:</span></td> 628<td>the lexical repr of the value to validate</td> 629</tr> 630<tr> 631<td><span class="term"><i><tt>val</tt></i>:</span></td> 632<td>the precomputed value</td> 633</tr> 634<tr> 635<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 636<td>0 if the element is schemas valid, a positive error code number otherwise and -1 in case of internal or API error.</td> 637</tr> 638</tbody> 639</table></div> 640</div> 641<hr> 642<div class="refsect2" lang="en"> 643<h3> 644<a name="xmlSchemaValidateFacetWhtsp"></a>xmlSchemaValidateFacetWhtsp ()</h3> 645<pre class="programlisting">int xmlSchemaValidateFacetWhtsp (<a href="libxml2-schemasInternals.html#xmlSchemaFacetPtr">xmlSchemaFacetPtr</a> facet, <br> <a href="libxml2-xmlschemastypes.html#xmlSchemaWhitespaceValueType">xmlSchemaWhitespaceValueType</a> fws, <br> <a href="libxml2-schemasInternals.html#xmlSchemaValType">xmlSchemaValType</a> valType, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value, <br> <a href="libxml2-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> val, <br> <a href="libxml2-xmlschemastypes.html#xmlSchemaWhitespaceValueType">xmlSchemaWhitespaceValueType</a> ws)<br> 646</pre> 647<p>Check a value against a facet condition. This takes value normalization according to the specified whitespace types into account. Note that @value needs to be the *normalized* value if the facet is of type "pattern".</p> 648<div class="variablelist"><table border="0"> 649<col align="left"> 650<tbody> 651<tr> 652<td><span class="term"><i><tt>facet</tt></i>:</span></td> 653<td>the facet to check</td> 654</tr> 655<tr> 656<td><span class="term"><i><tt>fws</tt></i>:</span></td> 657<td>the whitespace type of the facet's value</td> 658</tr> 659<tr> 660<td><span class="term"><i><tt>valType</tt></i>:</span></td> 661<td>the built-in type of the value</td> 662</tr> 663<tr> 664<td><span class="term"><i><tt>value</tt></i>:</span></td> 665<td>the lexical (or normalized for pattern) repr of the value to validate</td> 666</tr> 667<tr> 668<td><span class="term"><i><tt>val</tt></i>:</span></td> 669<td>the precomputed value</td> 670</tr> 671<tr> 672<td><span class="term"><i><tt>ws</tt></i>:</span></td> 673<td>the whitespace type of the value</td> 674</tr> 675<tr> 676<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 677<td>0 if the element is schemas valid, a positive error code number otherwise and -1 in case of internal or API error.</td> 678</tr> 679</tbody> 680</table></div> 681</div> 682<hr> 683<div class="refsect2" lang="en"> 684<h3> 685<a name="xmlSchemaValidateLengthFacet"></a>xmlSchemaValidateLengthFacet ()</h3> 686<pre class="programlisting">int xmlSchemaValidateLengthFacet (<a href="libxml2-schemasInternals.html#xmlSchemaTypePtr">xmlSchemaTypePtr</a> type, <br> <a href="libxml2-schemasInternals.html#xmlSchemaFacetPtr">xmlSchemaFacetPtr</a> facet, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value, <br> <a href="libxml2-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> val, <br> unsigned long * length)<br> 687</pre> 688<p>Checka a value against a "length", "minLength" and "maxLength" facet; sets @length to the computed length of @value.</p> 689<div class="variablelist"><table border="0"> 690<col align="left"> 691<tbody> 692<tr> 693<td><span class="term"><i><tt>type</tt></i>:</span></td> 694<td>the built-in type</td> 695</tr> 696<tr> 697<td><span class="term"><i><tt>facet</tt></i>:</span></td> 698<td>the facet to check</td> 699</tr> 700<tr> 701<td><span class="term"><i><tt>value</tt></i>:</span></td> 702<td>the lexical repr. of the value to be validated</td> 703</tr> 704<tr> 705<td><span class="term"><i><tt>val</tt></i>:</span></td> 706<td>the precomputed value</td> 707</tr> 708<tr> 709<td><span class="term"><i><tt>length</tt></i>:</span></td> 710<td>the actual length of the value</td> 711</tr> 712<tr> 713<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 714<td>0 if the value is valid, a positive error code otherwise and -1 in case of an internal or API error.</td> 715</tr> 716</tbody> 717</table></div> 718</div> 719<hr> 720<div class="refsect2" lang="en"> 721<h3> 722<a name="xmlSchemaValidateLengthFacetWhtsp"></a>xmlSchemaValidateLengthFacetWhtsp ()</h3> 723<pre class="programlisting">int xmlSchemaValidateLengthFacetWhtsp (<a href="libxml2-schemasInternals.html#xmlSchemaFacetPtr">xmlSchemaFacetPtr</a> facet, <br> <a href="libxml2-schemasInternals.html#xmlSchemaValType">xmlSchemaValType</a> valType, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value, <br> <a href="libxml2-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> val, <br> unsigned long * length, <br> <a href="libxml2-xmlschemastypes.html#xmlSchemaWhitespaceValueType">xmlSchemaWhitespaceValueType</a> ws)<br> 724</pre> 725<p>Checka a value against a "length", "minLength" and "maxLength" facet; sets @length to the computed length of @value.</p> 726<div class="variablelist"><table border="0"> 727<col align="left"> 728<tbody> 729<tr> 730<td><span class="term"><i><tt>facet</tt></i>:</span></td> 731<td>the facet to check</td> 732</tr> 733<tr> 734<td><span class="term"><i><tt>valType</tt></i>:</span></td> 735<td>the built-in type</td> 736</tr> 737<tr> 738<td><span class="term"><i><tt>value</tt></i>:</span></td> 739<td>the lexical repr. of the value to be validated</td> 740</tr> 741<tr> 742<td><span class="term"><i><tt>val</tt></i>:</span></td> 743<td>the precomputed value</td> 744</tr> 745<tr> 746<td><span class="term"><i><tt>length</tt></i>:</span></td> 747<td>the actual length of the value</td> 748</tr> 749<tr> 750<td><span class="term"><i><tt>ws</tt></i>:</span></td> 751<td>the whitespace type of the value</td> 752</tr> 753<tr> 754<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 755<td>0 if the value is valid, a positive error code otherwise and -1 in case of an internal or API error.</td> 756</tr> 757</tbody> 758</table></div> 759</div> 760<hr> 761<div class="refsect2" lang="en"> 762<h3> 763<a name="xmlSchemaValidateListSimpleTypeFacet"></a>xmlSchemaValidateListSimpleTypeFacet ()</h3> 764<pre class="programlisting">int xmlSchemaValidateListSimpleTypeFacet (<a href="libxml2-schemasInternals.html#xmlSchemaFacetPtr">xmlSchemaFacetPtr</a> facet, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value, <br> unsigned long actualLen, <br> unsigned long * expectedLen)<br> 765</pre> 766<p>Checks the value of a list simple type against a facet.</p> 767<div class="variablelist"><table border="0"> 768<col align="left"> 769<tbody> 770<tr> 771<td><span class="term"><i><tt>facet</tt></i>:</span></td> 772<td>the facet to check</td> 773</tr> 774<tr> 775<td><span class="term"><i><tt>value</tt></i>:</span></td> 776<td>the lexical repr of the value to validate</td> 777</tr> 778<tr> 779<td><span class="term"><i><tt>actualLen</tt></i>:</span></td> 780<td>the number of list items</td> 781</tr> 782<tr> 783<td><span class="term"><i><tt>expectedLen</tt></i>:</span></td> 784<td>the resulting expected number of list items</td> 785</tr> 786<tr> 787<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 788<td>0 if the value is valid, a positive error code number otherwise and -1 in case of an internal error.</td> 789</tr> 790</tbody> 791</table></div> 792</div> 793<hr> 794<div class="refsect2" lang="en"> 795<h3> 796<a name="xmlSchemaValidatePredefinedType"></a>xmlSchemaValidatePredefinedType ()</h3> 797<pre class="programlisting">int xmlSchemaValidatePredefinedType (<a href="libxml2-schemasInternals.html#xmlSchemaTypePtr">xmlSchemaTypePtr</a> type, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value, <br> <a href="libxml2-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> * val)<br> 798</pre> 799<p>Check that a value conforms to the lexical space of the predefined type. if true a value is computed and returned in @val.</p> 800<div class="variablelist"><table border="0"> 801<col align="left"> 802<tbody> 803<tr> 804<td><span class="term"><i><tt>type</tt></i>:</span></td> 805<td>the predefined type</td> 806</tr> 807<tr> 808<td><span class="term"><i><tt>value</tt></i>:</span></td> 809<td>the value to check</td> 810</tr> 811<tr> 812<td><span class="term"><i><tt>val</tt></i>:</span></td> 813<td>the return computed value</td> 814</tr> 815<tr> 816<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 817<td>0 if this validates, a positive error code number otherwise and -1 in case of internal or API error.</td> 818</tr> 819</tbody> 820</table></div> 821</div> 822<hr> 823<div class="refsect2" lang="en"> 824<h3> 825<a name="xmlSchemaValueAppend"></a>xmlSchemaValueAppend ()</h3> 826<pre class="programlisting">int xmlSchemaValueAppend (<a href="libxml2-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> prev, <br> <a href="libxml2-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> cur)<br> 827</pre> 828<p>Appends a next sibling to a list of computed values.</p> 829<div class="variablelist"><table border="0"> 830<col align="left"> 831<tbody> 832<tr> 833<td><span class="term"><i><tt>prev</tt></i>:</span></td> 834<td>the value</td> 835</tr> 836<tr> 837<td><span class="term"><i><tt>cur</tt></i>:</span></td> 838<td>the value to be appended</td> 839</tr> 840<tr> 841<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 842<td>0 if succeeded and -1 on API errors.</td> 843</tr> 844</tbody> 845</table></div> 846</div> 847<hr> 848<div class="refsect2" lang="en"> 849<h3> 850<a name="xmlSchemaValueGetAsBoolean"></a>xmlSchemaValueGetAsBoolean ()</h3> 851<pre class="programlisting">int xmlSchemaValueGetAsBoolean (<a href="libxml2-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> val)<br> 852</pre> 853<p>Accessor for the boolean value of a computed value.</p> 854<div class="variablelist"><table border="0"> 855<col align="left"> 856<tbody> 857<tr> 858<td><span class="term"><i><tt>val</tt></i>:</span></td> 859<td>the value</td> 860</tr> 861<tr> 862<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 863<td>1 if true and 0 if false, or in case of an error. Hmm.</td> 864</tr> 865</tbody> 866</table></div> 867</div> 868<hr> 869<div class="refsect2" lang="en"> 870<h3> 871<a name="xmlSchemaValueGetAsString"></a>xmlSchemaValueGetAsString ()</h3> 872<pre class="programlisting">const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlSchemaValueGetAsString (<a href="libxml2-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> val)<br> 873</pre> 874<p>Accessor for the string value of a computed value.</p> 875<div class="variablelist"><table border="0"> 876<col align="left"> 877<tbody> 878<tr> 879<td><span class="term"><i><tt>val</tt></i>:</span></td> 880<td>the value</td> 881</tr> 882<tr> 883<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 884<td>the string value or NULL if there was none, or on API errors.</td> 885</tr> 886</tbody> 887</table></div> 888</div> 889<hr> 890<div class="refsect2" lang="en"> 891<h3> 892<a name="xmlSchemaValueGetNext"></a>xmlSchemaValueGetNext ()</h3> 893<pre class="programlisting"><a href="libxml2-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> xmlSchemaValueGetNext (<a href="libxml2-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> cur)<br> 894</pre> 895<p>Accessor for the next sibling of a list of computed values.</p> 896<div class="variablelist"><table border="0"> 897<col align="left"> 898<tbody> 899<tr> 900<td><span class="term"><i><tt>cur</tt></i>:</span></td> 901<td>the value</td> 902</tr> 903<tr> 904<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 905<td>the next value or NULL if there was none, or on API errors.</td> 906</tr> 907</tbody> 908</table></div> 909</div> 910<hr> 911<div class="refsect2" lang="en"> 912<h3> 913<a name="xmlSchemaWhiteSpaceReplace"></a>xmlSchemaWhiteSpaceReplace ()</h3> 914<pre class="programlisting"><a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlSchemaWhiteSpaceReplace (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value)<br> 915</pre> 916<p>Replaces 0xd, 0x9 and 0xa with a space.</p> 917<div class="variablelist"><table border="0"> 918<col align="left"> 919<tbody> 920<tr> 921<td><span class="term"><i><tt>value</tt></i>:</span></td> 922<td>a value</td> 923</tr> 924<tr> 925<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 926<td>the new string or NULL if no change was required.</td> 927</tr> 928</tbody> 929</table></div> 930</div> 931<hr> 932</div> 933</div> 934</body> 935</html> 936