xmlschemastypes.h
上传用户:szjkjd
上传日期:2022-06-27
资源大小:8968k
文件大小:5k
源码类别:

浏览器

开发平台:

Visual C++

  1. /*
  2.  * Summary: implementation of XML Schema Datatypes
  3.  * Description: module providing the XML Schema Datatypes implementation
  4.  *              both definition and validity checking
  5.  *
  6.  * Copy: See Copyright for the status of this software.
  7.  *
  8.  * Author: Daniel Veillard
  9.  */
  10. #ifndef __XML_SCHEMA_TYPES_H__
  11. #define __XML_SCHEMA_TYPES_H__
  12. #include <libxml/xmlversion.h>
  13. #ifdef LIBXML_SCHEMAS_ENABLED
  14. #include <libxml/schemasInternals.h>
  15. #include <libxml/xmlschemas.h>
  16. #ifdef __cplusplus
  17. extern "C" {
  18. #endif
  19. typedef enum {
  20.     XML_SCHEMA_WHITESPACE_UNKNOWN = 0,
  21.     XML_SCHEMA_WHITESPACE_PRESERVE = 1,
  22.     XML_SCHEMA_WHITESPACE_REPLACE = 2,
  23.     XML_SCHEMA_WHITESPACE_COLLAPSE = 3
  24. } xmlSchemaWhitespaceValueType;
  25. XMLPUBFUN void XMLCALL
  26.      xmlSchemaInitTypes (void);
  27. XMLPUBFUN void XMLCALL
  28. xmlSchemaCleanupTypes (void);
  29. XMLPUBFUN xmlSchemaTypePtr XMLCALL 
  30. xmlSchemaGetPredefinedType (const xmlChar *name,
  31.  const xmlChar *ns);
  32. XMLPUBFUN int XMLCALL
  33. xmlSchemaValidatePredefinedType (xmlSchemaTypePtr type,
  34.  const xmlChar *value,
  35.  xmlSchemaValPtr *val);
  36. XMLPUBFUN int XMLCALL
  37. xmlSchemaValPredefTypeNode (xmlSchemaTypePtr type,
  38.  const xmlChar *value,
  39.  xmlSchemaValPtr *val,
  40.  xmlNodePtr node);
  41. XMLPUBFUN int XMLCALL
  42. xmlSchemaValidateFacet (xmlSchemaTypePtr base,
  43.  xmlSchemaFacetPtr facet,
  44.  const xmlChar *value,
  45.  xmlSchemaValPtr val);
  46. XMLPUBFUN int XMLCALL
  47. xmlSchemaValidateFacetWhtsp (xmlSchemaFacetPtr facet,
  48.  xmlSchemaWhitespaceValueType fws,
  49.  xmlSchemaValType valType,  
  50.  const xmlChar *value,
  51.  xmlSchemaValPtr val,
  52.  xmlSchemaWhitespaceValueType ws);
  53. XMLPUBFUN void XMLCALL
  54. xmlSchemaFreeValue (xmlSchemaValPtr val);
  55. XMLPUBFUN xmlSchemaFacetPtr XMLCALL 
  56. xmlSchemaNewFacet (void);
  57. XMLPUBFUN int XMLCALL
  58. xmlSchemaCheckFacet (xmlSchemaFacetPtr facet,
  59.  xmlSchemaTypePtr typeDecl,
  60.  xmlSchemaParserCtxtPtr ctxt,
  61.  const xmlChar *name);
  62. XMLPUBFUN void XMLCALL
  63. xmlSchemaFreeFacet (xmlSchemaFacetPtr facet);
  64. XMLPUBFUN int XMLCALL
  65. xmlSchemaCompareValues (xmlSchemaValPtr x,
  66.  xmlSchemaValPtr y);
  67. XMLPUBFUN xmlSchemaTypePtr XMLCALL
  68.     xmlSchemaGetBuiltInListSimpleTypeItemType (xmlSchemaTypePtr type);
  69. XMLPUBFUN int XMLCALL
  70.     xmlSchemaValidateListSimpleTypeFacet (xmlSchemaFacetPtr facet,
  71.  const xmlChar *value,
  72.  unsigned long actualLen,
  73.  unsigned long *expectedLen);
  74. XMLPUBFUN xmlSchemaTypePtr XMLCALL
  75. xmlSchemaGetBuiltInType (xmlSchemaValType type);
  76. XMLPUBFUN int XMLCALL
  77. xmlSchemaIsBuiltInTypeFacet (xmlSchemaTypePtr type, 
  78.  int facetType);
  79. XMLPUBFUN xmlChar * XMLCALL
  80. xmlSchemaCollapseString (const xmlChar *value);
  81. XMLPUBFUN xmlChar * XMLCALL
  82. xmlSchemaWhiteSpaceReplace (const xmlChar *value);
  83. XMLPUBFUN unsigned long  XMLCALL
  84. xmlSchemaGetFacetValueAsULong (xmlSchemaFacetPtr facet);
  85. XMLPUBFUN int XMLCALL
  86. xmlSchemaValidateLengthFacet (xmlSchemaTypePtr type, 
  87.  xmlSchemaFacetPtr facet,
  88.  const xmlChar *value,
  89.  xmlSchemaValPtr val,
  90.  unsigned long *length);
  91. XMLPUBFUN int XMLCALL
  92. xmlSchemaValidateLengthFacetWhtsp(xmlSchemaFacetPtr facet,
  93.   xmlSchemaValType valType,
  94.   const xmlChar *value,
  95.   xmlSchemaValPtr val,   
  96.   unsigned long *length,
  97.   xmlSchemaWhitespaceValueType ws);
  98. XMLPUBFUN int XMLCALL
  99. xmlSchemaValPredefTypeNodeNoNorm(xmlSchemaTypePtr type, 
  100.  const xmlChar *value,
  101.  xmlSchemaValPtr *val, 
  102.  xmlNodePtr node);
  103. XMLPUBFUN int XMLCALL
  104. xmlSchemaGetCanonValue (xmlSchemaValPtr val,
  105.  const xmlChar **retValue);
  106. XMLPUBFUN int XMLCALL
  107. xmlSchemaGetCanonValueWhtsp (xmlSchemaValPtr val,  
  108.  const xmlChar **retValue,
  109.  xmlSchemaWhitespaceValueType ws);
  110. XMLPUBFUN int XMLCALL
  111. xmlSchemaValueAppend (xmlSchemaValPtr prev,
  112.  xmlSchemaValPtr cur);
  113. XMLPUBFUN xmlSchemaValPtr XMLCALL
  114. xmlSchemaValueGetNext (xmlSchemaValPtr cur);
  115. XMLPUBFUN const xmlChar * XMLCALL
  116. xmlSchemaValueGetAsString (xmlSchemaValPtr val);
  117. XMLPUBFUN int XMLCALL
  118. xmlSchemaValueGetAsBoolean (xmlSchemaValPtr val);
  119. XMLPUBFUN xmlSchemaValPtr XMLCALL
  120. xmlSchemaNewStringValue (xmlSchemaValType type,
  121.  const xmlChar *value);
  122. XMLPUBFUN xmlSchemaValPtr XMLCALL
  123. xmlSchemaNewNOTATIONValue (const xmlChar *name,
  124.  const xmlChar *ns);
  125. XMLPUBFUN xmlSchemaValPtr XMLCALL
  126. xmlSchemaNewQNameValue (const xmlChar *namespaceName,
  127.  const xmlChar *localName);
  128. XMLPUBFUN int XMLCALL
  129. xmlSchemaCompareValuesWhtsp (xmlSchemaValPtr x,
  130.  xmlSchemaWhitespaceValueType xws,
  131.  xmlSchemaValPtr y,
  132.  xmlSchemaWhitespaceValueType yws);
  133. XMLPUBFUN xmlSchemaValPtr XMLCALL
  134. xmlSchemaCopyValue (xmlSchemaValPtr val);
  135. XMLPUBFUN xmlSchemaValType XMLCALL
  136. xmlSchemaGetValType (xmlSchemaValPtr val);
  137. #ifdef __cplusplus
  138. }
  139. #endif
  140. #endif /* LIBXML_SCHEMAS_ENABLED */
  141. #endif /* __XML_SCHEMA_TYPES_H__ */