⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 libxml2-xmlschemastypes.html

📁 xml开源解析代码.版本为libxml2-2.6.29,可支持GB3212.网络消息发送XML时很有用.
💻 HTML
📖 第 1 页 / 共 3 页
字号:
</pre>    </div>    <div class="refsect1" lang="en">      <h2>Description</h2>    </div>    <div class="refsect1" lang="en">      <h2>Details</h2>      <div class="refsect2" lang="en">        <div class="refsect2" lang="en"><h3><a name="xmlSchemaWhitespaceValueType">Enum </a>xmlSchemaWhitespaceValueType</h3><pre class="programlisting">enum <a href="#xmlSchemaWhitespaceValueType">xmlSchemaWhitespaceValueType</a> {    <a name="XML_SCHEMA_WHITESPACE_UNKNOWN">XML_SCHEMA_WHITESPACE_UNKNOWN</a> = 0    <a name="XML_SCHEMA_WHITESPACE_PRESERVE">XML_SCHEMA_WHITESPACE_PRESERVE</a> = 1    <a name="XML_SCHEMA_WHITESPACE_REPLACE">XML_SCHEMA_WHITESPACE_REPLACE</a> = 2    <a name="XML_SCHEMA_WHITESPACE_COLLAPSE">XML_SCHEMA_WHITESPACE_COLLAPSE</a> = 3};</pre><p/></div>        <hr/>        <div class="refsect2" lang="en"><h3><a name="xmlSchemaCheckFacet"/>xmlSchemaCheckFacet ()</h3><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/></pre><p>Checks and computes the values of facets.</p><div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>facet</tt></i>:</span></td><td>the facet</td></tr><tr><td><span class="term"><i><tt>typeDecl</tt></i>:</span></td><td>the schema type definition</td></tr><tr><td><span class="term"><i><tt>pctxt</tt></i>:</span></td><td>the schema parser context or NULL</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the optional name of the type</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 if valid, a positive error code if not valid and -1 in case of an internal or API error.</td></tr></tbody></table></div></div>        <hr/>        <div class="refsect2" lang="en"><h3><a name="xmlSchemaCleanupTypes"/>xmlSchemaCleanupTypes ()</h3><pre class="programlisting">void	xmlSchemaCleanupTypes		(void)<br/></pre><p>Cleanup the default XML Schemas type library</p></div>        <hr/>        <div class="refsect2" lang="en"><h3><a name="xmlSchemaCollapseString"/>xmlSchemaCollapseString ()</h3><pre class="programlisting"><a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> *	xmlSchemaCollapseString	(const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value)<br/></pre><p>Removes and normalize white spaces in the string</p><div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>value</tt></i>:</span></td><td>a value</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new string or NULL if no change was required.</td></tr></tbody></table></div></div>        <hr/>        <div class="refsect2" lang="en"><h3><a name="xmlSchemaCompareValues"/>xmlSchemaCompareValues ()</h3><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/></pre><p>Compare 2 values</p><div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>x</tt></i>:</span></td><td>a first value</td></tr><tr><td><span class="term"><i><tt>y</tt></i>:</span></td><td>a second value</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>-1 if x &lt; y, 0 if x == y, 1 if x &gt; y, 2 if x &lt;&gt; y, and -2 in case of error</td></tr></tbody></table></div></div>        <hr/>        <div class="refsect2" lang="en"><h3><a name="xmlSchemaCompareValuesWhtsp"/>xmlSchemaCompareValuesWhtsp ()</h3><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/></pre><p>Compare 2 values</p><div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>x</tt></i>:</span></td><td>a first value</td></tr><tr><td><span class="term"><i><tt>xws</tt></i>:</span></td><td>the whitespace value of x</td></tr><tr><td><span class="term"><i><tt>y</tt></i>:</span></td><td>a second value</td></tr><tr><td><span class="term"><i><tt>yws</tt></i>:</span></td><td>the whitespace value of y</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>-1 if x &lt; y, 0 if x == y, 1 if x &gt; y, 2 if x &lt;&gt; y, and -2 in case of error</td></tr></tbody></table></div></div>        <hr/>        <div class="refsect2" lang="en"><h3><a name="xmlSchemaCopyValue"/>xmlSchemaCopyValue ()</h3><pre class="programlisting"><a href="libxml2-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a>	xmlSchemaCopyValue	(<a href="libxml2-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> val)<br/></pre><p>Copies the precomputed value. This duplicates any string within.</p><div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>val</tt></i>:</span></td><td>the precomputed value to be copied</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the copy or NULL if a copy for a data-type is not implemented.</td></tr></tbody></table></div></div>        <hr/>        <div class="refsect2" lang="en"><h3><a name="xmlSchemaFreeFacet"/>xmlSchemaFreeFacet ()</h3><pre class="programlisting">void	xmlSchemaFreeFacet		(<a href="libxml2-schemasInternals.html#xmlSchemaFacetPtr">xmlSchemaFacetPtr</a> facet)<br/></pre><p>Deallocate a Schema Facet structure.</p><div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>facet</tt></i>:</span></td><td>a schema facet structure</td></tr></tbody></table></div></div>        <hr/>        <div class="refsect2" lang="en"><h3><a name="xmlSchemaFreeValue"/>xmlSchemaFreeValue ()</h3><pre class="programlisting">void	xmlSchemaFreeValue		(<a href="libxml2-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> value)<br/></pre><p>Cleanup the default XML Schemas type library</p><div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>value</tt></i>:</span></td><td>the value to free</td></tr></tbody></table></div></div>        <hr/>        <div class="refsect2" lang="en"><h3><a name="xmlSchemaGetBuiltInListSimpleTypeItemType"/>xmlSchemaGetBuiltInListSimpleTypeItemType ()</h3><pre class="programlisting"><a href="libxml2-schemasInternals.html#xmlSchemaTypePtr">xmlSchemaTypePtr</a>	xmlSchemaGetBuiltInListSimpleTypeItemType	(<a href="libxml2-schemasInternals.html#xmlSchemaTypePtr">xmlSchemaTypePtr</a> type)<br/></pre><p>Lookup function</p><div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>type</tt></i>:</span></td><td>the built-in simple type.</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><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></tr></tbody></table></div></div>        <hr/>        <div class="refsect2" lang="en"><h3><a name="xmlSchemaGetBuiltInType"/>xmlSchemaGetBuiltInType ()</h3><pre class="programlisting"><a href="libxml2-schemasInternals.html#xmlSchemaTypePtr">xmlSchemaTypePtr</a>	xmlSchemaGetBuiltInType	(<a href="libxml2-schemasInternals.html#xmlSchemaValType">xmlSchemaValType</a> type)<br/></pre><p>Gives you the type struct for a built-in type by its type id.</p><div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>type</tt></i>:</span></td><td>the type of the built in type</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the type if found, NULL otherwise.</td></tr></tbody></table></div></div>        <hr/>        <div class="refsect2" lang="en"><h3><a name="xmlSchemaGetCanonValue"/>xmlSchemaGetCanonValue ()</h3><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/></pre><p>Get a the cononical 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><div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>val</tt></i>:</span></td><td>the precomputed value</td></tr><tr><td><span class="term"><i><tt>retValue</tt></i>:</span></td><td>the returned value</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><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></tr></tbody></table></div></div>        <hr/>        <div class="refsect2" lang="en"><h3><a name="xmlSchemaGetCanonValueWhtsp"/>xmlSchemaGetCanonValueWhtsp ()</h3><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/></pre><p>Get a the cononical representation of the value. The caller has to free the returned @retValue.</p><div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>val</tt></i>:</span></td><td>the precomputed value</td></tr><tr><td><span class="term"><i><tt>retValue</tt></i>:</span></td><td>the returned value</td></tr><tr><td><span class="term"><i><tt>ws</tt></i>:</span></td><td>the whitespace type of the value</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><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></tr></tbody></table></div></div>        <hr/>        <div class="refsect2" lang="en"><h3><a name="xmlSchemaGetFacetValueAsULong"/>xmlSchemaGetFacetValueAsULong ()</h3><pre class="programlisting">unsigned long	xmlSchemaGetFacetValueAsULong	(<a href="libxml2-schemasInternals.html#xmlSchemaFacetPtr">xmlSchemaFacetPtr</a> facet)<br/></pre><p>Extract the value of a facet</p><div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>facet</tt></i>:</span></td><td>an schemas type facet</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the value as a long</td></tr></tbody></table></div></div>        <hr/>        <div class="refsect2" lang="en"><h3><a name="xmlSchemaGetPredefinedType"/>xmlSchemaGetPredefinedType ()</h3><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/></pre><p>Lookup a type in the default XML Schemas type library</p><div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the type name</td></tr><tr><td><span class="term"><i><tt>ns</tt></i>:</span></td><td>the URI of the namespace usually "http://www.w3.org/2001/XMLSchema"</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the type if found, NULL otherwise</td></tr></tbody></table></div></div>        <hr/>        <div class="refsect2" lang="en"><h3><a name="xmlSchemaGetValType"/>xmlSchemaGetValType ()</h3><pre class="programlisting"><a href="libxml2-schemasInternals.html#xmlSchemaValType">xmlSchemaValType</a>	xmlSchemaGetValType	(<a href="libxml2-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> val)<br/></pre><p>Accessor for the type of a value</p><div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>val</tt></i>:</span></td><td>a schemas value</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the <a href="libxml2-schemasInternals.html#xmlSchemaValType">xmlSchemaValType</a> of the value</td></tr></tbody></table></div></div>        <hr/>        <div class="refsect2" lang="en"><h3><a name="xmlSchemaInitTypes"/>xmlSchemaInitTypes ()</h3><pre class="programlisting">void	xmlSchemaInitTypes		(void)<br/></pre><p>Initialize the default XML Schemas type library</p></div>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -