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); 41void <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 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">void xmlSchemaInitTypes (void)<br> 417</pre> 418<p>Initialize the default XML Schemas type library</p> 419</div> 420<hr> 421<div class="refsect2" lang="en"> 422<h3> 423<a name="xmlSchemaIsBuiltInTypeFacet"></a>xmlSchemaIsBuiltInTypeFacet ()</h3> 424<pre class="programlisting">int xmlSchemaIsBuiltInTypeFacet (<a href="libxml2-schemasInternals.html#xmlSchemaTypePtr">xmlSchemaTypePtr</a> type, <br> int facetType)<br> 425</pre> 426<p>Evaluates if a specific facet can be used in conjunction with a type.</p> 427<div class="variablelist"><table border="0"> 428<col align="left"> 429<tbody> 430<tr> 431<td><span class="term"><i><tt>type</tt></i>:</span></td> 432<td>the built-in type</td> 433</tr> 434<tr> 435<td><span class="term"><i><tt>facetType</tt></i>:</span></td> 436<td>the facet type</td> 437</tr> 438<tr> 439<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 440<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> 441</tr> 442</tbody> 443</table></div> 444</div> 445<hr> 446<div class="refsect2" lang="en"> 447<h3> 448<a name="xmlSchemaNewFacet"></a>xmlSchemaNewFacet ()</h3> 449<pre class="programlisting"><a href="libxml2-schemasInternals.html#xmlSchemaFacetPtr">xmlSchemaFacetPtr</a> xmlSchemaNewFacet (void)<br> 450</pre> 451<p>Allocate a new Facet structure.</p> 452<div class="variablelist"><table border="0"> 453<col align="left"> 454<tbody><tr> 455<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 456<td>the newly allocated structure or NULL in case or error</td> 457</tr></tbody> 458</table></div> 459</div> 460<hr> 461<div class="refsect2" lang="en"> 462<h3> 463<a name="xmlSchemaNewNOTATIONValue"></a>xmlSchemaNewNOTATIONValue ()</h3> 464<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> 465</pre> 466<p>Allocate a new NOTATION value. The given values are consumed and freed with the struct.</p> 467<div class="variablelist"><table border="0"> 468<col align="left"> 469<tbody> 470<tr> 471<td><span class="term"><i><tt>name</tt></i>:</span></td> 472<td>the notation name</td> 473</tr> 474<tr> 475<td><span class="term"><i><tt>ns</tt></i>:</span></td> 476<td>the notation namespace name or NULL</td> 477</tr> 478<tr> 479<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 480<td>a pointer to the new value or NULL in case of error</td> 481</tr> 482</tbody> 483</table></div> 484</div> 485<hr> 486<div class="refsect2" lang="en"> 487<h3> 488<a name="xmlSchemaNewQNameValue"></a>xmlSchemaNewQNameValue ()</h3> 489<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> 490</pre> 491<p>Allocate a new QName value. The given values are consumed and freed with the struct.</p> 492<div class="variablelist"><table border="0"> 493<col align="left"> 494<tbody> 495<tr> 496<td><span class="term"><i><tt>namespaceName</tt></i>:</span></td> 497<td>the namespace name</td> 498</tr> 499<tr> 500<td><span class="term"><i><tt>localName</tt></i>:</span></td> 501<td>the local name</td> 502</tr> 503<tr> 504<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 505<td>a pointer to the new value or NULL in case of an error.</td> 506</tr> 507</tbody> 508</table></div> 509</div> 510<hr> 511<div class="refsect2" lang="en"> 512<h3> 513<a name="xmlSchemaNewStringValue"></a>xmlSchemaNewStringValue ()</h3> 514<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> 515</pre> 516<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> 517<div class="variablelist"><table border="0"> 518<col align="left"> 519<tbody> 520<tr> 521<td><span class="term"><i><tt>type</tt></i>:</span></td> 522<td>the value type</td> 523</tr> 524<tr> 525<td><span class="term"><i><tt>value</tt></i>:</span></td> 526<td>the value</td> 527</tr> 528<tr> 529<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 530<td>a pointer to the new value or NULL in case of error</td> 531</tr> 532</tbody> 533</table></div> 534</div> 535<hr> 536<div class="refsect2" lang="en"> 537<h3> 538<a name="xmlSchemaValPredefTypeNode"></a>xmlSchemaValPredefTypeNode ()</h3> 539<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> 540</pre> 541<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> 542<div class="variablelist"><table border="0"> 543<col align="left"> 544<tbody> 545<tr> 546<td><span class="term"><i><tt>type</tt></i>:</span></td> 547<td>the predefined type</td> 548</tr> 549<tr> 550<td><span class="term"><i><tt>value</tt></i>:</span></td> 551<td>the value to check</td> 552</tr> 553<tr> 554<td><span class="term"><i><tt>val</tt></i>:</span></td> 555<td>the return computed value</td> 556</tr> 557<tr> 558<td><span class="term"><i><tt>node</tt></i>:</span></td> 559<td>the node containing the value</td> 560</tr> 561<tr> 562<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 563<td>0 if this validates, a positive error code number otherwise and -1 in case of internal or API error.</td> 564</tr> 565</tbody> 566</table></div> 567</div> 568<hr> 569<div class="refsect2" lang="en"> 570<h3> 571<a name="xmlSchemaValPredefTypeNodeNoNorm"></a>xmlSchemaValPredefTypeNodeNoNorm ()</h3> 572<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> 573</pre> 574<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> 575<div class="variablelist"><table border="0"> 576<col align="left"> 577<tbody> 578<tr> 579<td><span class="term"><i><tt>type</tt></i>:</span></td> 580<td>the predefined type</td> 581</tr> 582<tr> 583<td><span class="term"><i><tt>value</tt></i>:</span></td> 584<td>the value to check</td> 585</tr> 586<tr> 587<td><span class="term"><i><tt>val</tt></i>:</span></td> 588<td>the return computed value</td> 589</tr> 590<tr> 591<td><span class="term"><i><tt>node</tt></i>:</span></td> 592<td>the node containing the value</td> 593</tr> 594<tr> 595<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 596<td>0 if this validates, a positive error code number otherwise and -1 in case of internal or API error.</td> 597</tr> 598</tbody> 599</table></div> 600</div> 601<hr> 602<div class="refsect2" lang="en"> 603<h3> 604<a name="xmlSchemaValidateFacet"></a>xmlSchemaValidateFacet ()</h3> 605<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> 606</pre> 607<p>Check a value against a facet condition</p> 608<div class="variablelist"><table border="0"> 609<col align="left"> 610<tbody> 611<tr> 612<td><span class="term"><i><tt>base</tt></i>:</span></td> 613<td>the base type</td> 614</tr> 615<tr> 616<td><span class="term"><i><tt>facet</tt></i>:</span></td> 617<td>the facet to check</td> 618</tr> 619<tr> 620<td><span class="term"><i><tt>value</tt></i>:</span></td> 621<td>the lexical repr of the value to validate</td> 622</tr> 623<tr> 624<td><span class="term"><i><tt>val</tt></i>:</span></td> 625<td>the precomputed value</td> 626</tr> 627<tr> 628<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 629<td>0 if the element is schemas valid, a positive error code number otherwise and -1 in case of internal or API error.</td> 630</tr> 631</tbody> 632</table></div> 633</div> 634<hr> 635<div class="refsect2" lang="en"> 636<h3> 637<a name="xmlSchemaValidateFacetWhtsp"></a>xmlSchemaValidateFacetWhtsp ()</h3> 638<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> 639</pre> 640<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> 641<div class="variablelist"><table border="0"> 642<col align="left"> 643<tbody> 644<tr> 645<td><span class="term"><i><tt>facet</tt></i>:</span></td> 646<td>the facet to check</td> 647</tr> 648<tr> 649<td><span class="term"><i><tt>fws</tt></i>:</span></td> 650<td>the whitespace type of the facet's value</td> 651</tr> 652<tr> 653<td><span class="term"><i><tt>valType</tt></i>:</span></td> 654<td>the built-in type of the value</td> 655</tr> 656<tr> 657<td><span class="term"><i><tt>value</tt></i>:</span></td> 658<td>the lexical (or normalized for pattern) repr of the value to validate</td> 659</tr> 660<tr> 661<td><span class="term"><i><tt>val</tt></i>:</span></td> 662<td>the precomputed value</td> 663</tr> 664<tr> 665<td><span class="term"><i><tt>ws</tt></i>:</span></td> 666<td>the whitespace type of the value</td> 667</tr> 668<tr> 669<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 670<td>0 if the element is schemas valid, a positive error code number otherwise and -1 in case of internal or API error.</td> 671</tr> 672</tbody> 673</table></div> 674</div> 675<hr> 676<div class="refsect2" lang="en"> 677<h3> 678<a name="xmlSchemaValidateLengthFacet"></a>xmlSchemaValidateLengthFacet ()</h3> 679<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> 680</pre> 681<p>Checka a value against a "length", "minLength" and "maxLength" facet; sets @length to the computed length of @value.</p> 682<div class="variablelist"><table border="0"> 683<col align="left"> 684<tbody> 685<tr> 686<td><span class="term"><i><tt>type</tt></i>:</span></td> 687<td>the built-in type</td> 688</tr> 689<tr> 690<td><span class="term"><i><tt>facet</tt></i>:</span></td> 691<td>the facet to check</td> 692</tr> 693<tr> 694<td><span class="term"><i><tt>value</tt></i>:</span></td> 695<td>the lexical repr. of the value to be validated</td> 696</tr> 697<tr> 698<td><span class="term"><i><tt>val</tt></i>:</span></td> 699<td>the precomputed value</td> 700</tr> 701<tr> 702<td><span class="term"><i><tt>length</tt></i>:</span></td> 703<td>the actual length of the value</td> 704</tr> 705<tr> 706<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 707<td>0 if the value is valid, a positive error code otherwise and -1 in case of an internal or API error.</td> 708</tr> 709</tbody> 710</table></div> 711</div> 712<hr> 713<div class="refsect2" lang="en"> 714<h3> 715<a name="xmlSchemaValidateLengthFacetWhtsp"></a>xmlSchemaValidateLengthFacetWhtsp ()</h3> 716<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> 717</pre> 718<p>Checka a value against a "length", "minLength" and "maxLength" facet; sets @length to the computed length of @value.</p> 719<div class="variablelist"><table border="0"> 720<col align="left"> 721<tbody> 722<tr> 723<td><span class="term"><i><tt>facet</tt></i>:</span></td> 724<td>the facet to check</td> 725</tr> 726<tr> 727<td><span class="term"><i><tt>valType</tt></i>:</span></td> 728<td>the built-in type</td> 729</tr> 730<tr> 731<td><span class="term"><i><tt>value</tt></i>:</span></td> 732<td>the lexical repr. of the value to be validated</td> 733</tr> 734<tr> 735<td><span class="term"><i><tt>val</tt></i>:</span></td> 736<td>the precomputed value</td> 737</tr> 738<tr> 739<td><span class="term"><i><tt>length</tt></i>:</span></td> 740<td>the actual length of the value</td> 741</tr> 742<tr> 743<td><span class="term"><i><tt>ws</tt></i>:</span></td> 744<td>the whitespace type of the value</td> 745</tr> 746<tr> 747<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 748<td>0 if the value is valid, a positive error code otherwise and -1 in case of an internal or API error.</td> 749</tr> 750</tbody> 751</table></div> 752</div> 753<hr> 754<div class="refsect2" lang="en"> 755<h3> 756<a name="xmlSchemaValidateListSimpleTypeFacet"></a>xmlSchemaValidateListSimpleTypeFacet ()</h3> 757<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> 758</pre> 759<p>Checks the value of a list simple type against a facet.</p> 760<div class="variablelist"><table border="0"> 761<col align="left"> 762<tbody> 763<tr> 764<td><span class="term"><i><tt>facet</tt></i>:</span></td> 765<td>the facet to check</td> 766</tr> 767<tr> 768<td><span class="term"><i><tt>value</tt></i>:</span></td> 769<td>the lexical repr of the value to validate</td> 770</tr> 771<tr> 772<td><span class="term"><i><tt>actualLen</tt></i>:</span></td> 773<td>the number of list items</td> 774</tr> 775<tr> 776<td><span class="term"><i><tt>expectedLen</tt></i>:</span></td> 777<td>the resulting expected number of list items</td> 778</tr> 779<tr> 780<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 781<td>0 if the value is valid, a positive error code number otherwise and -1 in case of an internal error.</td> 782</tr> 783</tbody> 784</table></div> 785</div> 786<hr> 787<div class="refsect2" lang="en"> 788<h3> 789<a name="xmlSchemaValidatePredefinedType"></a>xmlSchemaValidatePredefinedType ()</h3> 790<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> 791</pre> 792<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> 793<div class="variablelist"><table border="0"> 794<col align="left"> 795<tbody> 796<tr> 797<td><span class="term"><i><tt>type</tt></i>:</span></td> 798<td>the predefined type</td> 799</tr> 800<tr> 801<td><span class="term"><i><tt>value</tt></i>:</span></td> 802<td>the value to check</td> 803</tr> 804<tr> 805<td><span class="term"><i><tt>val</tt></i>:</span></td> 806<td>the return computed value</td> 807</tr> 808<tr> 809<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 810<td>0 if this validates, a positive error code number otherwise and -1 in case of internal or API error.</td> 811</tr> 812</tbody> 813</table></div> 814</div> 815<hr> 816<div class="refsect2" lang="en"> 817<h3> 818<a name="xmlSchemaValueAppend"></a>xmlSchemaValueAppend ()</h3> 819<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> 820</pre> 821<p>Appends a next sibling to a list of computed values.</p> 822<div class="variablelist"><table border="0"> 823<col align="left"> 824<tbody> 825<tr> 826<td><span class="term"><i><tt>prev</tt></i>:</span></td> 827<td>the value</td> 828</tr> 829<tr> 830<td><span class="term"><i><tt>cur</tt></i>:</span></td> 831<td>the value to be appended</td> 832</tr> 833<tr> 834<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 835<td>0 if succeeded and -1 on API errors.</td> 836</tr> 837</tbody> 838</table></div> 839</div> 840<hr> 841<div class="refsect2" lang="en"> 842<h3> 843<a name="xmlSchemaValueGetAsBoolean"></a>xmlSchemaValueGetAsBoolean ()</h3> 844<pre class="programlisting">int xmlSchemaValueGetAsBoolean (<a href="libxml2-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> val)<br> 845</pre> 846<p>Accessor for the boolean value of a computed value.</p> 847<div class="variablelist"><table border="0"> 848<col align="left"> 849<tbody> 850<tr> 851<td><span class="term"><i><tt>val</tt></i>:</span></td> 852<td>the value</td> 853</tr> 854<tr> 855<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 856<td>1 if true and 0 if false, or in case of an error. Hmm.</td> 857</tr> 858</tbody> 859</table></div> 860</div> 861<hr> 862<div class="refsect2" lang="en"> 863<h3> 864<a name="xmlSchemaValueGetAsString"></a>xmlSchemaValueGetAsString ()</h3> 865<pre class="programlisting">const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlSchemaValueGetAsString (<a href="libxml2-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> val)<br> 866</pre> 867<p>Accessor for the string value of a computed value.</p> 868<div class="variablelist"><table border="0"> 869<col align="left"> 870<tbody> 871<tr> 872<td><span class="term"><i><tt>val</tt></i>:</span></td> 873<td>the value</td> 874</tr> 875<tr> 876<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 877<td>the string value or NULL if there was none, or on API errors.</td> 878</tr> 879</tbody> 880</table></div> 881</div> 882<hr> 883<div class="refsect2" lang="en"> 884<h3> 885<a name="xmlSchemaValueGetNext"></a>xmlSchemaValueGetNext ()</h3> 886<pre class="programlisting"><a href="libxml2-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> xmlSchemaValueGetNext (<a href="libxml2-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> cur)<br> 887</pre> 888<p>Accessor for the next sibling of a list of computed values.</p> 889<div class="variablelist"><table border="0"> 890<col align="left"> 891<tbody> 892<tr> 893<td><span class="term"><i><tt>cur</tt></i>:</span></td> 894<td>the value</td> 895</tr> 896<tr> 897<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 898<td>the next value or NULL if there was none, or on API errors.</td> 899</tr> 900</tbody> 901</table></div> 902</div> 903<hr> 904<div class="refsect2" lang="en"> 905<h3> 906<a name="xmlSchemaWhiteSpaceReplace"></a>xmlSchemaWhiteSpaceReplace ()</h3> 907<pre class="programlisting"><a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlSchemaWhiteSpaceReplace (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value)<br> 908</pre> 909<p>Replaces 0xd, 0x9 and 0xa with a space.</p> 910<div class="variablelist"><table border="0"> 911<col align="left"> 912<tbody> 913<tr> 914<td><span class="term"><i><tt>value</tt></i>:</span></td> 915<td>a value</td> 916</tr> 917<tr> 918<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 919<td>the new string or NULL if no change was required.</td> 920</tr> 921</tbody> 922</table></div> 923</div> 924<hr> 925</div> 926</div> 927</body> 928</html> 929