No Description

nhibernate-configuration.xsd 9.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226
  1. <xs:schema targetNamespace="urn:nhibernate-configuration-2.2" xmlns="urn:nhibernate-configuration-2.2" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:NS="urn:nhibernate-configuration-2.2">
  2. <xs:annotation>
  3. <xs:documentation>
  4. -- This schema was automatically generated by Syntext Dtd2Schema and changed for NH use --
  5. -- conversion tool (from file: hibernate-configuration-3.0.dtd) --
  6. -- Copyright (C) 2002, 2003 Syntext Inc. See http://www.syntext.com for updates. --
  7. </xs:documentation>
  8. </xs:annotation>
  9. <!-- Type definitions -->
  10. <xs:element name="hibernate-configuration">
  11. <xs:complexType>
  12. <xs:sequence>
  13. <xs:element ref="bytecode-provider" minOccurs="0" maxOccurs="1" >
  14. <xs:annotation>
  15. <xs:documentation>
  16. There are 3 default short-cut values
  17. - lcg : default for .NET2.0 and higher.
  18. - codedom : CodeDOM-based bytecode provider (mostly for .NET1.1).
  19. - null : Disable the reflection optimization completely.
  20. In addition you can specify the AssemblyQualifiedName of your custom bytecode-provider (implementation of IBytecodeProvider).
  21. Note: the bytecode-provider will be tooks in account only when specified in the app.config or web.config.
  22. </xs:documentation>
  23. </xs:annotation>
  24. </xs:element>
  25. <xs:element ref="reflection-optimizer" maxOccurs="1" minOccurs="0" />
  26. <xs:element ref="session-factory" minOccurs="0" maxOccurs="1" />
  27. </xs:sequence>
  28. </xs:complexType>
  29. </xs:element>
  30. <xs:element name="class-cache">
  31. <xs:complexType>
  32. <xs:sequence>
  33. </xs:sequence>
  34. <xs:attribute name="class" type="xs:string" use="required" />
  35. <xs:attributeGroup ref="cacheSpecification" />
  36. <xs:attribute name="include">
  37. <xs:simpleType>
  38. <xs:restriction base="xs:string">
  39. <xs:enumeration value="all" />
  40. <xs:enumeration value="non-lazy" />
  41. </xs:restriction>
  42. </xs:simpleType>
  43. </xs:attribute>
  44. </xs:complexType>
  45. </xs:element>
  46. <xs:element name="collection-cache">
  47. <xs:complexType>
  48. <xs:sequence />
  49. <xs:attribute name="collection" type="xs:string" use="required" />
  50. <xs:attributeGroup ref="cacheSpecification" />
  51. </xs:complexType>
  52. </xs:element>
  53. <xs:element name="mapping">
  54. <xs:annotation>
  55. <xs:documentation>
  56. There are 3 possible combinations of mapping attributes
  57. 1 - resource &amp; assembly: NHibernate will read the mapping resource from the specified assembly
  58. 2 - file only: NHibernate will read the mapping from the file.
  59. 3 - assembly only: NHibernate will find all the resources ending in hbm.xml from the assembly.
  60. </xs:documentation>
  61. </xs:annotation>
  62. <xs:complexType>
  63. <xs:attribute name="resource" />
  64. <xs:attribute name="file" />
  65. <xs:attribute name="assembly" />
  66. </xs:complexType>
  67. </xs:element>
  68. <xs:element name="property">
  69. <xs:complexType>
  70. <xs:simpleContent>
  71. <xs:extension base="xs:string">
  72. <xs:attribute name="name" use="required">
  73. <xs:simpleType>
  74. <xs:restriction base="xs:string">
  75. <xs:enumeration value="connection.provider" />
  76. <xs:enumeration value="connection.driver_class" />
  77. <xs:enumeration value="connection.connection_string" />
  78. <xs:enumeration value="connection.isolation" />
  79. <xs:enumeration value="connection.release_mode" />
  80. <xs:enumeration value="connection.connection_string_name" />
  81. <xs:enumeration value="dialect" />
  82. <xs:enumeration value="default_schema" />
  83. <xs:enumeration value="show_sql" />
  84. <xs:enumeration value="max_fetch_depth" />
  85. <xs:enumeration value="current_session_context_class" />
  86. <xs:enumeration value="transaction.factory_class" />
  87. <xs:enumeration value="cache.provider_class" />
  88. <xs:enumeration value="cache.use_query_cache" />
  89. <xs:enumeration value="cache.query_cache_factory" />
  90. <xs:enumeration value="cache.use_second_level_cache" />
  91. <xs:enumeration value="cache.region_prefix" />
  92. <xs:enumeration value="cache.use_minimal_puts" />
  93. <xs:enumeration value="cache.default_expiration" />
  94. <xs:enumeration value="query.substitutions" />
  95. <xs:enumeration value="query.factory_class" />
  96. <xs:enumeration value="query.imports" />
  97. <xs:enumeration value="hbm2ddl.auto" />
  98. <xs:enumeration value="hbm2ddl.keywords" />
  99. <xs:enumeration value="sql_exception_converter" />
  100. <xs:enumeration value="adonet.wrap_result_sets" />
  101. <xs:enumeration value="prepare_sql" />
  102. <xs:enumeration value="command_timeout" />
  103. <xs:enumeration value="adonet.batch_size" />
  104. <xs:enumeration value="use_proxy_validator" />
  105. <xs:enumeration value="xml.output_stylesheet" />
  106. <xs:enumeration value="generate_statistics" />
  107. <xs:enumeration value="query.startup_check" />
  108. <xs:enumeration value="default_catalog" />
  109. <xs:enumeration value="proxyfactory.factory_class" />
  110. <xs:enumeration value="adonet.factory_class" />
  111. <xs:enumeration value="default_batch_fetch_size" />
  112. <xs:enumeration value="default_entity_mode" />
  113. <xs:enumeration value="use_sql_comments" />
  114. <xs:enumeration value="format_sql" />
  115. <xs:enumeration value="collectiontype.factory_class" />
  116. <xs:enumeration value="order_inserts" />
  117. </xs:restriction>
  118. </xs:simpleType>
  119. </xs:attribute>
  120. </xs:extension>
  121. </xs:simpleContent>
  122. </xs:complexType>
  123. </xs:element>
  124. <xs:element name="session-factory">
  125. <xs:complexType>
  126. <xs:sequence>
  127. <xs:element ref="property" minOccurs="0" maxOccurs="unbounded" />
  128. <xs:element ref="mapping" minOccurs="0" maxOccurs="unbounded" />
  129. <xs:choice minOccurs="0" maxOccurs="unbounded">
  130. <xs:element ref="class-cache" />
  131. <xs:element ref="collection-cache" />
  132. </xs:choice>
  133. <xs:element ref="event" minOccurs="0" maxOccurs="unbounded" />
  134. <xs:element ref="listener" minOccurs="0" maxOccurs="unbounded" />
  135. </xs:sequence>
  136. <xs:attribute name="name" use="optional" />
  137. </xs:complexType>
  138. </xs:element>
  139. <xs:attributeGroup name="cacheSpecification">
  140. <xs:attribute name="region" type="xs:string" use="optional" />
  141. <xs:attribute name="usage" use="required">
  142. <xs:simpleType>
  143. <xs:restriction base="xs:string">
  144. <xs:enumeration value="read-only" />
  145. <xs:enumeration value="read-write" />
  146. <xs:enumeration value="nonstrict-read-write" />
  147. <xs:enumeration value="transactional" />
  148. </xs:restriction>
  149. </xs:simpleType>
  150. </xs:attribute>
  151. </xs:attributeGroup>
  152. <xs:element name="event">
  153. <xs:complexType>
  154. <xs:sequence>
  155. <xs:element ref="listener" minOccurs="1" maxOccurs="unbounded" />
  156. </xs:sequence>
  157. <xs:attribute name="type" type="listenerType" use="required" />
  158. </xs:complexType>
  159. </xs:element>
  160. <xs:element name="listener">
  161. <xs:complexType>
  162. <xs:sequence />
  163. <xs:attribute name="class" type="xs:string" use="required" />
  164. <xs:attribute name="type" type="listenerType" use="optional" />
  165. </xs:complexType>
  166. </xs:element>
  167. <xs:simpleType name="listenerType">
  168. <xs:restriction base="xs:string">
  169. <xs:enumeration value="auto-flush" />
  170. <xs:enumeration value="merge" />
  171. <xs:enumeration value="create" />
  172. <xs:enumeration value="create-onflush" />
  173. <xs:enumeration value="delete" />
  174. <xs:enumeration value="dirty-check" />
  175. <xs:enumeration value="evict" />
  176. <xs:enumeration value="flush" />
  177. <xs:enumeration value="flush-entity" />
  178. <xs:enumeration value="load" />
  179. <xs:enumeration value="load-collection" />
  180. <xs:enumeration value="lock" />
  181. <xs:enumeration value="refresh" />
  182. <xs:enumeration value="replicate" />
  183. <xs:enumeration value="save-update" />
  184. <xs:enumeration value="save" />
  185. <xs:enumeration value="pre-update" />
  186. <xs:enumeration value="update" />
  187. <xs:enumeration value="pre-load" />
  188. <xs:enumeration value="pre-delete" />
  189. <xs:enumeration value="pre-insert" />
  190. <xs:enumeration value="post-load" />
  191. <xs:enumeration value="post-insert" />
  192. <xs:enumeration value="post-update" />
  193. <xs:enumeration value="post-delete" />
  194. <xs:enumeration value="post-commit-update" />
  195. <xs:enumeration value="post-commit-insert" />
  196. <xs:enumeration value="post-commit-delete" />
  197. <xs:enumeration value="pre-collection-recreate" />
  198. <xs:enumeration value="pre-collection-remove" />
  199. <xs:enumeration value="pre-collection-update" />
  200. <xs:enumeration value="post-collection-recreate" />
  201. <xs:enumeration value="post-collection-remove" />
  202. <xs:enumeration value="post-collection-update" />
  203. </xs:restriction>
  204. </xs:simpleType>
  205. <xs:element name="bytecode-provider">
  206. <xs:complexType>
  207. <xs:sequence>
  208. </xs:sequence>
  209. <xs:attribute name="type" default="lcg">
  210. <xs:simpleType>
  211. <xs:restriction base="xs:string">
  212. <xs:enumeration value="codedom" />
  213. <xs:enumeration value="lcg" />
  214. <xs:enumeration value="null" />
  215. </xs:restriction>
  216. </xs:simpleType>
  217. </xs:attribute>
  218. </xs:complexType>
  219. </xs:element>
  220. <xs:element name="reflection-optimizer">
  221. <xs:complexType>
  222. <xs:sequence />
  223. <xs:attribute name="use" type="xs:boolean" />
  224. </xs:complexType>
  225. </xs:element>
  226. </xs:schema>