Author: nbelaevski
Date: 2009-11-10 13:04:00 -0500 (Tue, 10 Nov 2009)
New Revision: 15860
Added:
root/cdk/trunk/plugins/generator/src/main/resources/META-INF/schema/faces-composite.xsd
Modified:
root/cdk/trunk/plugins/generator/src/main/resources/META-INF/schema/cdk-template.xsd
Log:
Latest updates for CDK schema check-in
Modified:
root/cdk/trunk/plugins/generator/src/main/resources/META-INF/schema/cdk-template.xsd
===================================================================
---
root/cdk/trunk/plugins/generator/src/main/resources/META-INF/schema/cdk-template.xsd 2009-11-10
12:50:05 UTC (rev 15859)
+++
root/cdk/trunk/plugins/generator/src/main/resources/META-INF/schema/cdk-template.xsd 2009-11-10
18:04:00 UTC (rev 15860)
@@ -4,11 +4,12 @@
elementFormDefault="qualified" attributeFormDefault="qualified"
xmlns:xhtml="http://richfaces.org/xhtml-el"
xmlns:javaee="http://java.sun.com/xml/ns/javaee"
- >
- <xs:import schemaLocation="web-facesuicomponent_2_0.xsd"
namespace="http://java.sun.com/xml/ns/javaee"/><!--
- <xs:include schemaLocation="xhtml-el.xsd"/>
+
xmlns:cc="http://java.sun.com/jsf/composite">
+
+ <xs:import schemaLocation="web-facesuicomponent_2_0.xsd"
namespace="http://java.sun.com/xml/ns/javaee"/>
+ <xs:import schemaLocation="faces-composite.xsd"
namespace="http://java.sun.com/jsf/composite"/>
- --><xs:simpleType name="elStrictExpression">
+ <xs:simpleType name="elStrictExpression">
<xs:restriction base="xs:string">
<xs:pattern value="#\{[^\}]+\}" />
</xs:restriction>
@@ -33,16 +34,27 @@
</xs:attributeGroup>
<xs:element name="root">
- <xs:complexType mixed="true">
- <xs:choice>
- <xs:any minOccurs="0" maxOccurs="unbounded" />
- </xs:choice>
- <xs:attribute name="class" type="xs:string"
form="unqualified" use="required" />
- <xs:attribute name="superclass" type="xs:string"
form="unqualified"/>
- <xs:attribute name="componentclass" type="xs:string"
form="unqualified" use="required" />
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element ref="cc:interface" />
+ <xs:element ref="cc:implementation" />
+ </xs:sequence>
</xs:complexType>
</xs:element>
+ <xs:element name="metadata">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" name="class"
type="javaee:fully-qualified-classType"
default="javax.faces.render.Renderer" />
+ <xs:element minOccurs="0" name="base-class"
type="javaee:fully-qualified-classType" />
+ <xs:element minOccurs="0" name="component-class"
type="javaee:fully-qualified-classType"
default="javax.faces.component.UIComponent" />
+ <xs:element minOccurs="0" name="render-kit-id" />
+ <xs:element minOccurs="0" name="component-family" />
+ <xs:element minOccurs="0" name="renderer-type" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+
<xs:group name="structural">
<xs:choice>
<xs:element name="body">
Added:
root/cdk/trunk/plugins/generator/src/main/resources/META-INF/schema/faces-composite.xsd
===================================================================
---
root/cdk/trunk/plugins/generator/src/main/resources/META-INF/schema/faces-composite.xsd
(rev 0)
+++
root/cdk/trunk/plugins/generator/src/main/resources/META-INF/schema/faces-composite.xsd 2009-11-10
18:04:00 UTC (rev 15860)
@@ -0,0 +1,249 @@
+<?xml version = "1.0" encoding = "UTF-8"?>
+
+<xs:schema
targetNamespace="http://java.sun.com/jsf/composite"
+
xmlns:cc="http://java.sun.com/jsf/composite"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
+
xmlns:xml="http://www.w3.org/XML/1998/namespace"
elementFormDefault="qualified"
+ attributeFormDefault="unqualified">
+
+ <xs:attributeGroup name="beanDescriptorAttributes">
+ <xs:attribute name="displayName">
+ <xs:annotation>
+ <xs:documentation>
+ The name to display in a tool palette containing
+ this component. The
+ value of this attribute will be set as the value
+ for this property
+ on the composite component bean descriptor.
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ <xs:attribute name="preferred" type="xs:boolean">
+ <xs:annotation>
+ <xs:documentation>Is this a "preferred" component. The value of this
+ attribute will be set as the value for this property on the
+ composite component bean descriptor.</xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ <xs:attribute name="expert" type="xs:boolean">
+ <xs:annotation>
+ <xs:documentation>Is this component only for expert users? The value
+ of this attribute will be set as the value for this property on the
+ composite component bean descriptor.</xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ <xs:attribute name="shortDescription">
+ <xs:annotation>
+ <xs:documentation>
+ A short description of the purpose of this
+ component. The value of
+ this attribute will be set as the value for
+ this property on the
+ composite component bean descriptor.
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ </xs:attributeGroup>
+
+ <xs:complexType name="attributeExtensionType">
+ <xs:sequence minOccurs="0" maxOccurs="unbounded">
+ <xs:choice>
+ <xs:element ref="cc:attribute" />
+ <xs:element ref="cc:extension" />
+ <xs:any processContents="lax" namespace="##other" />
+ </xs:choice>
+ </xs:sequence>
+ <xs:attribute name="name" use="required">
+ <xs:annotation>
+ <xs:documentation>
+ The name of the attribute as it must appear on the
+ composite component
+ tag in the using page. If the value of the name
+ attribute is equal
+ to (without the quotes) "action",
+ "actionListener", "validator", or
+ "valueChangeListener", the action
+ described in
+ ViewHandler.retargetMethodExpressions() must be taken
+ to handle the
+ attribute. In these cases, the method-sigature
+ attribute, if
+ present, must be ignored as its value is derived as
+ described in
+ retargetMethodExpressions().
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ <xs:attribute name="targets" use="required">
+ <xs:annotation>
+ <xs:documentation>
+ If this element has a method-signature attribute, the value of the
+ targets attribute must be interpreted as a space (not tab)
+ separated list of client ids (relative to the top level component)
+ of components within the
+ <composite:implementation> section. Space is used as the delimiter
+ for compatibility with the IDREFS and NMTOKENS data types from the
+ XML Schema. Each entry in the list must be interpreted as the id
+ of an inner component to which the MethodExpression from the
+ composite component tag in the using page must be applied. If this
+ element has a method-signature attribute, but no targets
+ attribute, the value of the name attribute is used as the single
+ entry in the list. If the value of the name attribute is not one
+ of the special values listed in the description of the name
+ attribute, targets (or its derived value) need not correspond to
+ the id of an inner component.
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ <xs:attribute name="default">
+ <xs:annotation>
+ <xs:documentation>
+ If this attribute is not required, and a value is
+ not supplied by the
+ page author, use this as the default value.
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ <xs:attribute name="required" type="xs:boolean">
+ <xs:annotation>
+ <xs:documentation>
+ True if the page author must supply a value for
+ this attribute.
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ <xs:attribute name="method-signature">
+ <xs:annotation>
+ <xs:documentation>
+ Declares that this attribute must be a
+ MethodExpression whose method
+ signature is described by the value of
+ this attribute. The
+ signature must be described using fully
+ qualified class names
+ wherever a type is required. This attribute is
+ mutually exclusive
+ with the "type" attribute. If both attributes are
+ present, the
+ "method-signature" attribute is ignored.
+
+ PENDING: when
+ this file is generated from the web-facesuicomponent_2_0.xsd,
+ we
+ will not need to copy the content here manually.
+
+ Provides the
+ signature of the Java method. The syntax of the
+ method-signature
+ element is as follows (taken from
+ function-signature in
+ web-jsptaglibrary_2_1.xsd):
+
+ MethodSignature ::= ReturnType S
+ MethodName S? '(' S? Parameters? S? ')'
+
+ ReturnType ::= Type
+
+ MethodName ::= Identifier
+
+ Parameters ::= Parameter | ( Parameter S?
+ ',' S? Parameters )
+
+ Parameter ::= Type
+
+ Where:
+
+ Type is a basic type or
+ a fully qualified Java class name (including
+ package name), as per
+ the 'Type' production in the Java Language
+ Specification, Second
+ Edition, Chapter 18.
+
+ Identifier is a Java identifier, as per the
+ 'Identifier' production in the
+ Java Language Specification, Second
+ Edition, Chapter 18.
+
+ Example:
+
+ java.lang.String nickName(
+ java.lang.String, int )
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ <xs:attribute name="type">
+ <xs:annotation>
+ <xs:documentation>
+ <xs:annotation name="type">
+ </xs:annotation>
+ Declares that this attribute must be a ValueExpression whose
+ expected type
+ is given by the value of this attribute. If not
+ specified, and no
+ "method-signature" attribute is present,
+ java.lang.Object is
+ assumed. This attribute is mutually exclusive
+ with the "type"
+ attribute. If both attributes are present, the
+ "method-signature"
+ attribute is ignored.
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ <xs:attributeGroup ref="cc:beanDescriptorAttributes" />
+ </xs:complexType>
+
+ <xs:complexType name="compositeExtensionType">
+ <xs:sequence minOccurs="0" maxOccurs="unbounded">
+ <xs:any processContents="lax" />
+ </xs:sequence>
+ </xs:complexType>
+
+ <xs:complexType name="compositeInterfaceType">
+ <xs:sequence minOccurs="0" maxOccurs="unbounded">
+ <xs:choice>
+ <xs:element ref="cc:extension" />
+ <xs:element ref="cc:attribute" />
+ </xs:choice>
+ </xs:sequence>
+ <xs:attribute type="xs:string" name="name">
+ <xs:annotation>
+ <xs:documentation>
+ The name of this composite component. Advisory
+ only. The real name is
+ taken from the filename. The value of this
+ attribute will be set as
+ the value for this property on the
+ composite component bean
+ descriptor.
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ <xs:attribute type="xs:string" name="componentType">
+ <xs:annotation>
+ <xs:documentation>
+ The component-type of the UIComponent that will
+ serve as the composite
+ component root for this composite component.
+ The declared
+ component-family for this component must be
+ javax.faces.NamingContainer.
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ <xs:attributeGroup ref="cc:beanDescriptorAttributes" />
+ </xs:complexType>
+
+ <xs:complexType name="compositeImplementationType"
+ mixed="true">
+ <xs:choice>
+ <xs:any minOccurs="0" maxOccurs="unbounded"
processContents="lax" />
+ </xs:choice>
+ </xs:complexType>
+
+ <xs:element name="interface" type="cc:compositeInterfaceType"
/>
+ <xs:element name="implementation"
type="cc:compositeImplementationType" />
+ <xs:element name="extension" type="cc:compositeExtensionType"
/>
+ <xs:element name="attribute" type="cc:attributeExtensionType"
/>
+
+</xs:schema>