You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

134 lines
3.7 KiB

7 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. /******************************************************************
  2. * $Id: xsd2c.h,v 1.3 2004/10/15 13:35:39 snowdrop Exp $
  3. *
  4. * CSOAP Project: A SOAP client/server library in C
  5. * Copyright (C) 2003 Ferhat Ayaz
  6. *
  7. * This library is free software; you can redistribute it and/or
  8. * modify it under the terms of the GNU Library General Public
  9. * License as published by the Free Software Foundation; either
  10. * version 2 of the License, or (at your option) any later version.
  11. *
  12. * This library is distributed in the hope that it will be useful,
  13. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  15. * Library General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU Library General Public
  18. * License along with this library; if not, write to the
  19. * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  20. * Boston, MA 02111-1307, USA.
  21. *
  22. * Email: ayaz@jprogrammer.net
  23. */
  24. #ifndef XSD2C_H
  25. #define XSD2C_H
  26. #include <libxml/tree.h>
  27. #define XSD_ALL_STR "all"
  28. #define XSD_ANNOTATION_STR "annotation"
  29. #define XSD_ANY_STR ""
  30. #define XSD_ANY_ATTRIBUTE_STR "any"
  31. #define XSD_APPINFO_STR "appInfo"
  32. #define XSD_ATTRIBUTE_STR "attribute"
  33. #define XSD_ATTRIBUTE_GROUP_STR "attributeGroup"
  34. #define XSD_CHOICE_STR "choice"
  35. #define XSD_COMPLEX_TYPE_STR "complexType"
  36. #define XSD_COMPLEX_CONTENT_STR "complexContent"
  37. #define XSD_DOCUMENTATION_STR "documentation"
  38. #define XSD_ELEMENT_STR "element"
  39. #define XSD_ENUMERATION_STR "enumeration"
  40. #define XSD_EXTENSION_STR "extension"
  41. #define XSD_FIELD_STR "field"
  42. #define XSD_GROUP_STR "group"
  43. #define XSD_IMPORT_STR "import"
  44. #define XSD_INCLUDE_STR "include"
  45. #define XSD_KEY_STR "key"
  46. #define XSD_KEYREF_STR "keyref"
  47. #define XSD_LIST_STR "list"
  48. #define XSD_NOTATION_STR "notation"
  49. #define XSD_REDEFINE_STR "redefine"
  50. #define XSD_RESTRICTION_STR "restriction"
  51. #define XSD_SCHEMA_STR "schema"
  52. #define XSD_SELECTOR_STR "selector"
  53. #define XSD_SEQUENCE_STR "sequence"
  54. #define XSD_SIMPLE_CONTENT_STR "simpleContent"
  55. #define XSD_SIMPLE_TYPE_STR "simpleType"
  56. #define XSD_UNION_STR "union"
  57. #define XSD_UNIQUE_STR "unique"
  58. #define XSD_MIN_INCLUSIVE_STR "minInclusive"
  59. #define XSD_MAX_INCLUSIVE_STR "maxInclusive"
  60. #define XSD_MIN_EXCLUSIVE_STR "minExclusive"
  61. #define XSD_MAX_EXCLUSIVE_STR "maxExclusive"
  62. #define ATTR_TYPE_STR "type"
  63. #define ATTR_NAME_STR "name"
  64. #define ATTR_BASE_STR "base"
  65. #define ATTR_VALUE_STR "value"
  66. #define ATTR_MIN_OCCURS_STR "minOccurs"
  67. #define ATTR_MAX_OCCURS_STR "maxOccurs"
  68. #define ATTR_VALUE_UNBOUNDED "unbounded"
  69. enum _xsdAttr
  70. {
  71. ATTR_UNKNOWN,
  72. ATTR_TYPE,
  73. ATTR_NAME,
  74. ATTR_BASE,
  75. ATTR_MIN_OCCURS,
  76. ATTR_MAX_OCCURS
  77. };
  78. enum _xsdKeyword
  79. {
  80. XSD_UNKNOWN,
  81. XSD_ALL,
  82. XSD_ANNOTATION,
  83. XSD_ANY,
  84. XSD_ANY_ATTRIBUTE,
  85. XSD_APPINFO,
  86. XSD_ATTRIBUTE,
  87. XSD_ATTRIBUTE_GROUP,
  88. XSD_CHOICE,
  89. XSD_COMPLEX_TYPE,
  90. XSD_COMPLEX_CONTENT,
  91. XSD_DOCUMENTATION,
  92. XSD_ELEMENT,
  93. XSD_ENUMERATION,
  94. XSD_EXTENSION,
  95. XSD_FIELD,
  96. XSD_GROUP,
  97. XSD_IMPORT,
  98. XSD_INCLUDE,
  99. XSD_KEY,
  100. XSD_KEYREF,
  101. XSD_LIST,
  102. XSD_NOTATION,
  103. XSD_REDEFINE,
  104. XSD_RESTRICTION,
  105. XSD_SCHEMA,
  106. XSD_SELECTOR,
  107. XSD_SEQUENCE,
  108. XSD_SIMPLE_CONTENT,
  109. XSD_SIMPLE_TYPE,
  110. XSD_UNION,
  111. XSD_UNIQUE,
  112. XSD_MIN_INCLUSIVE,
  113. XSD_MAX_INCLUSIVE,
  114. XSD_MIN_EXCLUSIVE,
  115. XSD_MAX_EXCLUSIVE,
  116. };
  117. typedef enum _xsdKeyword xsdKeyword;
  118. typedef enum _xsdAttr xsdAttr;
  119. int xsdEngineRun(xmlNodePtr xsdNode, const char* destDir);
  120. void xsdSetDestDir(const char* destDir);
  121. xmlNodePtr xsdLoadFile(const char* filename);
  122. xmlNodePtr wsdlLoadFile(const char* filename);
  123. #endif