david_williams | 70c04f2 | 2010-02-10 02:14:51 +0000 | [diff] [blame] | 1 | <?xml version = "1.0" encoding = "UTF-8"?> |
| 2 | |
| 3 | |
| 4 | |
| 5 | <xsd:schema |
| 6 | targetNamespace="http://java.sun.com/xml/ns/javaee" |
| 7 | xmlns:javaee="http://java.sun.com/xml/ns/javaee" |
| 8 | xmlns:xsd="http://www.w3.org/2001/XMLSchema" |
| 9 | xmlns:xml="http://www.w3.org/XML/1998/namespace" |
| 10 | elementFormDefault="qualified" |
| 11 | attributeFormDefault="unqualified" |
| 12 | version="2.0"> |
| 13 | |
| 14 | <xsd:annotation> |
| 15 | <xsd:documentation> |
| 16 | |
| 17 | DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. |
| 18 | |
| 19 | Copyright 2003-2009 Sun Microsystems, Inc. All rights reserved. |
| 20 | |
| 21 | The contents of this file are subject to the terms of either the |
| 22 | GNU General Public License Version 2 only ("GPL") or the Common |
| 23 | Development and Distribution License("CDDL") (collectively, the |
| 24 | "License"). You may not use this file except in compliance with |
| 25 | the License. You can obtain a copy of the License at |
| 26 | https://glassfish.dev.java.net/public/CDDL+GPL.html or |
| 27 | glassfish/bootstrap/legal/LICENSE.txt. See the License for the |
| 28 | specific language governing permissions and limitations under the |
| 29 | License. |
| 30 | |
| 31 | When distributing the software, include this License Header |
| 32 | Notice in each file and include the License file at |
| 33 | glassfish/bootstrap/legal/LICENSE.txt. Sun designates this |
| 34 | particular file as subject to the "Classpath" exception as |
| 35 | provided by Sun in the GPL Version 2 section of the License file |
| 36 | that accompanied this code. If applicable, add the following |
| 37 | below the License Header, with the fields enclosed by brackets [] |
| 38 | replaced by your own identifying information: |
| 39 | "Portions Copyrighted [year] [name of copyright owner]" |
| 40 | |
| 41 | Contributor(s): |
| 42 | |
| 43 | If you wish your version of this file to be governed by only the |
| 44 | CDDL or only the GPL Version 2, indicate your decision by adding |
| 45 | "[Contributor] elects to include this software in this |
| 46 | distribution under the [CDDL or GPL Version 2] license." If you |
| 47 | don't indicate a single choice of license, a recipient has the |
| 48 | option to distribute your version of this file under either the |
| 49 | CDDL, the GPL Version 2 or to extend the choice of license to its |
| 50 | licensees as provided above. However, if you add GPL Version 2 |
| 51 | code and therefore, elected the GPL Version 2 license, then the |
| 52 | option applies only if the new code is made subject to such |
| 53 | option by the copyright holder. |
| 54 | |
| 55 | The Eclipse Foundation elects to include this software in this |
| 56 | distribution under the CDDL license. |
| 57 | |
| 58 | </xsd:documentation> |
| 59 | </xsd:annotation> |
| 60 | |
| 61 | <xsd:annotation> |
| 62 | <xsd:documentation> |
| 63 | |
| 64 | <![CDATA[ |
| 65 | |
| 66 | The XML Schema for a JavaServer Faces UIComponent (Version 2.0). |
| 67 | |
| 68 | The elements in this schema may be used in an XHTML page for |
| 69 | a composite component, by pulling in the composite namespace: |
| 70 | |
| 71 | <html xmlns="http://www.w3.org/1999/xhtml" |
| 72 | xmlns:composite="http://java.sun.com/jsf/composite"> |
| 73 | |
| 74 | <composite:interface> |
| 75 | <composite:attribute name="foo" default="bar" /> |
| 76 | </composite:/interface> |
| 77 | <!-- the rest omitted --> |
| 78 | </html> |
| 79 | |
| 80 | The elements in this schema may also be used in a facelet taglibrary |
| 81 | file in the same manner: |
| 82 | |
| 83 | <facelet-taglib xmlns="http://java.sun.com/xml/ns/javaee" |
| 84 | xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
| 85 | xmlns:composite="http://java.sun.com/jsf/composite" |
| 86 | xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facelettaglibary_2_0.xsd" |
| 87 | version="2.0"> |
| 88 | <namespace>http://domain.com/test_schema</namespace> |
| 89 | <tag> |
| 90 | <tag-name>testSchema</tag-name> |
| 91 | <component> |
| 92 | <component-type>javax.faces.Input</component-type> |
| 93 | <renderer-type>javax.faces.Text</renderer-type> |
| 94 | <handler-class>com.sun.faces.facelets.tag.jsf.ComponentHandler</handler-class> |
| 95 | <component-extension> |
| 96 | |
| 97 | <composite:attribute name="foo" default="bar" /> |
| 98 | |
| 99 | </component-extension> |
| 100 | </component> |
| 101 | </tag> |
| 102 | </facelet-taglib> |
| 103 | |
| 104 | The instance documents may indicate the published |
| 105 | version of the schema using xsi:schemaLocation attribute |
| 106 | for javaee namespace with the following location: |
| 107 | |
| 108 | http://java.sun.com/xml/ns/javaee/web-facesuicomponent_2_0.xsd |
| 109 | |
| 110 | ]]> |
| 111 | |
| 112 | </xsd:documentation> |
| 113 | </xsd:annotation> |
| 114 | |
| 115 | <xsd:include schemaLocation="javaee_5.xsd"/> |
| 116 | |
| 117 | <!-- **************************************************** --> |
| 118 | |
| 119 | <xsd:element name = "attribute" type="javaee:uicomponent-attributeType"> |
| 120 | </xsd:element> |
| 121 | |
| 122 | <!-- **************************************************** --> |
| 123 | |
| 124 | <xsd:complexType name="uicomponent-attributeType"> |
| 125 | <xsd:annotation> |
| 126 | <xsd:documentation> |
| 127 | |
| 128 | The "attribute" element declares an attribute of this |
| 129 | ui component. |
| 130 | |
| 131 | </xsd:documentation> |
| 132 | </xsd:annotation> |
| 133 | |
| 134 | <xsd:choice minOccurs="0" maxOccurs="unbounded"> |
| 135 | <xsd:element name="attribute" |
| 136 | type="javaee:uicomponent-attributeType"/> |
| 137 | </xsd:choice> |
| 138 | |
| 139 | <xsd:attribute name="name" |
| 140 | type="xsd:string" |
| 141 | use="required"/> |
| 142 | |
| 143 | <xsd:attribute name="displayName" |
| 144 | type="xsd:string" |
| 145 | use="optional"/> |
| 146 | |
| 147 | <xsd:attribute name="shortDescription" |
| 148 | type="xsd:string" |
| 149 | use="optional"/> |
| 150 | |
| 151 | <xsd:attribute name="default" |
| 152 | type="xsd:string" |
| 153 | use="optional"/> |
| 154 | |
| 155 | <xsd:attribute name="method-signature" |
| 156 | type="xsd:string" |
| 157 | use="optional"> |
| 158 | |
| 159 | <xsd:annotation> |
| 160 | <xsd:documentation> |
| 161 | <![CDATA[ |
| 162 | |
| 163 | Provides the signature of the Java method. The syntax of |
| 164 | the method-signature element is as follows (taken from |
| 165 | function-signature in web-jsptaglibrary_2_1.xsd): |
| 166 | |
| 167 | MethodSignature ::= ReturnType S MethodName S? |
| 168 | '(' S? Parameters? S? ')' |
| 169 | |
| 170 | ReturnType ::= Type |
| 171 | |
| 172 | MethodName ::= Identifier |
| 173 | |
| 174 | Parameters ::= Parameter |
| 175 | | ( Parameter S? ',' S? Parameters ) |
| 176 | |
| 177 | Parameter ::= Type |
| 178 | |
| 179 | Where: |
| 180 | |
| 181 | * Type is a basic type or a fully qualified |
| 182 | Java class name (including package name), |
| 183 | as per the 'Type' production in the Java |
| 184 | Language Specification, Second Edition, |
| 185 | Chapter 18. |
| 186 | |
| 187 | * Identifier is a Java identifier, as per |
| 188 | the 'Identifier' production in the Java |
| 189 | Language Specification, Second |
| 190 | Edition, Chapter 18. |
| 191 | |
| 192 | Example: |
| 193 | |
| 194 | java.lang.String nickName( java.lang.String, int ) |
| 195 | |
| 196 | ]]> |
| 197 | </xsd:documentation> |
| 198 | </xsd:annotation> |
| 199 | |
| 200 | </xsd:attribute> |
| 201 | |
| 202 | <xsd:attribute name="applyTo" |
| 203 | type="xsd:string" |
| 204 | use="optional"/> |
| 205 | |
| 206 | <xsd:attribute name="required" |
| 207 | type="xsd:boolean" |
| 208 | use="optional"/> |
| 209 | |
| 210 | <xsd:attribute name="preferred" |
| 211 | type="xsd:boolean" |
| 212 | use="optional"/> |
| 213 | |
| 214 | <xsd:attribute name="expert" |
| 215 | type="xsd:boolean" |
| 216 | use="optional"/> |
| 217 | |
| 218 | |
| 219 | </xsd:complexType> |
| 220 | |
| 221 | <!-- **************************************************** --> |
| 222 | |
| 223 | </xsd:schema> |