web-fragment_3_0.xsd 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281
  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="3.0">
  9. <xsd:annotation>
  10. <xsd:documentation>
  11. $Id$
  12. </xsd:documentation>
  13. </xsd:annotation>
  14. <xsd:annotation>
  15. <xsd:documentation>
  16. DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  17. Copyright 2003-2009 Sun Microsystems, Inc. All rights reserved.
  18. The contents of this file are subject to the terms of either the
  19. GNU General Public License Version 2 only ("GPL") or the Common
  20. Development and Distribution License("CDDL") (collectively, the
  21. "License"). You may not use this file except in compliance with
  22. the License. You can obtain a copy of the License at
  23. https://glassfish.dev.java.net/public/CDDL+GPL.html or
  24. glassfish/bootstrap/legal/LICENSE.txt. See the License for the
  25. specific language governing permissions and limitations under the
  26. License.
  27. When distributing the software, include this License Header
  28. Notice in each file and include the License file at
  29. glassfish/bootstrap/legal/LICENSE.txt. Sun designates this
  30. particular file as subject to the "Classpath" exception as
  31. provided by Sun in the GPL Version 2 section of the License file
  32. that accompanied this code. If applicable, add the following
  33. below the License Header, with the fields enclosed by brackets []
  34. replaced by your own identifying information:
  35. "Portions Copyrighted [year] [name of copyright owner]"
  36. Contributor(s):
  37. If you wish your version of this file to be governed by only the
  38. CDDL or only the GPL Version 2, indicate your decision by adding
  39. "[Contributor] elects to include this software in this
  40. distribution under the [CDDL or GPL Version 2] license." If you
  41. don't indicate a single choice of license, a recipient has the
  42. option to distribute your version of this file under either the
  43. CDDL, the GPL Version 2 or to extend the choice of license to its
  44. licensees as provided above. However, if you add GPL Version 2
  45. code and therefore, elected the GPL Version 2 license, then the
  46. option applies only if the new code is made subject to such
  47. option by the copyright holder.
  48. </xsd:documentation>
  49. </xsd:annotation>
  50. <xsd:annotation>
  51. <xsd:documentation>
  52. <![CDATA[[
  53. This is the XML Schema for the Servlet 3.0 deployment descriptor.
  54. The deployment descriptor must be named "META-INF/web-fragment.xml"
  55. in the web fragment's jar file. All Servlet deployment descriptors
  56. must indicate the web application schema by using the Java EE
  57. namespace:
  58. http://java.sun.com/xml/ns/javaee
  59. and by indicating the version of the schema by
  60. using the version element as shown below:
  61. <web-fragment xmlns="http://java.sun.com/xml/ns/javaee"
  62. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  63. xsi:schemaLocation="..."
  64. version="3.0">
  65. ...
  66. </web-fragment>
  67. The instance documents may indicate the published version of
  68. the schema using the xsi:schemaLocation attribute for Java EE
  69. namespace with the following location:
  70. http://java.sun.com/xml/ns/javaee/web-fragment_3_0.xsd
  71. ]]>
  72. </xsd:documentation>
  73. </xsd:annotation>
  74. <xsd:annotation>
  75. <xsd:documentation>
  76. The following conventions apply to all Java EE
  77. deployment descriptor elements unless indicated otherwise.
  78. - In elements that specify a pathname to a file within the
  79. same JAR file, relative filenames (i.e., those not
  80. starting with "/") are considered relative to the root of
  81. the JAR file's namespace. Absolute filenames (i.e., those
  82. starting with "/") also specify names in the root of the
  83. JAR file's namespace. In general, relative names are
  84. preferred. The exception is .war files where absolute
  85. names are preferred for consistency with the Servlet API.
  86. </xsd:documentation>
  87. </xsd:annotation>
  88. <xsd:include schemaLocation="web-common_3_0.xsd"/>
  89. <!-- **************************************************** -->
  90. <xsd:element name="web-fragment"
  91. type="javaee:web-fragmentType">
  92. <xsd:annotation>
  93. <xsd:documentation>
  94. The web-fragment element is the root of the deployment
  95. descriptor for a web fragment. Note that the sub-elements
  96. of this element can be in the arbitrary order. Because of
  97. that, the multiplicity of the elements of distributable,
  98. session-config, welcome-file-list, jsp-config, login-config,
  99. and locale-encoding-mapping-list was changed from "?" to "*"
  100. in this schema. However, the deployment descriptor instance
  101. file must not contain multiple elements of session-config,
  102. jsp-config, and login-config. When there are multiple elements of
  103. welcome-file-list or locale-encoding-mapping-list, the container
  104. must concatenate the element contents. The multiple occurence
  105. of the element distributable is redundant and the container
  106. treats that case exactly in the same way when there is only
  107. one distributable.
  108. </xsd:documentation>
  109. </xsd:annotation>
  110. <xsd:unique name="web-common-servlet-name-uniqueness">
  111. <xsd:annotation>
  112. <xsd:documentation>
  113. The servlet element contains the name of a servlet.
  114. The name must be unique within the web application.
  115. </xsd:documentation>
  116. </xsd:annotation>
  117. <xsd:selector xpath="javaee:servlet"/>
  118. <xsd:field xpath="javaee:servlet-name"/>
  119. </xsd:unique>
  120. <xsd:unique name="web-common-filter-name-uniqueness">
  121. <xsd:annotation>
  122. <xsd:documentation>
  123. The filter element contains the name of a filter.
  124. The name must be unique within the web application.
  125. </xsd:documentation>
  126. </xsd:annotation>
  127. <xsd:selector xpath="javaee:filter"/>
  128. <xsd:field xpath="javaee:filter-name"/>
  129. </xsd:unique>
  130. <xsd:unique name="web-common-ejb-local-ref-name-uniqueness">
  131. <xsd:annotation>
  132. <xsd:documentation>
  133. The ejb-local-ref-name element contains the name of an EJB
  134. reference. The EJB reference is an entry in the web
  135. application's environment and is relative to the
  136. java:comp/env context. The name must be unique within
  137. the web application.
  138. It is recommended that name is prefixed with "ejb/".
  139. </xsd:documentation>
  140. </xsd:annotation>
  141. <xsd:selector xpath="javaee:ejb-local-ref"/>
  142. <xsd:field xpath="javaee:ejb-ref-name"/>
  143. </xsd:unique>
  144. <xsd:unique name="web-common-ejb-ref-name-uniqueness">
  145. <xsd:annotation>
  146. <xsd:documentation>
  147. The ejb-ref-name element contains the name of an EJB
  148. reference. The EJB reference is an entry in the web
  149. application's environment and is relative to the
  150. java:comp/env context. The name must be unique within
  151. the web application.
  152. It is recommended that name is prefixed with "ejb/".
  153. </xsd:documentation>
  154. </xsd:annotation>
  155. <xsd:selector xpath="javaee:ejb-ref"/>
  156. <xsd:field xpath="javaee:ejb-ref-name"/>
  157. </xsd:unique>
  158. <xsd:unique name="web-common-resource-env-ref-uniqueness">
  159. <xsd:annotation>
  160. <xsd:documentation>
  161. The resource-env-ref-name element specifies the name of
  162. a resource environment reference; its value is the
  163. environment entry name used in the web application code.
  164. The name is a JNDI name relative to the java:comp/env
  165. context and must be unique within a web application.
  166. </xsd:documentation>
  167. </xsd:annotation>
  168. <xsd:selector xpath="javaee:resource-env-ref"/>
  169. <xsd:field xpath="javaee:resource-env-ref-name"/>
  170. </xsd:unique>
  171. <xsd:unique name="web-common-message-destination-ref-uniqueness">
  172. <xsd:annotation>
  173. <xsd:documentation>
  174. The message-destination-ref-name element specifies the name of
  175. a message destination reference; its value is the
  176. environment entry name used in the web application code.
  177. The name is a JNDI name relative to the java:comp/env
  178. context and must be unique within a web application.
  179. </xsd:documentation>
  180. </xsd:annotation>
  181. <xsd:selector xpath="javaee:message-destination-ref"/>
  182. <xsd:field xpath="javaee:message-destination-ref-name"/>
  183. </xsd:unique>
  184. <xsd:unique name="web-common-res-ref-name-uniqueness">
  185. <xsd:annotation>
  186. <xsd:documentation>
  187. The res-ref-name element specifies the name of a
  188. resource manager connection factory reference. The name
  189. is a JNDI name relative to the java:comp/env context.
  190. The name must be unique within a web application.
  191. </xsd:documentation>
  192. </xsd:annotation>
  193. <xsd:selector xpath="javaee:resource-ref"/>
  194. <xsd:field xpath="javaee:res-ref-name"/>
  195. </xsd:unique>
  196. <xsd:unique name="web-common-env-entry-name-uniqueness">
  197. <xsd:annotation>
  198. <xsd:documentation>
  199. The env-entry-name element contains the name of a web
  200. application's environment entry. The name is a JNDI
  201. name relative to the java:comp/env context. The name
  202. must be unique within a web application.
  203. </xsd:documentation>
  204. </xsd:annotation>
  205. <xsd:selector xpath="javaee:env-entry"/>
  206. <xsd:field xpath="javaee:env-entry-name"/>
  207. </xsd:unique>
  208. <xsd:key name="web-common-role-name-key">
  209. <xsd:annotation>
  210. <xsd:documentation>
  211. A role-name-key is specified to allow the references
  212. from the security-role-refs.
  213. </xsd:documentation>
  214. </xsd:annotation>
  215. <xsd:selector xpath="javaee:security-role"/>
  216. <xsd:field xpath="javaee:role-name"/>
  217. </xsd:key>
  218. <xsd:keyref name="web-common-role-name-references"
  219. refer="javaee:web-common-role-name-key">
  220. <xsd:annotation>
  221. <xsd:documentation>
  222. The keyref indicates the references from
  223. security-role-ref to a specified role-name.
  224. </xsd:documentation>
  225. </xsd:annotation>
  226. <xsd:selector xpath="javaee:servlet/javaee:security-role-ref"/>
  227. <xsd:field xpath="javaee:role-link"/>
  228. </xsd:keyref>
  229. </xsd:element>
  230. </xsd:schema>