application_5.xsd 9.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <xsd:schema xmlns="http://www.w3.org/2001/XMLSchema"
  3. targetNamespace="http://java.sun.com/xml/ns/javaee"
  4. xmlns:javaee="http://java.sun.com/xml/ns/javaee"
  5. xmlns:xsd="http://www.w3.org/2001/XMLSchema"
  6. elementFormDefault="qualified"
  7. attributeFormDefault="unqualified"
  8. version="5">
  9. <xsd:annotation>
  10. <xsd:documentation>
  11. @(#)application_5.xsds 1.17 08/05/05
  12. </xsd:documentation>
  13. </xsd:annotation>
  14. <xsd:annotation>
  15. <xsd:documentation>
  16. Copyright 2003-2006 Sun Microsystems, Inc.
  17. 4150 Network Circle
  18. Santa Clara, California 95054
  19. U.S.A
  20. All rights reserved.
  21. Sun Microsystems, Inc. has intellectual property rights
  22. relating to technology described in this document. In
  23. particular, and without limitation, these intellectual
  24. property rights may include one or more of the U.S. patents
  25. listed at http://www.sun.com/patents and one or more
  26. additional patents or pending patent applications in the
  27. U.S. and other countries.
  28. This document and the technology which it describes are
  29. distributed under licenses restricting their use, copying,
  30. distribution, and decompilation. No part of this document
  31. may be reproduced in any form by any means without prior
  32. written authorization of Sun and its licensors, if any.
  33. Third-party software, including font technology, is
  34. copyrighted and licensed from Sun suppliers.
  35. Sun, Sun Microsystems, the Sun logo, Solaris, Java, J2EE,
  36. JavaServer Pages, Enterprise JavaBeans and the Java Coffee
  37. Cup logo are trademarks or registered trademarks of Sun
  38. Microsystems, Inc. in the U.S. and other countries.
  39. Federal Acquisitions: Commercial Software - Government Users
  40. Subject to Standard License Terms and Conditions.
  41. </xsd:documentation>
  42. </xsd:annotation>
  43. <xsd:annotation>
  44. <xsd:documentation>
  45. <![CDATA[
  46. This is the XML Schema for the application 5 deployment
  47. descriptor. The deployment descriptor must be named
  48. "META-INF/application.xml" in the application's ear file.
  49. All application deployment descriptors must indicate
  50. the application schema by using the Java EE namespace:
  51. http://java.sun.com/xml/ns/javaee
  52. and indicate the version of the schema by
  53. using the version element as shown below:
  54. <application xmlns="http://java.sun.com/xml/ns/javaee"
  55. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  56. xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
  57. http://java.sun.com/xml/ns/javaee/application_5.xsd"
  58. version="5">
  59. ...
  60. </application>
  61. The instance documents may indicate the published version of
  62. the schema using the xsi:schemaLocation attribute for Java EE
  63. namespace with the following location:
  64. http://java.sun.com/xml/ns/javaee/application_5.xsd
  65. ]]>
  66. </xsd:documentation>
  67. </xsd:annotation>
  68. <xsd:annotation>
  69. <xsd:documentation>
  70. The following conventions apply to all Java EE
  71. deployment descriptor elements unless indicated otherwise.
  72. - In elements that specify a pathname to a file within the
  73. same JAR file, relative filenames (i.e., those not
  74. starting with "/") are considered relative to the root of
  75. the JAR file's namespace. Absolute filenames (i.e., those
  76. starting with "/") also specify names in the root of the
  77. JAR file's namespace. In general, relative names are
  78. preferred. The exception is .war files where absolute
  79. names are preferred for consistency with the Servlet API.
  80. </xsd:documentation>
  81. </xsd:annotation>
  82. <xsd:include schemaLocation="javaee_5.xsd"/>
  83. <!-- **************************************************** -->
  84. <xsd:element name="application" type="javaee:applicationType">
  85. <xsd:annotation>
  86. <xsd:documentation>
  87. The application element is the root element of a Java EE
  88. application deployment descriptor.
  89. </xsd:documentation>
  90. </xsd:annotation>
  91. <xsd:unique name="context-root-uniqueness">
  92. <xsd:annotation>
  93. <xsd:documentation>
  94. The context-root element content must be unique
  95. in the ear.
  96. </xsd:documentation>
  97. </xsd:annotation>
  98. <xsd:selector xpath="javaee:module/javaee:web"/>
  99. <xsd:field xpath="javaee:context-root"/>
  100. </xsd:unique>
  101. <xsd:unique name="security-role-uniqueness">
  102. <xsd:annotation>
  103. <xsd:documentation>
  104. The security-role-name element content
  105. must be unique in the ear.
  106. </xsd:documentation>
  107. </xsd:annotation>
  108. <xsd:selector xpath="javaee:security-role"/>
  109. <xsd:field xpath="javaee:role-name"/>
  110. </xsd:unique>
  111. </xsd:element>
  112. <!-- **************************************************** -->
  113. <xsd:complexType name="applicationType">
  114. <xsd:annotation>
  115. <xsd:documentation>
  116. The applicationType defines the structure of the
  117. application.
  118. </xsd:documentation>
  119. </xsd:annotation>
  120. <xsd:sequence>
  121. <xsd:group ref="javaee:descriptionGroup"/>
  122. <xsd:element name="module"
  123. type="javaee:moduleType"
  124. maxOccurs="unbounded">
  125. <xsd:annotation>
  126. <xsd:documentation>
  127. The application deployment descriptor must have one
  128. module element for each Java EE module in the
  129. application package. A module element is defined
  130. by moduleType definition.
  131. </xsd:documentation>
  132. </xsd:annotation>
  133. </xsd:element>
  134. <xsd:element name="security-role"
  135. type="javaee:security-roleType"
  136. minOccurs="0"
  137. maxOccurs="unbounded"/>
  138. <xsd:element name="library-directory"
  139. type="javaee:pathType"
  140. minOccurs="0"
  141. maxOccurs="1">
  142. <xsd:annotation>
  143. <xsd:documentation>
  144. The library-directory element specifies the pathname
  145. of a directory within the application package, relative
  146. to the top level of the application package. All files
  147. named "*.jar" in this directory must be made available
  148. in the class path of all components included in this
  149. application package. If this element isn't specified,
  150. the directory named "lib" is searched. An empty element
  151. may be used to disable searching.
  152. </xsd:documentation>
  153. </xsd:annotation>
  154. </xsd:element>
  155. </xsd:sequence>
  156. <xsd:attribute name="version"
  157. type="javaee:dewey-versionType"
  158. fixed="5"
  159. use="required">
  160. <xsd:annotation>
  161. <xsd:documentation>
  162. The required value for the version is 5.
  163. </xsd:documentation>
  164. </xsd:annotation>
  165. </xsd:attribute>
  166. <xsd:attribute name="id" type="xsd:ID"/>
  167. </xsd:complexType>
  168. <!-- **************************************************** -->
  169. <xsd:complexType name="moduleType">
  170. <xsd:annotation>
  171. <xsd:documentation>
  172. The moduleType defines a single Java EE module and contains a
  173. connector, ejb, java, or web element, which indicates the
  174. module type and contains a path to the module file, and an
  175. optional alt-dd element, which specifies an optional URI to
  176. the post-assembly version of the deployment descriptor.
  177. </xsd:documentation>
  178. </xsd:annotation>
  179. <xsd:sequence>
  180. <xsd:choice>
  181. <xsd:element name="connector"
  182. type="javaee:pathType">
  183. <xsd:annotation>
  184. <xsd:documentation>
  185. The connector element specifies the URI of a
  186. resource adapter archive file, relative to the
  187. top level of the application package.
  188. </xsd:documentation>
  189. </xsd:annotation>
  190. </xsd:element>
  191. <xsd:element name="ejb"
  192. type="javaee:pathType">
  193. <xsd:annotation>
  194. <xsd:documentation>
  195. The ejb element specifies the URI of an ejb-jar,
  196. relative to the top level of the application
  197. package.
  198. </xsd:documentation>
  199. </xsd:annotation>
  200. </xsd:element>
  201. <xsd:element name="java"
  202. type="javaee:pathType">
  203. <xsd:annotation>
  204. <xsd:documentation>
  205. The java element specifies the URI of a java
  206. application client module, relative to the top
  207. level of the application package.
  208. </xsd:documentation>
  209. </xsd:annotation>
  210. </xsd:element>
  211. <xsd:element name="web"
  212. type="javaee:webType"/>
  213. </xsd:choice>
  214. <xsd:element name="alt-dd"
  215. type="javaee:pathType"
  216. minOccurs="0">
  217. <xsd:annotation>
  218. <xsd:documentation>
  219. The alt-dd element specifies an optional URI to the
  220. post-assembly version of the deployment descriptor
  221. file for a particular Java EE module. The URI must
  222. specify the full pathname of the deployment
  223. descriptor file relative to the application's root
  224. directory. If alt-dd is not specified, the deployer
  225. must read the deployment descriptor from the default
  226. location and file name required by the respective
  227. component specification.
  228. </xsd:documentation>
  229. </xsd:annotation>
  230. </xsd:element>
  231. </xsd:sequence>
  232. <xsd:attribute name="id" type="xsd:ID"/>
  233. </xsd:complexType>
  234. <!-- **************************************************** -->
  235. <xsd:complexType name="webType">
  236. <xsd:annotation>
  237. <xsd:documentation>
  238. The webType defines the web-uri and context-root of
  239. a web application module.
  240. </xsd:documentation>
  241. </xsd:annotation>
  242. <xsd:sequence>
  243. <xsd:element name="web-uri"
  244. type="javaee:pathType">
  245. <xsd:annotation>
  246. <xsd:documentation>
  247. The web-uri element specifies the URI of a web
  248. application file, relative to the top level of the
  249. application package.
  250. </xsd:documentation>
  251. </xsd:annotation>
  252. </xsd:element>
  253. <xsd:element name="context-root"
  254. type="javaee:string">
  255. <xsd:annotation>
  256. <xsd:documentation>
  257. The context-root element specifies the context root
  258. of a web application.
  259. </xsd:documentation>
  260. </xsd:annotation>
  261. </xsd:element>
  262. </xsd:sequence>
  263. <xsd:attribute name="id" type="xsd:ID"/>
  264. </xsd:complexType>
  265. </xsd:schema>