JBoss Rich Faces SVN: r15125 - in branches/community/3.3.X/docs: faq/en/src/main/docbook/module and 4 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: smukhina
Date: 2009-08-06 13:26:35 -0400 (Thu, 06 Aug 2009)
New Revision: 15125
Modified:
branches/community/3.3.X/docs/cdkguide/en/src/main/docbook/master.xml
branches/community/3.3.X/docs/faq/en/src/main/docbook/module/RFCfaq.xml
branches/community/3.3.X/docs/migrationguide/en/src/main/docbook/master.xml
branches/community/3.3.X/docs/photo_album_app_guide/en/src/main/docbook/master.xml
branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/ajaxListener.xml
branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/calendar.xml
branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/changeExpandListener.xml
branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/dragListener.xml
branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/dropListener.xml
branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/nodeSelectListener.xml
branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/scrollableDataTable.xml
branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/tree.xml
branches/community/3.3.X/docs/userguide/en/src/main/docbook/master.xml
Log:
https://jira.jboss.org/jira/browse/RF-7641 links are updated for all guides
Modified: branches/community/3.3.X/docs/cdkguide/en/src/main/docbook/master.xml
===================================================================
--- branches/community/3.3.X/docs/cdkguide/en/src/main/docbook/master.xml 2009-08-06 17:00:45 UTC (rev 15124)
+++ branches/community/3.3.X/docs/cdkguide/en/src/main/docbook/master.xml 2009-08-06 17:26:35 UTC (rev 15125)
@@ -51,9 +51,9 @@
<!ENTITY migrationguide "../../migrationguide/html_single/index.html">
<!ENTITY photoalbumguide "../../realworld/html_single/index.html">
<!ENTITY realworld "../../realworld/html_single/index.html">
-<!ENTITY tlddoc "../../tlddoc/html_single/index.html">
-<!ENTITY apidoc "../../apidoc/html_single/index.html">
-<!ENTITY apidoc_framework "../../apidoc_framework/html_single/index.html">
+<!ENTITY tlddoc "../../tlddoc/index.html">
+<!ENTITY apidoc "../../apidoc/index.html">
+<!ENTITY apidoc_framework "../../apidoc_framework/index.html"
]>
Modified: branches/community/3.3.X/docs/faq/en/src/main/docbook/module/RFCfaq.xml
===================================================================
--- branches/community/3.3.X/docs/faq/en/src/main/docbook/module/RFCfaq.xml 2009-08-06 17:00:45 UTC (rev 15124)
+++ branches/community/3.3.X/docs/faq/en/src/main/docbook/module/RFCfaq.xml 2009-08-06 17:26:35 UTC (rev 15125)
@@ -2662,7 +2662,7 @@
...]]></programlisting>
<para>
For the detailed description see
- the <ulink url="http://www.jboss.org/file-access/default/members/jbossrichfaces/freezone/...">Request Errors and Session Expiration Handling</ulink> section of the Developer Guide.
+ the <ulink url="&devguide;/#RequestErrorsAndSessionExpirationHandling">Request Errors and Session Expiration Handling</ulink> section of the Developer Guide.
</para>
</listitem>
</itemizedlist>
Modified: branches/community/3.3.X/docs/migrationguide/en/src/main/docbook/master.xml
===================================================================
--- branches/community/3.3.X/docs/migrationguide/en/src/main/docbook/master.xml 2009-08-06 17:00:45 UTC (rev 15124)
+++ branches/community/3.3.X/docs/migrationguide/en/src/main/docbook/master.xml 2009-08-06 17:26:35 UTC (rev 15125)
@@ -32,9 +32,9 @@
<!ENTITY migrationguide "../../migrationguide/html_single/index.html">
<!ENTITY photoalbumguide "../../realworld/html_single/index.html">
<!ENTITY realworld "../../realworld/html_single/index.html">
- <!ENTITY tlddoc "../../tlddoc/html_single/index.html">
- <!ENTITY apidoc "../../apidoc/html_single/index.html">
- <!ENTITY apidoc_framework "../../apidoc_framework/html_single/index.html
+ <!ENTITY tlddoc "../../tlddoc/index.html">
+ <!ENTITY apidoc "../../apidoc/index.html">
+ <!ENTITY apidoc_framework "../../apidoc_framework/index.html"
]>
<book>
Modified: branches/community/3.3.X/docs/photo_album_app_guide/en/src/main/docbook/master.xml
===================================================================
--- branches/community/3.3.X/docs/photo_album_app_guide/en/src/main/docbook/master.xml 2009-08-06 17:00:45 UTC (rev 15124)
+++ branches/community/3.3.X/docs/photo_album_app_guide/en/src/main/docbook/master.xml 2009-08-06 17:26:35 UTC (rev 15125)
@@ -28,9 +28,9 @@
<!ENTITY migrationguide "../../migrationguide/html_single/index.html">
<!ENTITY photoalbumguide "../../realworld/html_single/index.html">
<!ENTITY realworld "../../realworld/html_single/index.html">
- <!ENTITY tlddoc "../../tlddoc/html_single/index.html">
- <!ENTITY apidoc "../../apidoc/html_single/index.html">
- <!ENTITY apidoc_framework "../../apidoc_framework/html_single/index.html">
+ <!ENTITY tlddoc "../../tlddoc/index.html">
+ <!ENTITY apidoc "../../apidoc/index.html">
+ <!ENTITY apidoc_framework "../../apidoc_framework/index.html">
]>
@@ -76,7 +76,7 @@
<!--<abstract>
<title/>
<para>
- <ulink url="http://www.jboss.org/file-access/default/members/jbossrichfaces/freezone/...">PDF version</ulink>
+ <ulink url="../../migrationguide/pdf/richfaces_migration_guide.pdf">PDF version</ulink>
</para>
</abstract> -->
Modified: branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/ajaxListener.xml
===================================================================
--- branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/ajaxListener.xml 2009-08-06 17:00:45 UTC (rev 15124)
+++ branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/ajaxListener.xml 2009-08-06 17:26:35 UTC (rev 15125)
@@ -87,7 +87,7 @@
<para>
The <emphasis><property>"type"</property></emphasis> attribute defines the fully qualified Java class name for the listener.
- This Java class implements <code><ulink url="http://www.jboss.org/file-access/default/members/jbossrichfaces/freezone/..."><property>org.ajax4jsf.event.AjaxListener</property></ulink></code>interface, which is base interface for all listeners, capable for receiving Ajax events.
+ This Java class implements <code><ulink url="&apidoc_framework;/org/ajax4jsf/event/AjaxListener.html"><property>org.ajax4jsf.event.AjaxListener</property></ulink></code>interface, which is base interface for all listeners, capable for receiving Ajax events.
The source of the event could be accessed using the <code><ulink url="http://java.sun.com/j2se/1.4.2/docs/api/java/util/EventObject.html"><property>java.util.EventObject.getSource()</property></ulink></code> call.
</para>
Modified: branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/calendar.xml
===================================================================
--- branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/calendar.xml 2009-08-06 17:00:45 UTC (rev 15124)
+++ branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/calendar.xml 2009-08-06 17:26:35 UTC (rev 15125)
@@ -96,7 +96,7 @@
<listitem>
<para>
<code>ajax</code> — in this mode the <emphasis role="bold"><property><rich:calendar></property></emphasis> requests portions of data for element rendering from special Data Model.
- The default calendar Data Model could be redefined with the help of <emphasis><property>dataModel</property></emphasis> attribute that points to the object that implements <code><ulink url="http://www.jboss.org/file-access/default/members/jbossrichfaces/freezone/...">CalendarDataModel</ulink></code> interface.
+ The default calendar Data Model could be redefined with the help of <emphasis><property>dataModel</property></emphasis> attribute that points to the object that implements <code><ulink url="&apidoc_framework;/org/richfaces/model/CalendarDataModel.html">CalendarDataModel</ulink></code> interface.
If <emphasis><property>"dataModel"</property></emphasis> attribute has <emphasis><property>"null"</property></emphasis> value, data requests are not sent.
In this case the "<code>ajax</code>" mode is equal to the "<code>client</code>".
</para>
@@ -581,7 +581,7 @@
<code>RICH_CALENDAR_CANCEL_LABEL </code> there. </para>
<para>You could also pack <code>org.richfaces.renderkit.calendar</code>
<ulink
- url="http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..."
+ url="&apidoc;/org/richfaces/renderkit/CalendarRendererBase.html#CALENDAR_BUNDLE"
>resource</ulink> bundle with your JARs defining the same
properties. </para>
<note>
Modified: branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/changeExpandListener.xml
===================================================================
--- branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/changeExpandListener.xml 2009-08-06 17:00:45 UTC (rev 15124)
+++ branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/changeExpandListener.xml 2009-08-06 17:26:35 UTC (rev 15125)
@@ -75,7 +75,7 @@
</para>
<para>
Attribute <emphasis><property>"type"</property></emphasis> defines the fully qualified Java class name for the listener.
- This class should implement <ulink url="http://www.jboss.org/file-access/default/members/jbossrichfaces/freezone/..."><code>org.richfaces.event.NodeExpandedListener</code></ulink>interface.
+ This class should implement <ulink url="&apidoc_framework;/org/richfaces/event/TreeListenerEventsProducer.html#addChangeExpandListener(org.richfaces.event.NodeExpandedListener)"><code>org.richfaces.event.NodeExpandedListener</code></ulink>interface.
</para>
<para>
Modified: branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/dragListener.xml
===================================================================
--- branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/dragListener.xml 2009-08-06 17:00:45 UTC (rev 15124)
+++ branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/dragListener.xml 2009-08-06 17:26:35 UTC (rev 15125)
@@ -104,7 +104,7 @@
This class should implement
<ulink
- url="http://www.jboss.org/file-access/default/members/jbossrichfaces/freezone/...">
+ url="&apidoc_framework;/org/richfaces/event/DropListener.html">
<code>org.richfaces.event.DropListener</code>
</ulink>
interface.
Modified: branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/dropListener.xml
===================================================================
--- branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/dropListener.xml 2009-08-06 17:00:45 UTC (rev 15124)
+++ branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/dropListener.xml 2009-08-06 17:26:35 UTC (rev 15125)
@@ -103,7 +103,7 @@
defines the fully qualified Java class name for the
listener. This class should implement
<ulink
- url="http://www.jboss.org/file-access/default/members/jbossrichfaces/freezone/...">
+ url="&apidoc_framework;/org/richfaces/event/DropListener.html">
<code>org.richfaces.event.DropListener</code>
</ulink>
interface.
Modified: branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/nodeSelectListener.xml
===================================================================
--- branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/nodeSelectListener.xml 2009-08-06 17:00:45 UTC (rev 15124)
+++ branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/nodeSelectListener.xml 2009-08-06 17:26:35 UTC (rev 15125)
@@ -76,7 +76,7 @@
</para>
<para>
Attribute <emphasis><property>"type"</property></emphasis> defines the fully qualified Java class name for listener.
- This class should implement <ulink url="http://www.jboss.org/file-access/default/members/jbossrichfaces/freezone/..."> <code>org.richfaces.event.NodeSelectedListener</code></ulink>.
+ This class should implement <ulink url="&apidoc_framework;/org/richfaces/event/NodeSelectedListener.html"> <code>org.richfaces.event.NodeSelectedListener</code></ulink>.
interface</para>
<para>
Modified: branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/scrollableDataTable.xml
===================================================================
--- branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/scrollableDataTable.xml 2009-08-06 17:00:45 UTC (rev 15124)
+++ branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/scrollableDataTable.xml 2009-08-06 17:26:35 UTC (rev 15125)
@@ -150,7 +150,7 @@
<property>one and multi-selection rows mode</property>.</para>
<para>This attribute is a reference to object to the instance of
- <ulink url="http://www.jboss.org/file-access/default/members/jbossrichfaces/freezone/..."> <code>org.richfaces.model.selection.Selection</code></ulink>.
+ <ulink url="&apidoc_framework;/org/richfaces/model/selection/Selection.html"> <code>org.richfaces.model.selection.Selection</code></ulink>.
interface
Modified: branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/tree.xml
===================================================================
--- branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/tree.xml 2009-08-06 17:00:45 UTC (rev 15124)
+++ branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/tree.xml 2009-08-06 17:26:35 UTC (rev 15125)
@@ -105,7 +105,7 @@
<property><rich:tree></property>
</emphasis> component interacts with data model via
<code>"TreeNode"</code> interface (<ulink
- url="http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..."
+ url="&apidoc_framework;/org/richfaces/model/TreeNode.html"
> org.richfaces.model.TreeNode </ulink>) that is used for
the <emphasis role="bold">
<property><rich:tree></property>
@@ -114,7 +114,7 @@
<code>"TreeNode"</code> interface or use a
default one, which is defined with a default class
<code>"TreeNodeImpl"</code> (<ulink
- url="http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..."
+ url="&apidoc_framework;/org/richfaces/model/TreeNodeImpl.html"
> org.richfaces.model.TreeNodeImpl </ulink>). </para>
<para> The <emphasis>
<property>"value"</property>
@@ -186,11 +186,11 @@
approach implies using a
<code>"XmlTreeDataBuilder"</code> class
(<ulink
- url="http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..."
+ url="&apidoc;/org/richfaces/component/xml/XmlTreeDataBuilder.html"
> org.richfaces.component.xml.XmlTreeDataBuilder </ulink>)
that allows to transform XML into structures of objects containing
<code>"XmlNodeData"</code> (<ulink
- url="http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..."
+ url="&apidoc_framework;/org/richfaces/component/xml/XmlNodeData.html"
> org.richfaces.component.xml.XmlNodeData </ulink>)
instances as data, which could be represented by the <emphasis
role="bold">
Modified: branches/community/3.3.X/docs/userguide/en/src/main/docbook/master.xml
===================================================================
--- branches/community/3.3.X/docs/userguide/en/src/main/docbook/master.xml 2009-08-06 17:00:45 UTC (rev 15124)
+++ branches/community/3.3.X/docs/userguide/en/src/main/docbook/master.xml 2009-08-06 17:26:35 UTC (rev 15125)
@@ -128,13 +128,13 @@
<!ENTITY rich_jQuery SYSTEM "../../../target/generated/rich_jQuery.xml">
<!ENTITY cdkguide "../../cdkguide/html_single/index.html">
- <!ENTITY devguide "../../devguide//html_single/index.html">
+ <!ENTITY devguide "../../devguide/html_single/index.html">
<!ENTITY migrationguide "../../migrationguide/html_single/index.html">
<!ENTITY photoalbumguide "../../realworld/html_single/index.html">
<!ENTITY realworld "../../realworld/html_single/index.html">
- <!ENTITY tlddoc "../../tlddoc/html_single/index.html">
- <!ENTITY apidoc "../../apidoc/html_single/index.html">
- <!ENTITY apidoc_framework "../../apidoc_framework/html_single/index.html">
+ <!ENTITY tlddoc "../../tlddoc/index.html">
+ <!ENTITY apidoc "../../apidoc/index.html">
+ <!ENTITY apidoc_framework "../../apidoc_framework/index.html">
]>
<book>
@@ -163,7 +163,7 @@
</para>
</abstract>
<!--citebiblioid>
-<ulink url="http://www.jboss.org/file-access/default/members/jbossrichfaces/freezone/...">PDF version</ulink>.
+<ulink url="../../devguide/en/pdf/richfaces-usersguide.pdf">PDF version</ulink>.
</citebiblioid-->
</bookinfo>
15 years, 5 months
JBoss Rich Faces SVN: r15124 - root/framework/trunk/impl/src/main/java/org/ajax4jsf/config.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2009-08-06 13:00:45 -0400 (Thu, 06 Aug 2009)
New Revision: 15124
Modified:
root/framework/trunk/impl/src/main/java/org/ajax4jsf/config/FrameworkConfiguration.java
Log:
fix el resolve
Modified: root/framework/trunk/impl/src/main/java/org/ajax4jsf/config/FrameworkConfiguration.java
===================================================================
--- root/framework/trunk/impl/src/main/java/org/ajax4jsf/config/FrameworkConfiguration.java 2009-08-06 16:51:20 UTC (rev 15123)
+++ root/framework/trunk/impl/src/main/java/org/ajax4jsf/config/FrameworkConfiguration.java 2009-08-06 17:00:45 UTC (rev 15124)
@@ -8,13 +8,13 @@
import javax.el.ValueExpression;
import javax.faces.context.ExternalContext;
import javax.faces.context.FacesContext;
-import javax.servlet.ServletContext;
import org.ajax4jsf.util.ELUtils;
import org.richfaces.util.RichfacesLogger;
import org.slf4j.Logger;
+
/**
* @author Anton Belevich
* @since 4.0
@@ -26,27 +26,15 @@
private static final Logger logger = RichfacesLogger.CONFIG.getLogger();
-
- private Map<BooleanInitParam, Boolean> booleanInitParams = new EnumMap<BooleanInitParam, Boolean>(BooleanInitParam.class);
-
private Map<InitParam, String> initParams = new EnumMap<InitParam, String>(InitParam.class);
-
- private Map<NumberInitParam, Integer> numberInitParams = new EnumMap<NumberInitParam, Integer>(NumberInitParam.class);
- ServletContext servletContext;
-
- private static final Pattern ALLOWABLE_BOOLEANS = Pattern.compile("true|false");
+ private static final Pattern ALLOWABLE_BOOLEANS = Pattern.compile("true|false");
- private static final Pattern ALLOWABLE_NUMBER = Pattern.compile("[0-9]");
+ private static final Pattern ALLOWABLE_NUMBER = Pattern.compile("[0-9]");
-
- private FrameworkConfiguration(ServletContext servletContext) {
-
- this.servletContext = servletContext;
-
- processInitParams(servletContext);
- processBooleanInitParams(servletContext);
- processNumberParams(servletContext);
+
+ private FrameworkConfiguration(ExternalContext externalContext) {
+ processInitParams(externalContext);
}
public static FrameworkConfiguration getInstance() {
@@ -55,162 +43,72 @@
}
- public static FrameworkConfiguration getInstance(ExternalContext extContext) {
- //TODO create instance of FrameworkConfiguration
- return null;
-
+ public static FrameworkConfiguration getInstance(ExternalContext externalContext) {
+ return new FrameworkConfiguration(externalContext);
}
- private boolean isBooleanValueValid(BooleanInitParam param, String value) {
+ private boolean isBooleanValue(InitParam param, String value) {
return !ALLOWABLE_BOOLEANS.matcher(value).matches();
}
- private boolean isNumberValueValid(NumberInitParam param, String value) {
+ private boolean isNumberValue(InitParam param, String value) {
return !ALLOWABLE_NUMBER.matcher(value).matches();
}
- public String getOptionValue(InitParam param) {
- return initParams.get(param);
+ public int getOptionNumber(InitParam param) {
+ int intValue = -1;
+ String value = getOptionValue(param);
+ if(isNumberValue(param, value)) {
+ if(ELUtils.isValueReference(value)) {
+ intValue = ((Integer)resolveELParam(FacesContext.getCurrentInstance(), value, java.lang.Integer.class)).intValue();
+ } else {
+ intValue = Integer.parseInt(value);
+ }
+ } else {
+ logger.error("option value is not Integer number");
+ }
+ return intValue;
}
- public int getOptionValue(NumberInitParam param) {
- return ((Integer)numberInitParams.get(param)).intValue();
+ public boolean isOptionEnabled(InitParam param) {
+ boolean isEnabled = false;
+ String value = getOptionValue(param);
+ if(isBooleanValue(param, value)) {
+ if(ELUtils.isValueReference(value)) {
+ isEnabled = ((Boolean)resolveELParam(FacesContext.getCurrentInstance(), value, java.lang.Boolean.class)).booleanValue();
+ } else {
+ isEnabled = Boolean.parseBoolean(value);
+ }
+ } else {
+ logger.error("option value is not boolean value");
+ }
+ return isEnabled;
}
- public boolean isOptionEnabled(BooleanInitParam param) {
- return ((Boolean)booleanInitParams.get(param)).booleanValue();
+ public String getOptionValue(InitParam param) {
+ return initParams.get(param);
}
-
-
- private void processBooleanInitParams(ServletContext servletContext){
- for(BooleanInitParam param: BooleanInitParam.values()) {
-
- String paramName = param.qualifiedName;
- String paramValue = servletContext.getInitParameter(paramName);
- Boolean value = param.getDefaultValue();
-
- if(paramValue != null) {
-
- if(isBooleanValueValid(param, paramValue)) {
- value = Boolean.parseBoolean(paramValue);
- } else if(ELUtils.isValueReference(paramValue)) {
- value = (Boolean)resolveELParam(FacesContext.getCurrentInstance(), paramValue, java.lang.Boolean.class);
- } else {
- //TODO: add log about default value
- }
- }
-
- booleanInitParams.put(param, value);
- }
- }
-
- private void processInitParams(ServletContext context){
+
+ private void processInitParams(ExternalContext externalContext){
for(InitParam param: InitParam.values()) {
-
String paramName = param.qualifiedName;
- String paramValue = servletContext.getInitParameter(paramName);
+ String paramValue = externalContext.getInitParameter(paramName);
String value = param.getDefaultValue();
-
- if(paramValue != null) {
- if(ELUtils.isValueReference(paramValue)) {
- value = (String)resolveELParam(FacesContext.getCurrentInstance(), value, java.lang.String.class);
- } else {
- value = paramValue;
- }
+
+ if (paramValue != null) {
+ value = paramValue;
}
initParams.put(param, value);
}
}
-
- private void processNumberParams(ServletContext servletContext){
- for(NumberInitParam param: NumberInitParam.values()) {
-
- String paramName = param.qualifiedName;
- String paramValue = servletContext.getInitParameter(paramName);
- Integer value = Integer.valueOf(param.getDefaultValue());
-
- if(paramValue != null) {
- if(ELUtils.isValueReference(paramValue)) {
- value = (Integer)resolveELParam(FacesContext.getCurrentInstance(), paramValue, java.lang.Integer.class);
- } else if(isNumberValueValid(param, paramValue)){
- value = Integer.parseInt(paramValue);
- } else {
- //TODO log
- }
- }
-
- numberInitParams.put(param, value);
- }
- }
private Object resolveELParam(FacesContext context, String value, Class <?> expectedClass) {
ExpressionFactory factory = context.getApplication().getExpressionFactory();
ValueExpression valueExpression = factory.createValueExpression(value, expectedClass);
return valueExpression.getValue(context.getELContext());
}
-
- public enum NumberInitParam {
-
- DEFAULT_EXPIRE (
- "org.ajax4jsf.DEFAULT_EXPIRE",
- 86400
- );
-
- private String qualifiedName;
- private int defaultValue;
-
- NumberInitParam(String qualifiedName, int defaultValue) {
- this.qualifiedName = qualifiedName;
- this.defaultValue = defaultValue;
- }
-
- public int getDefaultValue() {
- return defaultValue;
- }
-
- public String getQualifiedName() {
- return qualifiedName;
- }
- }
-
- public enum BooleanInitParam {
-
- ENCRYPT_RESOURCE_DATA(
- "org.ajax4jsf.ENCRYPT_RESOURCE_DATA",
- false
- ),
-
- COMPRESS_SCRIPT(
- "org.ajax4jsf.COMPRESS_SCRIPT",
- true
- ),
-
- SERIALIZE_SERVER_STATE(
- "org.ajax4jsf.SERIALIZE_SERVER_STATE",
- false
- );
-
-
- private String qualifiedName;
- private boolean defaultValue;
-
- BooleanInitParam(String qualifiedName, boolean defaultValue) {
- this.qualifiedName = qualifiedName;
- this.defaultValue = defaultValue;
- }
-
- public boolean getDefaultValue() {
- return defaultValue;
- }
-
- public String getQualifiedName() {
- return qualifiedName;
- }
-
- }
-
public enum InitParam {
SKIN (
@@ -256,9 +154,29 @@
SESSION_RESOURCE_URI_PREFIX(
"org.ajax4jsf.SESSION_RESOURCE_URI_PREFIX",
"a4j/s"
- );
+ ),
+ ENCRYPT_RESOURCE_DATA(
+ "org.ajax4jsf.ENCRYPT_RESOURCE_DATA",
+ "false"
+ ),
+ COMPRESS_SCRIPT(
+ "org.ajax4jsf.COMPRESS_SCRIPT",
+ "true"
+ ),
+
+ SERIALIZE_SERVER_STATE(
+ "org.ajax4jsf.SERIALIZE_SERVER_STATE",
+ "false"
+ ),
+
+
+ DEFAULT_EXPIRE (
+ "org.ajax4jsf.DEFAULT_EXPIRE",
+ "86400"
+ );
+
private String qualifiedName;
private String defaultValue;
15 years, 5 months
JBoss Rich Faces SVN: r15123 - branches/community/3.3.X/docs/userguide/en/src/main/docbook/included.
by richfaces-svn-commits@lists.jboss.org
Author: artdaw
Date: 2009-08-06 12:51:20 -0400 (Thu, 06 Aug 2009)
New Revision: 15123
Modified:
branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/fileUpload.xml
Log:
https://jira.jboss.org/jira/browse/RF-7641 - links were fixed
Modified: branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/fileUpload.xml
===================================================================
--- branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/fileUpload.xml 2009-08-06 14:14:14 UTC (rev 15122)
+++ branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/fileUpload.xml 2009-08-06 16:51:20 UTC (rev 15123)
@@ -558,12 +558,12 @@
>On RichFaces LiveDemo page </ulink> you can see how to configure filter for this framework in web.xml file
in order to handle <emphasis role="bold">
<property><rich:fileUpload></property>
- </emphasis> requests. </para>
+ </emphasis> requests. </para-->
<para>To make <property><rich:fileUpload></property> component work properly
with MyFaces extensions, the order in which filters are defined and mapped in web.xml,
is important. See <ulink
- url="http://www.jboss.org/file-access/default/members/jbossrichfaces/freezone/..."
- >corresponding FAQ chapter</ulink>. </para-->
+ url="http://www.jboss.org/community/docs/DOC-13537"
+ >corresponding FAQ chapter</ulink>. </para>
</section>
<!-- JavaScript API-->
15 years, 5 months
JBoss Rich Faces SVN: r15122 - in branches/community/3.3.X/docs/userguide/en/src/main/docbook: modules and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: artdaw
Date: 2009-08-06 10:14:14 -0400 (Thu, 06 Aug 2009)
New Revision: 15122
Modified:
branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/fileUpload.xml
branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/modalPanel.xml
branches/community/3.3.X/docs/userguide/en/src/main/docbook/modules/RFCarchitectover.xml
Log:
https://jira.jboss.org/jira/browse/RF-7641 - links were fixed
Modified: branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/fileUpload.xml
===================================================================
--- branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/fileUpload.xml 2009-08-06 14:10:53 UTC (rev 15121)
+++ branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/fileUpload.xml 2009-08-06 14:14:14 UTC (rev 15122)
@@ -551,7 +551,7 @@
- <para> The <emphasis role="bold">
+ <!--para> The <emphasis role="bold">
<property><rich:fileUpload></property>
</emphasis> component could work together with Seam framework. <ulink
url="http://www.jboss.org/file-access/default/members/jbossrichfaces/freezone/..."
@@ -563,7 +563,7 @@
with MyFaces extensions, the order in which filters are defined and mapped in web.xml,
is important. See <ulink
url="http://www.jboss.org/file-access/default/members/jbossrichfaces/freezone/..."
- >corresponding FAQ chapter</ulink>. </para>
+ >corresponding FAQ chapter</ulink>. </para-->
</section>
<!-- JavaScript API-->
Modified: branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/modalPanel.xml
===================================================================
--- branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/modalPanel.xml 2009-08-06 14:10:53 UTC (rev 15121)
+++ branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/modalPanel.xml 2009-08-06 14:14:14 UTC (rev 15122)
@@ -857,7 +857,7 @@
<property><rich:modalPanel></property>
</emphasis> component (the same could also be
found in the "<ulink
- url="http://www.jboss.org/file-access/default/members/jbossrichfaces/freezone/..."
+ url="http://www.jboss.org/community/wiki/PanelsandOutput#Organizewizards"
> How to organize wizards using the
<rich:modalPanel>
component?</ulink>" chapter of RichFaces
Modified: branches/community/3.3.X/docs/userguide/en/src/main/docbook/modules/RFCarchitectover.xml
===================================================================
--- branches/community/3.3.X/docs/userguide/en/src/main/docbook/modules/RFCarchitectover.xml 2009-08-06 14:10:53 UTC (rev 15121)
+++ branches/community/3.3.X/docs/userguide/en/src/main/docbook/modules/RFCarchitectover.xml 2009-08-06 14:14:14 UTC (rev 15122)
@@ -137,14 +137,13 @@
</itemizedlist>
<para> For more information about framework and libraries loading see the following section
in the <ulink
- url="http://www.jboss.org/file-access/default/members/jbossrichfaces/freezone/..."
- >FAQ</ulink>. </para>
+ url="http://www.jboss.org/community/wiki/Commonclientside#resourcesfromjars">FAQ</ulink>. </para>
<note>
<title>Note:</title>
<para> In order to prevent JavaScript versions conflict you should use only one version
of the framework or library. You could find more information about libraries
exclusion in the <ulink
- url="http://www.jboss.org/file-access/default/members/jbossrichfaces/freezone/..."
+ url="http://www.jboss.org/community/wiki/Commonclientside#jsconflicts"
>FAQ</ulink>. </para>
</note>
</section>
15 years, 5 months
JBoss Rich Faces SVN: r15121 - branches/community/3.3.X/samples/richfaces-demo/src/main/java/org/richfaces/demo/extendeddatamodel.
by richfaces-svn-commits@lists.jboss.org
Author: konstantin.mishin
Date: 2009-08-06 10:10:53 -0400 (Thu, 06 Aug 2009)
New Revision: 15121
Modified:
branches/community/3.3.X/samples/richfaces-demo/src/main/java/org/richfaces/demo/extendeddatamodel/AuctionDataModel.java
Log:
RF-7665
Modified: branches/community/3.3.X/samples/richfaces-demo/src/main/java/org/richfaces/demo/extendeddatamodel/AuctionDataModel.java
===================================================================
--- branches/community/3.3.X/samples/richfaces-demo/src/main/java/org/richfaces/demo/extendeddatamodel/AuctionDataModel.java 2009-08-06 12:11:40 UTC (rev 15120)
+++ branches/community/3.3.X/samples/richfaces-demo/src/main/java/org/richfaces/demo/extendeddatamodel/AuctionDataModel.java 2009-08-06 14:10:53 UTC (rev 15121)
@@ -62,7 +62,7 @@
int firstRow = ((SequenceRange)range).getFirstRow();
int numberOfRows = ((SequenceRange)range).getRows();
wrappedKeys = new ArrayList<Integer>();
- for (AuctionItem item:dataProvider.getItemsByrange(new Integer(firstRow), numberOfRows, null, true)) {
+ for (AuctionItem item:getDataProvider().getItemsByrange(new Integer(firstRow), numberOfRows, null, true)) {
wrappedKeys.add(item.getPk());
wrappedData.put(item.getPk(), item);
visitor.process(context, item.getPk(), argument);
15 years, 5 months
JBoss Rich Faces SVN: r15120 - branches/community/3.3.X/docs/userguide/en/src/main/docbook/included.
by richfaces-svn-commits@lists.jboss.org
Author: ochikvina
Date: 2009-08-06 08:11:40 -0400 (Thu, 06 Aug 2009)
New Revision: 15120
Modified:
branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/datascroller.xml
Log:
https://jira.jboss.org/jira/browse/RF-7590 - performing minor corrections;
Modified: branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/datascroller.xml
===================================================================
--- branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/datascroller.xml 2009-08-06 01:35:36 UTC (rev 15119)
+++ branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/datascroller.xml 2009-08-06 12:11:40 UTC (rev 15120)
@@ -217,7 +217,7 @@
<property><rich:datascroller></property>
</emphasis> page links the input field rerenders and current page
number changes. </para>
- <para> This is a result: </para>
+ <para>The result should be like below: </para>
<figure>
<title>The <emphasis>
<property>"page"</property>
@@ -622,7 +622,7 @@
<row>
<entry>rich-dtascroller-table</entry>
<entry>Defines styles for a wrapper
- table element of a
+ <table> element of a
datascroller</entry>
</row>
<row>
@@ -763,7 +763,7 @@
<property><rich:dataTable></property>
</emphasis> and <emphasis role="bold">
<property><rich:datascroller></property>
- </emphasis> in a context of Extended Data Model see on the<ulink
+ </emphasis> in a context of Extended Data Model see on the <ulink
url="http://www.jboss.com/index.html?module=bb&op=viewtopic&t=115636"
>RichFaces Users Forum</ulink>.</para>
</section>
15 years, 5 months
JBoss Rich Faces SVN: r15119 - in root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk: model and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: alexsmirnov
Date: 2009-08-05 21:35:36 -0400 (Wed, 05 Aug 2009)
New Revision: 15119
Added:
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/LibraryVisitor.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/package-info.java
Modified:
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/LibraryBuilder.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/Behavior.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/Component.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/Converter.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/JsfComponent.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/Listener.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/Renderer.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/Validator.java
Log:
Visitor pattern methods added.
Modified: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/LibraryBuilder.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/LibraryBuilder.java 2009-08-06 00:41:54 UTC (rev 15118)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/LibraryBuilder.java 2009-08-06 01:35:36 UTC (rev 15119)
@@ -98,7 +98,7 @@
* <p class="changed_added_4_0">Builder method that creates new library instance.</p>
* @return
*/
- protected ComponentLibrary createLibrary(){
+ public ComponentLibrary createLibrary(){
return new ComponentLibrary(getContext().getBaseName());
}
Modified: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/Behavior.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/Behavior.java 2009-08-06 00:41:54 UTC (rev 15118)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/Behavior.java 2009-08-06 01:35:36 UTC (rev 15119)
@@ -32,6 +32,11 @@
private JsfType type;
+ @Override
+ public <R, P> R accept(LibraryVisitor<R, P> visitor, P param) {
+ return visitor.visit(this, param);
+ }
+
/* (non-Javadoc)
* @see org.richfaces.cdk.model.JsfComponent#getType()
*/
Modified: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/Component.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/Component.java 2009-08-06 00:41:54 UTC (rev 15118)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/Component.java 2009-08-06 01:35:36 UTC (rev 15119)
@@ -76,6 +76,11 @@
this.type = type;
}
+ @Override
+ public <R, P> R accept(LibraryVisitor<R, P> visitor, P param) {
+ return visitor.visit(this, param);
+ }
+
/* (non-Javadoc)
* @see org.richfaces.cdk.model.JsfComponent#getType()
*/
Modified: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/Converter.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/Converter.java 2009-08-06 00:41:54 UTC (rev 15118)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/Converter.java 2009-08-06 01:35:36 UTC (rev 15119)
@@ -32,6 +32,11 @@
private JsfType type;
+ @Override
+ public <R, P> R accept(LibraryVisitor<R, P> visitor, P param) {
+ return visitor.visit(this, param);
+ }
+
/* (non-Javadoc)
* @see org.richfaces.cdk.model.JsfComponent#getType()
*/
Modified: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/JsfComponent.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/JsfComponent.java 2009-08-06 00:41:54 UTC (rev 15118)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/JsfComponent.java 2009-08-06 01:35:36 UTC (rev 15119)
@@ -10,5 +10,16 @@
* @return the type of JSF object.
*/
public JsfType getType();
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @param <R>
+ * @param <P>
+ * @param visitor
+ * @param param
+ * @return
+ */
+ public <R,P> R accept(LibraryVisitor<R,P> visitor,
+ P param);
}
\ No newline at end of file
Added: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/LibraryVisitor.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/LibraryVisitor.java (rev 0)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/LibraryVisitor.java 2009-08-06 01:35:36 UTC (rev 15119)
@@ -0,0 +1,43 @@
+/*
+ * $Id$
+ *
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.richfaces.cdk.model;
+
+/**
+ * <p class="changed_added_4_0"></p>
+ * @author asmirnov(a)exadel.com
+ *
+ * @param <R> return type
+ * @param <P> optional parameter type.
+ */
+public interface LibraryVisitor<R,P> {
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @param c
+ * @param param
+ * @return
+ */
+ public R visit(JsfComponent c, P param);
+
+}
Property changes on: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/LibraryVisitor.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/Listener.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/Listener.java 2009-08-06 00:41:54 UTC (rev 15118)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/Listener.java 2009-08-06 01:35:36 UTC (rev 15119)
@@ -32,6 +32,11 @@
private JsfType type;
+ @Override
+ public <R, P> R accept(LibraryVisitor<R, P> visitor, P param) {
+ return visitor.visit(this, param);
+ }
+
/* (non-Javadoc)
* @see org.richfaces.cdk.model.JsfComponent#getType()
*/
Modified: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/Renderer.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/Renderer.java 2009-08-06 00:41:54 UTC (rev 15118)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/Renderer.java 2009-08-06 01:35:36 UTC (rev 15119)
@@ -32,6 +32,10 @@
private JsfType type;
+ @Override
+ public <R, P> R accept(LibraryVisitor<R, P> visitor, P param) {
+ return visitor.visit(this, param);
+ }
/* (non-Javadoc)
* @see org.richfaces.cdk.model.JsfComponent#getType()
*/
Modified: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/Validator.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/Validator.java 2009-08-06 00:41:54 UTC (rev 15118)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/Validator.java 2009-08-06 01:35:36 UTC (rev 15119)
@@ -32,6 +32,11 @@
private JsfType type;
+ @Override
+ public <R, P> R accept(LibraryVisitor<R, P> visitor, P param) {
+ return visitor.visit(this, param);
+ }
+
/* (non-Javadoc)
* @see org.richfaces.cdk.model.JsfComponent#getType()
*/
Added: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/package-info.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/package-info.java (rev 0)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/package-info.java 2009-08-06 01:35:36 UTC (rev 15119)
@@ -0,0 +1,17 @@
+/**
+ * <h2>CDK library model classes used by all generation tasks.</h2>
+ * <p>CDK architecture seems like MVC-pattern implementation. The controller {@link org.richfaces.cdk.LibraryBuilder} class
+ * generates model from different sources ( Java Annotations, XML files and so on ). That model will be used to generate all necessary
+ * classes by the appropriate "renderers" that act as 'View' part of pattern.</p>
+ * <p>That model:</p>
+ * <ul>
+ * <li>Contains all information about JSF library components and their properties</li>
+ * <li>Encapsulates restrictions and references for model components, therefore it should be modified by model metods only.</li>
+ * <li>Encapsulates <a href="http://www.jboss.org/community/docs/DOC-13693">CDK naming conventions</a></li>
+ * <li>Provides 'Visitor' pattern methods. see {@link LibraryVisitor} for reference.</li>
+ * </ul>
+ *
+ */
+package org.richfaces.cdk.model;
+
+
Property changes on: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/package-info.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
15 years, 5 months
JBoss Rich Faces SVN: r15118 - in root/cdk/trunk/plugins/generator/src: main/java/org/richfaces/cdk/apt and 5 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: alexsmirnov
Date: 2009-08-05 20:41:54 -0400 (Wed, 05 Aug 2009)
New Revision: 15118
Added:
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/ClassDescription.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/JsfType.java
root/cdk/trunk/plugins/generator/src/test/resources/org/richfaces/cdk/test/
root/cdk/trunk/plugins/generator/src/test/resources/org/richfaces/cdk/test/component/
Removed:
root/cdk/trunk/plugins/generator/src/test/resources/org/richfaces/cdk/annotations/
Modified:
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/AbstractCdkContext.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/CdkContext.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/LibraryBuilder.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/apt/CdkCompiler.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/apt/ComponentProcessor.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/Behavior.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/Component.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/ComponentLibrary.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/Converter.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/JsfComponent.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/Listener.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/Property.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/Renderer.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/TagLibrary.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/Validator.java
root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/apt/ProcessorTest.java
root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/apt/VirtualFileManagerTest.java
root/cdk/trunk/plugins/generator/src/test/resources/org/richfaces/cdk/test/component/AbstractTestComponent.java
Log:
Develop annotation processor
Modified: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/AbstractCdkContext.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/AbstractCdkContext.java 2009-08-05 19:47:36 UTC (rev 15117)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/AbstractCdkContext.java 2009-08-06 00:41:54 UTC (rev 15118)
@@ -43,7 +43,7 @@
private File resourceOutput;
- private ComponentLibrary library;
+ private String baseName;
/**
* <p class="changed_added_4_0"></p>
@@ -96,24 +96,6 @@
this.resourceOutput = resourceOutput;
}
- /**
- * <p class="changed_added_4_0"></p>
- * @return the library
- */
- @Override
- public ComponentLibrary getLibrary() {
- return library;
- }
-
- /**
- * <p class="changed_added_4_0"></p>
- * @param library the library to set
- */
- @Override
- public void setLibrary(ComponentLibrary library) {
- this.library = library;
- }
-
public AbstractCdkContext(ClassLoader loader) {
this.loader = loader;
// TODO Auto-generated constructor stub
@@ -126,4 +108,18 @@
return loader;
}
+ @Override
+ public String getBaseName() {
+ return this.baseName;
+ }
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @param baseName the baseName to set
+ */
+ public void setBaseName(String baseName) {
+ this.baseName = baseName;
+ }
+
+
}
Modified: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/CdkContext.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/CdkContext.java 2009-08-05 19:47:36 UTC (rev 15117)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/CdkContext.java 2009-08-06 00:41:54 UTC (rev 15118)
@@ -17,14 +17,12 @@
*/
public ClassLoader getLoader();
- public abstract void setLibrary(ComponentLibrary library);
-
- public abstract ComponentLibrary getLibrary();
-
public abstract File getResourceOutput();
public abstract File getJavaSourceOutput();
public abstract File getJavaSource();
+
+ public String getBaseName();
}
\ No newline at end of file
Modified: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/LibraryBuilder.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/LibraryBuilder.java 2009-08-05 19:47:36 UTC (rev 15117)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/LibraryBuilder.java 2009-08-06 00:41:54 UTC (rev 15118)
@@ -64,15 +64,12 @@
* @param sources
* @throws CdkException
*/
- public void buildModelFromAnnotations(Iterable<File> sources) throws CdkException {
+ public ComponentLibrary buildModelFromAnnotations(Iterable<File> sources) throws CdkException {
CdkCompiler compiler = CdkCompiler.create(getContext());
- ComponentLibrary componentLibrary = getContext().getLibrary();
- if (null == componentLibrary) {
- componentLibrary = createLibrary();
- getContext().setLibrary(componentLibrary);
- }
- compiler.process(sources, new ComponentProcessor(getContext()));
- // TODO - check and fix library consittence.
+ ComponentLibrary library = createLibrary();
+ ComponentProcessor componentProcessor = new ComponentProcessor(getContext(),library);
+ compiler.process(sources, componentProcessor);
+ return library;
}
/**
@@ -90,13 +87,6 @@
* @throws CdkException
*/
public void applyFacesConfigToModel(Iterable<File> configs) throws CdkException {
- ComponentLibrary componentLibrary = getContext().getLibrary();
- // Read faces-config.xml and build a new model.
- buildModelFromFacesConfig(configs);
- if(null != componentLibrary){
- componentLibrary.apply(getContext().getLibrary());
- getContext().setLibrary(componentLibrary);
- }
}
public void buildModelFromFacesConfig(Iterable<File> configs) throws CdkException {
@@ -109,7 +99,7 @@
* @return
*/
protected ComponentLibrary createLibrary(){
- return new ComponentLibrary();
+ return new ComponentLibrary(getContext().getBaseName());
}
/**
Modified: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/apt/CdkCompiler.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/apt/CdkCompiler.java 2009-08-05 19:47:36 UTC (rev 15117)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/apt/CdkCompiler.java 2009-08-06 00:41:54 UTC (rev 15118)
@@ -99,15 +99,35 @@
log.info("Compiler classpath:" + classPathOption);
}
+ if(null != context.getJavaSource()){
+ options.add("-sourcepath");
+ options.add(context.getJavaSource().getAbsolutePath());
+ }
+ if(null != context.getJavaSourceOutput() || null != context.getResourceOutput()){
+ options.add("-s");
+ StringBuilder generatedSourceFolders = new StringBuilder();
+ if(null != context.getJavaSourceOutput()){
+ generatedSourceFolders.append(context.getJavaSourceOutput().getAbsolutePath());
+ }
+ if(null != context.getResourceOutput()){
+ if(generatedSourceFolders.length()>0){
+ generatedSourceFolders.append(File.pathSeparatorChar);
+ }
+ generatedSourceFolders.append(context.getResourceOutput().getAbsolutePath());
+ }
+ options.add(generatedSourceFolders.toString());
+ }
compiler.setOptions(options);
+ // TODO - provide source files locale.
+ compiler.setLocale(Locale.getDefault());
+ // TODO -set locale and charset for platform-independent processing. Provide own diagnostics listener.
StandardJavaFileManager stdFileManager = javaCompiler
.getStandardFileManager(null, null, null);
+ // TODO - use standard file manager for all tasks.
VirtualFileManager fileManager = new VirtualFileManager(stdFileManager,
context.getLoader());
fileManager.setJavaSourceDirectory(context.getJavaSource());
compiler.setFileManager(fileManager);
- // TODO - provide source files locale.
- compiler.setLocale(Locale.getDefault());
return compiler;
}
@@ -144,7 +164,7 @@
*
* @return the options
*/
- public Iterable<String> getOptions() {
+ protected Iterable<String> getOptions() {
return options;
}
@@ -155,7 +175,7 @@
* @param options
* the options to set
*/
- public void setOptions(Iterable<String> options) {
+ protected void setOptions(Iterable<String> options) {
this.options = options;
}
@@ -189,7 +209,7 @@
*
* @return the javaCompiler
*/
- public JavaCompiler getJavaCompiler() {
+ protected JavaCompiler getJavaCompiler() {
return javaCompiler;
}
Modified: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/apt/ComponentProcessor.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/apt/ComponentProcessor.java 2009-08-05 19:47:36 UTC (rev 15117)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/apt/ComponentProcessor.java 2009-08-06 00:41:54 UTC (rev 15118)
@@ -25,6 +25,7 @@
import java.util.Set;
+import javax.annotation.processing.ProcessingEnvironment;
import javax.annotation.processing.RoundEnvironment;
import javax.annotation.processing.SupportedAnnotationTypes;
import javax.lang.model.element.Element;
@@ -32,6 +33,7 @@
import org.richfaces.cdk.CdkContext;
import org.richfaces.cdk.annotations.Component;
+import org.richfaces.cdk.model.ComponentLibrary;
/**
* <p class="changed_added_4_0"></p>
@@ -40,13 +42,16 @@
*/
@SupportedAnnotationTypes(Component.NAME)
public class ComponentProcessor extends CdkProcessor {
+
+ private final ComponentLibrary library;
/**
* <p class="changed_added_4_0"></p>
* @param context
*/
- public ComponentProcessor(CdkContext context) {
+ public ComponentProcessor(CdkContext context,ComponentLibrary library) {
super(context);
+ this.library = library;
}
/* (non-Javadoc)
@@ -68,4 +73,8 @@
return false;
}
+ public ComponentLibrary getLibrary() {
+ return library;
+ }
+
}
Modified: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/Behavior.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/Behavior.java 2009-08-05 19:47:36 UTC (rev 15117)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/Behavior.java 2009-08-06 00:41:54 UTC (rev 15118)
@@ -30,13 +30,21 @@
*/
public class Behavior implements JsfComponent {
+ private JsfType type;
+
/* (non-Javadoc)
* @see org.richfaces.cdk.model.JsfComponent#getType()
*/
- @Override
- public String getType() {
- // TODO Auto-generated method stub
- return null;
+ public JsfType getType() {
+ return type;
}
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @param type the type to set
+ */
+ public void setType(JsfType type) {
+ this.type = type;
+ }
+
}
Added: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/ClassDescription.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/ClassDescription.java (rev 0)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/ClassDescription.java 2009-08-06 00:41:54 UTC (rev 15118)
@@ -0,0 +1,88 @@
+/*
+ * $Id$
+ *
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.richfaces.cdk.model;
+
+/**
+ * <p class="changed_added_4_0">Tthat class represents information about Jsf object class.</p>
+ * @author asmirnov(a)exadel.com
+ *
+ */
+public class ClassDescription {
+
+ private final String name;
+
+ private boolean exists;
+
+ private ClassDescription superClass;
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @param name
+ */
+ public ClassDescription(String name) {
+ this.name = name;
+ }
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @return the exists
+ */
+ public boolean isExists() {
+ return exists;
+ }
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @param exists the exists to set
+ */
+ public void setExists(boolean exists) {
+ this.exists = exists;
+ }
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @return the superClass
+ */
+ public ClassDescription getSuperClass() {
+ return superClass;
+ }
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @param superClass the superClass to set
+ */
+ public void setSuperClass(ClassDescription superClass) {
+ this.superClass = superClass;
+ }
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @return the name
+ */
+ public String getName() {
+ return name;
+ }
+
+
+}
Property changes on: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/ClassDescription.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/Component.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/Component.java 2009-08-05 19:47:36 UTC (rev 15117)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/Component.java 2009-08-06 00:41:54 UTC (rev 15118)
@@ -1,18 +1,25 @@
package org.richfaces.cdk.model;
+import java.util.Collection;
+import java.util.Collections;
import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import com.google.common.collect.Maps;
+import com.google.common.collect.Sets;
+
/**
* That class represents JSF component in the CDK.
* @author asmirnov(a)exadel.com
*
*/
-public class Component implements JsfComponent {
+public final class Component implements JsfComponent {
/**
* <p class="changed_added_4_0">Component type</p>
*/
- private String type;
+ private final Type type;
/**
* <p class="changed_added_4_0">component family</p>
@@ -22,12 +29,8 @@
/**
* <p class="changed_added_4_0">Cenerated component class</p>
*/
- private String className;
+ private ClassDescription componentClass;
- /**
- * <p class="changed_added_4_0">Base class for generated component</p>
- */
- private String superClass;
/**
* <p class="changed_added_4_0">Long description for documentation</p>
@@ -47,12 +50,8 @@
/**
* <p class="changed_added_4_0">Component attributes</p>
*/
- private List<Property> attributes;
+ private final Map<String,Property> attributes = Maps.newHashMap();
- /**
- * <p class="changed_added_4_0">VDL tag. This is bidirectional one to one relation.</p>
- */
- private Tag tag;
/**
* <p class="changed_added_4_0">Application level events fired by the component</p>
@@ -62,26 +61,133 @@
/**
* <p class="changed_added_4_0">Renderer for the final component. This is bidirectional one to one relation.</p>
*/
- private Attribute renderer;
+ private List<Renderer> renderers;
/**
* <p class="changed_added_4_0">Facets recognised by the component</p>
*/
private List<Facet> facets;
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @param type the type to set
+ */
+ Component(Type type) {
+ this.type = type;
+ }
+
/* (non-Javadoc)
* @see org.richfaces.cdk.model.JsfComponent#getType()
*/
- public String getType() {
+ public JsfType getType() {
return type;
}
/**
* <p class="changed_added_4_0"></p>
- * @param type the type to set
+ * @return the family
*/
- public void setType(String type) {
- this.type = type;
+ public String getFamily() {
+ return family;
}
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @param family the family to set
+ */
+ public void setFamily(String family) {
+ this.family = family;
+ }
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @return the componentClass
+ */
+ public ClassDescription getComponentClass() {
+ return componentClass;
+ }
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @param componentClass the componentClass to set
+ */
+ public void setComponentClass(ClassDescription componentClass) {
+ this.componentClass = componentClass;
+ }
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @return the description
+ */
+ public String getDescription() {
+ return description;
+ }
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @param description the description to set
+ */
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @return the displayname
+ */
+ public String getDisplayname() {
+ return displayname;
+ }
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @param displayname the displayname to set
+ */
+ public void setDisplayname(String displayname) {
+ this.displayname = displayname;
+ }
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @return the icon
+ */
+ public String getIcon() {
+ return icon;
+ }
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @param icon the icon to set
+ */
+ public void setIcon(String icon) {
+ this.icon = icon;
+ }
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @return the attributes
+ */
+ public Collection<Property> getAttributes() {
+ return Collections.unmodifiableCollection(attributes.values());
+ }
+
+ public Property addAtribute(String attributeName) {
+ Property attribute;
+ if(attributes.containsKey(attributeName)){
+ attribute = attributes.get(attributeName);
+ } else {
+ attribute = new Property(attributeName);
+ attributes.put(attributeName, attribute);
+ }
+ return attribute;
+ }
+
+ public static class Type extends JsfType {
+
+ public Type(String type) {
+ super(type);
+ }
+
+ }
}
Modified: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/ComponentLibrary.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/ComponentLibrary.java 2009-08-05 19:47:36 UTC (rev 15117)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/ComponentLibrary.java 2009-08-06 00:41:54 UTC (rev 15118)
@@ -24,39 +24,63 @@
package org.richfaces.cdk.model;
import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
import java.util.List;
+import java.util.Map;
+import com.google.common.collect.Maps;
+
/**
* <p class="changed_added_4_0">That class contains model of all JSF components asscoiated with that project</p>
+ * <p>To keep consistence of library references, only library methods are allowed to components manipulations.</p>
* @author asmirnov(a)exadel.com
*
*/
public class ComponentLibrary {
+
/**
* <p class="changed_added_4_0">JSF components in that library</p>
*/
- private List<Component> components = new ArrayList<Component>();
+ private final Map<Component.Type,Component> components = Maps.newHashMap();
+ private final Collection<Component> componentsSet = Collections.unmodifiableCollection(components.values());
+
/**
* <p class="changed_added_4_0">JSF renderer associated with that library</p>
*/
- private List<Renderer> renderers = new ArrayList<Renderer>();
+ private final List<Renderer> renderers = new ArrayList<Renderer>();
- private List<Converter> converters = new ArrayList<Converter>();
+ private final List<Converter> converters = new ArrayList<Converter>();
- private List<Validator> validators = new ArrayList<Validator>();
+ private final List<Validator> validators = new ArrayList<Validator>();
- private List<Behavior> behaviors = new ArrayList<Behavior>();
+ private final List<Behavior> behaviors = new ArrayList<Behavior>();
- private List<Listener> listeners = new ArrayList<Listener>();
+ private final List<Listener> listeners = new ArrayList<Listener>();
/**
* <p class="changed_added_4_0">Tag library with references of all used tags</p>
*/
- private TagLibrary tagLibrary;
+ private final TagLibrary tagLibrary;
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ */
+ private final String baseName;
+
+
/**
+ * <p class="changed_added_4_0"></p>
+ * @param baseName
+ */
+ public ComponentLibrary(String baseName) {
+ this.baseName = baseName;
+ this.tagLibrary = new TagLibrary(baseName);
+ }
+ /**
* <p class="changed_added_4_0">Merge component library model with other.</p>
* @param otherLibrary
*/
@@ -68,15 +92,30 @@
* <p class="changed_added_4_0"></p>
* @return the components
*/
- public List<Component> getComponents() {
- return components;
+ public Collection<Component> getComponents() {
+ return componentsSet;
}
+
+
/**
- * <p class="changed_added_4_0"></p>
- * @param components the components to set
+ * <p class="changed_added_4_0">
+ * Lookup for component with given type. If such component did not exist and
+ * parameter {@code create} was set to {@code true} a new instance will be
+ * created
+ * </p>
+ *
+ * @param type
+ * @param create
+ * @return
*/
- public void setComponents(List<Component> components) {
- this.components = components;
+ public Component getComponent(String type, boolean create) {
+ Component.Type componentType = new Component.Type(type);
+ Component component = components.get(componentType);
+ if(null == component && create){
+ component = new Component(componentType);
+ components.put(componentType, component);
+ }
+ return component;
}
/**
* <p class="changed_added_4_0"></p>
@@ -87,13 +126,6 @@
}
/**
* <p class="changed_added_4_0"></p>
- * @param renderers the renderers to set
- */
- public void setRenderers(List<Renderer> renderers) {
- this.renderers = renderers;
- }
- /**
- * <p class="changed_added_4_0"></p>
* @return the converters
*/
public List<Converter> getConverters() {
@@ -101,13 +133,6 @@
}
/**
* <p class="changed_added_4_0"></p>
- * @param converters the converters to set
- */
- public void setConverters(List<Converter> converters) {
- this.converters = converters;
- }
- /**
- * <p class="changed_added_4_0"></p>
* @return the validators
*/
public List<Validator> getValidators() {
@@ -115,13 +140,6 @@
}
/**
* <p class="changed_added_4_0"></p>
- * @param validators the validators to set
- */
- public void setValidators(List<Validator> validators) {
- this.validators = validators;
- }
- /**
- * <p class="changed_added_4_0"></p>
* @return the behaviors
*/
public List<Behavior> getBehaviors() {
@@ -129,15 +147,6 @@
}
/**
* <p class="changed_added_4_0"></p>
- * @param behaviors the behaviors to set
- */
- public void setBehaviors(List<Behavior> behaviors) {
- this.behaviors = behaviors;
- }
-
-
- /**
- * <p class="changed_added_4_0"></p>
* @return the listeners
*/
public List<Listener> getListeners() {
@@ -145,10 +154,11 @@
}
/**
* <p class="changed_added_4_0"></p>
- * @param listeners the listeners to set
+ * @return the tagLibrary
*/
- public void setListeners(List<Listener> listeners) {
- this.listeners = listeners;
+ public TagLibrary getTagLibrary() {
+ return tagLibrary;
}
+
}
Modified: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/Converter.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/Converter.java 2009-08-05 19:47:36 UTC (rev 15117)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/Converter.java 2009-08-06 00:41:54 UTC (rev 15118)
@@ -30,13 +30,21 @@
*/
public class Converter implements JsfComponent {
+ private JsfType type;
+
/* (non-Javadoc)
* @see org.richfaces.cdk.model.JsfComponent#getType()
*/
- @Override
- public String getType() {
- // TODO Auto-generated method stub
- return null;
+ public JsfType getType() {
+ return type;
}
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @param type the type to set
+ */
+ public void setType(JsfType type) {
+ this.type = type;
+ }
+
}
Modified: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/JsfComponent.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/JsfComponent.java 2009-08-05 19:47:36 UTC (rev 15117)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/JsfComponent.java 2009-08-06 00:41:54 UTC (rev 15118)
@@ -9,6 +9,6 @@
*
* @return the type of JSF object.
*/
- public String getType();
+ public JsfType getType();
}
\ No newline at end of file
Added: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/JsfType.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/JsfType.java (rev 0)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/JsfType.java 2009-08-06 00:41:54 UTC (rev 15118)
@@ -0,0 +1,79 @@
+/*
+ * $Id$
+ *
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.richfaces.cdk.model;
+
+/**
+ * <p class="changed_added_4_0">This is a Key class that should be used to find JSF elements in {@link ComponentLibrary}</p>
+ * @author asmirnov(a)exadel.com
+ *
+ */
+public class JsfType {
+
+ private final String type;
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @param type
+ */
+ public JsfType(String type) {
+ this.type = type;
+ }
+
+ @Override
+ public String toString() {
+ return type;
+ }
+ /* (non-Javadoc)
+ * @see java.lang.Object#hashCode()
+ */
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((type == null) ? 0 : type.hashCode());
+ return result;
+ }
+
+ /* (non-Javadoc)
+ * @see java.lang.Object#equals(java.lang.Object)
+ */
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ JsfType other = (JsfType) obj;
+ if (type == null) {
+ if (other.type != null)
+ return false;
+ } else if (!type.equals(other.type))
+ return false;
+ return true;
+ }
+
+
+}
Property changes on: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/JsfType.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/Listener.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/Listener.java 2009-08-05 19:47:36 UTC (rev 15117)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/Listener.java 2009-08-06 00:41:54 UTC (rev 15118)
@@ -30,13 +30,12 @@
*/
public class Listener implements JsfComponent {
- private String type;
+ private JsfType type;
- /**
- * <p class="changed_added_4_0"></p>
- * @return the type
+ /* (non-Javadoc)
+ * @see org.richfaces.cdk.model.JsfComponent#getType()
*/
- public String getType() {
+ public JsfType getType() {
return type;
}
@@ -44,7 +43,7 @@
* <p class="changed_added_4_0"></p>
* @param type the type to set
*/
- public void setType(String type) {
+ public void setType(JsfType type) {
this.type = type;
}
Modified: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/Property.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/Property.java 2009-08-05 19:47:36 UTC (rev 15117)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/Property.java 2009-08-06 00:41:54 UTC (rev 15118)
@@ -31,14 +31,12 @@
/**
* <p class="changed_added_4_0">Bean property name of component attribute</p>
*/
- private String name;
+ private final String name;
+
+ private ClassDescription type;
+
/**
- * <p class="changed_added_4_0">Name of the attribute type class</p>
- */
- private String classname;
-
- /**
* <p class="changed_added_4_0">Attribute description</p>
*/
private String description;
@@ -47,41 +45,26 @@
* <p class="changed_added_4_0">Display name for IDE</p>
*/
private String displayname;
+
/**
* <p class="changed_added_4_0"></p>
- * @return the name
+ * @param name
*/
- public String getName() {
- return name;
- }
-
- /**
- * <p class="changed_added_4_0"></p>
- * @param name the name to set
- */
- public void setName(String name) {
+ public Property(String name) {
this.name = name;
}
/**
* <p class="changed_added_4_0"></p>
- * @return the classname
+ * @return the name
*/
- public String getClassname() {
- return classname;
+ public String getName() {
+ return name;
}
/**
* <p class="changed_added_4_0"></p>
- * @param classname the classname to set
- */
- public void setClassname(String classname) {
- this.classname = classname;
- }
-
- /**
- * <p class="changed_added_4_0"></p>
* @return the description
*/
public String getDescription() {
@@ -112,4 +95,51 @@
this.displayname = displayname;
}
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @return the type
+ */
+ public ClassDescription getType() {
+ return type;
+ }
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @param type the type to set
+ */
+ public void setType(ClassDescription type) {
+ this.type = type;
+ }
+
+ /* (non-Javadoc)
+ * @see java.lang.Object#hashCode()
+ */
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((name == null) ? 0 : name.hashCode());
+ return result;
+ }
+
+ /* (non-Javadoc)
+ * @see java.lang.Object#equals(java.lang.Object)
+ */
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ Property other = (Property) obj;
+ if (name == null) {
+ if (other.name != null)
+ return false;
+ } else if (!name.equals(other.name))
+ return false;
+ return true;
+ }
+
}
Modified: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/Renderer.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/Renderer.java 2009-08-05 19:47:36 UTC (rev 15117)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/Renderer.java 2009-08-06 00:41:54 UTC (rev 15118)
@@ -30,13 +30,21 @@
*/
public class Renderer implements JsfComponent {
+ private JsfType type;
+
/* (non-Javadoc)
* @see org.richfaces.cdk.model.JsfComponent#getType()
*/
- @Override
- public String getType() {
- // TODO Auto-generated method stub
- return null;
+ public JsfType getType() {
+ return type;
}
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @param type the type to set
+ */
+ public void setType(JsfType type) {
+ this.type = type;
+ }
+
}
Modified: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/TagLibrary.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/TagLibrary.java 2009-08-05 19:47:36 UTC (rev 15117)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/TagLibrary.java 2009-08-06 00:41:54 UTC (rev 15118)
@@ -23,6 +23,7 @@
package org.richfaces.cdk.model;
+import java.util.ArrayList;
import java.util.List;
/**
@@ -35,8 +36,14 @@
/**
* <p class="changed_added_4_0">Collection of tags associated with that library</p>
*/
- private List<Tag> tags;
+ private final List<Tag> tags = new ArrayList<Tag>();
+
+ private final String baseName;
+ public TagLibrary(String baseName) {
+ this.baseName = baseName;
+ }
+
/**
* <p class="changed_added_4_0"></p>
* @return the tags
@@ -45,12 +52,5 @@
return tags;
}
- /**
- * <p class="changed_added_4_0"></p>
- * @param tags the tags to set
- */
- public void setTags(List<Tag> tags) {
- this.tags = tags;
- }
}
Modified: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/Validator.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/Validator.java 2009-08-05 19:47:36 UTC (rev 15117)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/Validator.java 2009-08-06 00:41:54 UTC (rev 15118)
@@ -30,13 +30,21 @@
*/
public class Validator implements JsfComponent {
+ private JsfType type;
+
/* (non-Javadoc)
* @see org.richfaces.cdk.model.JsfComponent#getType()
*/
- @Override
- public String getType() {
- // TODO Auto-generated method stub
- return null;
+ public JsfType getType() {
+ return type;
}
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @param type the type to set
+ */
+ public void setType(JsfType type) {
+ this.type = type;
+ }
+
}
Modified: root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/apt/ProcessorTest.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/apt/ProcessorTest.java 2009-08-05 19:47:36 UTC (rev 15117)
+++ root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/apt/ProcessorTest.java 2009-08-06 00:41:54 UTC (rev 15118)
@@ -27,6 +27,9 @@
import static org.easymock.EasyMock.*;
import static org.hamcrest.CoreMatchers.*;
+import static javax.lang.model.util.ElementFilter.*;
+
+
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
@@ -51,8 +54,17 @@
import javax.annotation.processing.SupportedAnnotationTypes;
import javax.annotation.processing.SupportedSourceVersion;
import javax.lang.model.SourceVersion;
+import javax.lang.model.element.AnnotationMirror;
import javax.lang.model.element.Element;
+import javax.lang.model.element.ExecutableElement;
+import javax.lang.model.element.Modifier;
+import javax.lang.model.element.Name;
import javax.lang.model.element.TypeElement;
+import javax.lang.model.element.VariableElement;
+import javax.lang.model.type.TypeMirror;
+import javax.lang.model.util.ElementFilter;
+import javax.lang.model.util.Elements;
+import javax.lang.model.util.Types;
import javax.tools.Diagnostic;
import javax.tools.DiagnosticListener;
import javax.tools.JavaCompiler;
@@ -72,6 +84,10 @@
import org.junit.Test;
import org.richfaces.cdk.CdkContext;
import org.richfaces.cdk.LoggerFactory;
+import org.richfaces.cdk.annotations.Attribute;
+import org.richfaces.cdk.annotations.Component;
+import org.richfaces.cdk.model.ComponentLibrary;
+import org.richfaces.cdk.model.Property;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableSet;
@@ -87,44 +103,79 @@
private static final String ANNOTATION2 = TestAnnotation2.class.getName();
- @SupportedAnnotationTypes("org.richfaces.cdk.apt.TestAnnotation2")
+ @SupportedAnnotationTypes(Component.NAME)
@SupportedSourceVersion(SourceVersion.RELEASE_6)
private final class TestProcessor extends CdkProcessor {
+ ComponentLibrary library;
+
+ private int numOfComponents;
+
public TestProcessor(CdkContext context) {
super(context);
- // TODO Auto-generated constructor stub
}
+
+ @Override
+ public synchronized void init(ProcessingEnvironment processingEnv) {
+ super.init(processingEnv);
+ }
+
+ @Override
+ public synchronized boolean isInitialized() {
+ return super.isInitialized();
+ }
@Override
public boolean process(Set<? extends TypeElement> annotations,
RoundEnvironment environment) {
System.out.println("Run Process at round: "+environment.processingOver());
- for(Element element: environment.getRootElements()){
- System.out.println("Root element: "
- + element.getSimpleName() + " with javadoc:" + processingEnv.getElementUtils().getDocComment(element));
- }
- for (TypeElement typeElement : annotations) {
- System.out.println("Process annotation: "
- + typeElement.getQualifiedName());
- Set<? extends Element> annotatedWith = environment
- .getElementsAnnotatedWith(typeElement);
+ if(!environment.processingOver()){
+ // Get all classes annotated by "component"
+ Set<? extends Element> annotatedWith = environment.getElementsAnnotatedWith(Component.class);
+ numOfComponents = annotatedWith.size();
for (Element element : annotatedWith) {
- System.out.println("annotated element: "
- + element.getSimpleName());
+ Component annotation = element.getAnnotation(Component.class);
+ String type = annotation.type();
+ //TODO - infer type for an empty one. Is thart method for library or for environment ?
+ if(isEmpty(type)){
+
+ }
+ org.richfaces.cdk.model.Component component = library.getComponent(type,true);
+ Elements elementUtils = processingEnv.getElementUtils();
+ Types typeUtils = processingEnv.getTypeUtils();
+ component.setDescription(elementUtils.getDocComment(element));
+ List<ExecutableElement> methodsIn = ElementFilter.methodsIn(elementUtils.getAllMembers((TypeElement) element));
+ for (ExecutableElement method : methodsIn) {
+ Attribute attribute = method.getAnnotation(Attribute.class);
+ if(null != attribute){
+ TypeMirror returnType = method.getReturnType();
+ String methodName = method.getSimpleName().toString();
+ List<? extends VariableElement> parameters = method.getParameters();
+ Set<Modifier> modifiers = method.getModifiers();
+ if(methodName.startsWith("get") && parameters.isEmpty() && modifiers.contains(Modifier.PUBLIC)){
+ // Bean getter method.
+ String attributeName = methodName.substring(3,4).toLowerCase()+methodName.substring(4);
+ Property atribute = component.addAtribute(attributeName);
+ atribute.setDescription(elementUtils.getDocComment(method));
+ }
+ }
+ }
}
}
- System.out.flush();
return true;
}
+ private boolean isEmpty(String type) {
+ return type == null || type.length()==0;
+ }
+
}
private static final String INTERFACE_JAVA = "org/richfaces/cdk/apt/TestInterface.java";
private static final String SUB_CLASS_JAVA = "org/richfaces/cdk/apt/TestSubClass.java";
private static final String CLASS_JAVA = "org/richfaces/cdk/apt/TestClass.java";
private static final ImmutableSet<String> PROCESS_ANNOTATIONS = ImmutableSet.of(TestAnnotation.class.getName());
- private static final String COMPONENT_CLASS_JAVA = "org/richfaces/cdk/annotations/AbstractTestComponent.java";
+ private static final String COMPONENT_CLASS_JAVA = "org/richfaces/cdk/test/component/AbstractTestComponent.java";
private File testSourceDirectory;
private ClassLoader testLoader;
@@ -167,6 +218,8 @@
// Prepare Mock compilation context.
CdkContext cdkContext = createMock(CdkContext.class);
expect(cdkContext.getJavaSource()).andStubReturn(testSourceDirectory);
+ expect(cdkContext.getJavaSourceOutput()).andStubReturn(null);
+ expect(cdkContext.getResourceOutput()).andStubReturn(null);
expect(cdkContext.getLoader()).andStubReturn(TestAnnotation.class.getClassLoader());
replay(cdkContext);
@@ -196,6 +249,8 @@
// Prepare Mock compilation context.
CdkContext cdkContext = createMock(CdkContext.class);
expect(cdkContext.getJavaSource()).andStubReturn(testSourceDirectory);
+ expect(cdkContext.getJavaSourceOutput()).andStubReturn( null);
+ expect(cdkContext.getResourceOutput()).andStubReturn(null);
expect(cdkContext.getLoader()).andStubReturn(TestAnnotation2.class.getClassLoader());
replay(cdkContext);
@@ -228,12 +283,22 @@
// Prepare Mock compilation context.
CdkContext cdkContext = createMock(CdkContext.class);
expect(cdkContext.getJavaSource()).andStubReturn(testSourceDirectory);
+ expect(cdkContext.getJavaSourceOutput()).andStubReturn(null);
+ expect(cdkContext.getResourceOutput()).andStubReturn(null);
expect(cdkContext.getLoader()).andStubReturn(TestAnnotation2.class.getClassLoader());
replay(cdkContext);
- Processor processor = new TestProcessor(cdkContext);
+ TestProcessor processor = new TestProcessor(cdkContext);
+ ComponentLibrary library = new ComponentLibrary("org.richfaces.cdk.test");
+ processor.library = library;
CdkCompiler compiler = CdkCompiler.create(cdkContext);
- compiler.process(ImmutableList.of(getJavaFile(SUB_CLASS_JAVA),getJavaFile(CLASS_JAVA),getJavaFile(INTERFACE_JAVA)), processor);
+ compiler.process(ImmutableList.of(getJavaFile(COMPONENT_CLASS_JAVA)), processor);
verify(cdkContext);
+ assertTrue(processor.isInitialized());
+ assertEquals(1, processor.numOfComponents);
+ assertEquals(1, library.getComponents().size());
+ org.richfaces.cdk.model.Component component = library.getComponents().iterator().next();
+ assertEquals(1, component.getAttributes().size());
+
}
/**
@@ -248,9 +313,12 @@
// Prepare Mock compilation context.
CdkContext cdkContext = createMock(CdkContext.class);
expect(cdkContext.getJavaSource()).andStubReturn(testSourceDirectory);
+ expect(cdkContext.getJavaSourceOutput()).andStubReturn(null);
+ expect(cdkContext.getResourceOutput()).andStubReturn(null);
expect(cdkContext.getLoader()).andStubReturn(TestAnnotation2.class.getClassLoader());
replay(cdkContext);
- Processor processor = new ComponentProcessor(cdkContext);
+ ComponentLibrary library = new ComponentLibrary("org.richfaces.cdk.test");
+ Processor processor = new ComponentProcessor(cdkContext,library);
CdkCompiler compiler = CdkCompiler.create(cdkContext);
compiler.process(ImmutableList.of(getJavaFile(COMPONENT_CLASS_JAVA)), processor);
verify(cdkContext);
Modified: root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/apt/VirtualFileManagerTest.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/apt/VirtualFileManagerTest.java 2009-08-05 19:47:36 UTC (rev 15117)
+++ root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/apt/VirtualFileManagerTest.java 2009-08-06 00:41:54 UTC (rev 15118)
@@ -90,7 +90,7 @@
fileManager.setJavaSourceDirectory(javaSourceDirectory);
replay(mockFileManager);
ArrayList<JavaFileObject> list = Lists.newArrayList(fileManager.list(StandardLocation.SOURCE_PATH, "", ImmutableSet.of(Kind.HTML,Kind.SOURCE), true));
- assertEquals(4, list.size());
+ assertEquals(5, list.size());
}
@Test
public void testGetFileForInputLocationStringString() throws Exception {
Copied: root/cdk/trunk/plugins/generator/src/test/resources/org/richfaces/cdk/test/component (from rev 15116, root/cdk/trunk/plugins/generator/src/test/resources/org/richfaces/cdk/annotations)
Modified: root/cdk/trunk/plugins/generator/src/test/resources/org/richfaces/cdk/test/component/AbstractTestComponent.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/test/resources/org/richfaces/cdk/annotations/AbstractTestComponent.java 2009-08-05 15:46:45 UTC (rev 15116)
+++ root/cdk/trunk/plugins/generator/src/test/resources/org/richfaces/cdk/test/component/AbstractTestComponent.java 2009-08-06 00:41:54 UTC (rev 15118)
@@ -21,8 +21,11 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-package org.richfaces.cdk.annotations;
+package org.richfaces.cdk.test.component;
+import org.richfaces.cdk.annotations.Attribute;
+import org.richfaces.cdk.annotations.Component;
+
import javax.faces.component.UIComponent;
import javax.faces.component.ValueHolder;
@@ -31,10 +34,15 @@
* @author asmirnov(a)exadel.com
*
*/
-@Component(type="org.richfaces.Test",family="org.richfaces.Family")
+@Component(type="org.richfaces.cdk.test.TestComponent",family="org.richfaces.Family")
public abstract class AbstractTestComponent extends UIComponent implements
ValueHolder {
+ /**
+ *
+ * <p class="changed_added_4_0"></p>
+ * @return
+ */
@Attribute
public abstract Object getTestValue();
15 years, 5 months
JBoss Rich Faces SVN: r15117 - in branches/community/3.3.X/docs: cdkguide/en/src/main/docbook/includes and 3 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: smukhina
Date: 2009-08-05 15:47:36 -0400 (Wed, 05 Aug 2009)
New Revision: 15117
Modified:
branches/community/3.3.X/docs/cdkguide/en/src/main/docbook/includes/skin.xml
branches/community/3.3.X/docs/cdkguide/en/src/main/docbook/master.xml
branches/community/3.3.X/docs/photo_album_app_guide/en/src/main/docbook/includes/a4j_status.xml
branches/community/3.3.X/docs/photo_album_app_guide/en/src/main/docbook/includes/skinnability.xml
branches/community/3.3.X/docs/photo_album_app_guide/en/src/main/docbook/includes/validators.xml
branches/community/3.3.X/docs/photo_album_app_guide/en/src/main/docbook/master.xml
branches/community/3.3.X/docs/photo_album_app_guide/en/src/main/docbook/modules/intro.xml
Log:
https://jira.jboss.org/jira/browse/RF-7641 links are updated for CDK and photo album guides
Modified: branches/community/3.3.X/docs/cdkguide/en/src/main/docbook/includes/skin.xml
===================================================================
--- branches/community/3.3.X/docs/cdkguide/en/src/main/docbook/includes/skin.xml 2009-08-05 15:46:45 UTC (rev 15116)
+++ branches/community/3.3.X/docs/cdkguide/en/src/main/docbook/includes/skin.xml 2009-08-05 19:47:36 UTC (rev 15117)
@@ -15,7 +15,7 @@
RichFaces has a number of predefined skins you could use wtih the <emphasis role="bold"><property><inputDate></property></emphasis> component.
But if you want to create your own skin, please, read carefully
the <property>"Skinnability"</property> section of the
- <ulink url="http://www.jboss.org/file-access/default/members/jbossrichfaces/freezone/...">RichFaces Developer Guide</ulink>. You could find all neccesary information about
+ <ulink url="&devguide;/#Skinnability">RichFaces Developer Guide</ulink>. You could find all neccesary information about
<property>Built-in skinnability in RichFaces</property>, <property>XCSS file format</property>, <property>Plug-n-Skin feature</property>, etc. there.
</para>
<para>
Modified: branches/community/3.3.X/docs/cdkguide/en/src/main/docbook/master.xml
===================================================================
--- branches/community/3.3.X/docs/cdkguide/en/src/main/docbook/master.xml 2009-08-05 15:46:45 UTC (rev 15116)
+++ branches/community/3.3.X/docs/cdkguide/en/src/main/docbook/master.xml 2009-08-05 19:47:36 UTC (rev 15117)
@@ -83,7 +83,7 @@
<abstract>
<title/>
<para>
- <ulink url="http://www.jboss.org/file-access/default/members/jbossrichfaces/freezone/...">PDF version</ulink>
+ <ulink url="../../cdkguide/en/pdf/CDK_Developer_Guide.pdf">PDF version</ulink>
</para>
</abstract>
Modified: branches/community/3.3.X/docs/photo_album_app_guide/en/src/main/docbook/includes/a4j_status.xml
===================================================================
--- branches/community/3.3.X/docs/photo_album_app_guide/en/src/main/docbook/includes/a4j_status.xml 2009-08-05 15:46:45 UTC (rev 15116)
+++ branches/community/3.3.X/docs/photo_album_app_guide/en/src/main/docbook/includes/a4j_status.xml 2009-08-05 19:47:36 UTC (rev 15117)
@@ -70,6 +70,6 @@
</para>
<para>
- If you would like to get more details about the <emphasis role="bold"><property><a4j:status></property></emphasis> please visit <ulink url="http://livedemo.exadel.com/richfaces-demo/richfaces/status.jsf?c=status">Live Demo</ulink> web page and <ulink url="http://www.jboss.org/file-access/default/members/jbossrichfaces/freezone/...">RichFaces Developer Guide</ulink>.
+ If you would like to get more details about the <emphasis role="bold"><property><a4j:status></property></emphasis> please visit <ulink url="http://livedemo.exadel.com/richfaces-demo/richfaces/status.jsf?c=status">Live Demo</ulink> web page and <ulink url="&devguide;/#a4j_status">RichFaces Developer Guide</ulink>.
</para>
</section>
Modified: branches/community/3.3.X/docs/photo_album_app_guide/en/src/main/docbook/includes/skinnability.xml
===================================================================
--- branches/community/3.3.X/docs/photo_album_app_guide/en/src/main/docbook/includes/skinnability.xml 2009-08-05 15:46:45 UTC (rev 15116)
+++ branches/community/3.3.X/docs/photo_album_app_guide/en/src/main/docbook/includes/skinnability.xml 2009-08-05 19:47:36 UTC (rev 15117)
@@ -41,6 +41,6 @@
...]]></programlisting>
<para>
- You can find more information about the Skinnability feature in <ulink url="http://www.jboss.org/file-access/default/members/jbossrichfaces/freezone/...">RichFaces Developer Guide</ulink>.
+ You can find more information about the Skinnability feature in <ulink url="&devguide;/#Skinnability">RichFaces Developer Guide</ulink>.
</para>
</section>
Modified: branches/community/3.3.X/docs/photo_album_app_guide/en/src/main/docbook/includes/validators.xml
===================================================================
--- branches/community/3.3.X/docs/photo_album_app_guide/en/src/main/docbook/includes/validators.xml 2009-08-05 15:46:45 UTC (rev 15116)
+++ branches/community/3.3.X/docs/photo_album_app_guide/en/src/main/docbook/includes/validators.xml 2009-08-05 19:47:36 UTC (rev 15117)
@@ -63,7 +63,7 @@
</para>
<para>
- If you would like to get more details about the validators that RichFaces library provides please visit <ulink url="http://livedemo.exadel.com/richfaces-demo/richfaces/ajaxValidator.jsf">Live Demo</ulink> web page and <ulink url="http://www.jboss.org/file-access/default/members/jbossrichfaces/freezone/..." >RichFaces Developer Guide</ulink>.
+ If you would like to get more details about the validators that RichFaces library provides please visit <ulink url="http://livedemo.exadel.com/richfaces-demo/richfaces/ajaxValidator.jsf">Live Demo</ulink> web page and <ulink url="&devguide;" >RichFaces Developer Guide</ulink>.
</para>
</section>
Modified: branches/community/3.3.X/docs/photo_album_app_guide/en/src/main/docbook/master.xml
===================================================================
--- branches/community/3.3.X/docs/photo_album_app_guide/en/src/main/docbook/master.xml 2009-08-05 15:46:45 UTC (rev 15116)
+++ branches/community/3.3.X/docs/photo_album_app_guide/en/src/main/docbook/master.xml 2009-08-05 19:47:36 UTC (rev 15117)
@@ -24,7 +24,7 @@
<!ENTITY a4j_status SYSTEM "includes/a4j_status.xml">
<!ENTITY cdkguide "../../cdkguide/html_single/index.html">
- <!ENTITY devguide "../../devguide//html_single/index.html">
+ <!ENTITY devguide "../../devguide/html_single/index.html">
<!ENTITY migrationguide "../../migrationguide/html_single/index.html">
<!ENTITY photoalbumguide "../../realworld/html_single/index.html">
<!ENTITY realworld "../../realworld/html_single/index.html">
Modified: branches/community/3.3.X/docs/photo_album_app_guide/en/src/main/docbook/modules/intro.xml
===================================================================
--- branches/community/3.3.X/docs/photo_album_app_guide/en/src/main/docbook/modules/intro.xml 2009-08-05 15:46:45 UTC (rev 15116)
+++ branches/community/3.3.X/docs/photo_album_app_guide/en/src/main/docbook/modules/intro.xml 2009-08-05 19:47:36 UTC (rev 15117)
@@ -36,7 +36,7 @@
<listitem>
<para>
<emphasis>Highly customizable look-and-feel</emphasis> - the <property>RichFaces</property> have special feature called
- <ulink url="http://www.jboss.org/file-access/default/members/jbossrichfaces/freezone/...">Skinnability</ulink>.
+ <ulink url="&devguide;/#Skinnability">Skinnability</ulink>.
</para>
</listitem>
</itemizedlist>
15 years, 5 months
JBoss Rich Faces SVN: r15116 - root/cdk/trunk/plugins/generator/src/main/xsd.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2009-08-05 11:46:45 -0400 (Wed, 05 Aug 2009)
New Revision: 15116
Modified:
root/cdk/trunk/plugins/generator/src/main/xsd/xhtml1-transitional.xsd
Log:
XHTML 1 Transitional extended with EL expressions
Modified: root/cdk/trunk/plugins/generator/src/main/xsd/xhtml1-transitional.xsd
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/xsd/xhtml1-transitional.xsd 2009-08-05 15:46:00 UTC (rev 15115)
+++ root/cdk/trunk/plugins/generator/src/main/xsd/xhtml1-transitional.xsd 2009-08-05 15:46:45 UTC (rev 15116)
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema version="1.0" xml:lang="en"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
- targetNamespace="http://www.w3.org/1999/xhtml"
- xmlns="http://www.w3.org/1999/xhtml"
+ targetNamespace="http://richfaces.org/xhtml-el"
+ xmlns="http://richfaces.org/xhtml-el"
xmlns:xml="http://www.w3.org/XML/1998/namespace"
elementFormDefault="qualified">
@@ -55,13 +55,23 @@
</xs:documentation>
</xs:annotation>
+ <xs:simpleType name="elOnlyExpression">
+ <xs:restriction base="xs:string">
+ <xs:pattern value=".*#\{[^\}]+\}.*" />
+ </xs:restriction>
+ </xs:simpleType>
+
+ <xs:simpleType name="elExpression">
+ <xs:restriction base="xs:string" />
+ </xs:simpleType>
+
<xs:simpleType name="ContentType">
<xs:annotation>
<xs:documentation>
media type, as per [RFC2045]
</xs:documentation>
</xs:annotation>
- <xs:restriction base="xs:string"/>
+ <xs:restriction base="elExpression"/>
</xs:simpleType>
<xs:simpleType name="ContentTypes">
@@ -70,7 +80,7 @@
comma-separated list of media types, as per [RFC2045]
</xs:documentation>
</xs:annotation>
- <xs:restriction base="xs:string"/>
+ <xs:restriction base="elExpression"/>
</xs:simpleType>
<xs:simpleType name="Charset">
@@ -79,7 +89,7 @@
a character encoding, as per [RFC2045]
</xs:documentation>
</xs:annotation>
- <xs:restriction base="xs:string"/>
+ <xs:restriction base="elExpression"/>
</xs:simpleType>
<xs:simpleType name="Charsets">
@@ -88,7 +98,7 @@
a space separated list of character encodings, as per [RFC2045]
</xs:documentation>
</xs:annotation>
- <xs:restriction base="xs:string"/>
+ <xs:restriction base="elExpression"/>
</xs:simpleType>
<xs:simpleType name="LanguageCode">
@@ -97,7 +107,7 @@
a language code, as per [RFC3066]
</xs:documentation>
</xs:annotation>
- <xs:restriction base="xs:language"/>
+ <xs:union memberTypes="xs:language elOnlyExpression" />
</xs:simpleType>
<xs:simpleType name="Character">
@@ -106,8 +116,22 @@
a single character, as per section 2.2 of [XML]
</xs:documentation>
</xs:annotation>
- <xs:restriction base="xs:string">
- <xs:length value="1" fixed="true"/>
+ <!-- TODO test -->
+ <xs:union>
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:length value="1" fixed="true" />
+ </xs:restriction>
+ </xs:simpleType>
+ <xs:simpleType>
+ <xs:restriction base="elOnlyExpression"/>
+ </xs:simpleType>
+ </xs:union>
+ </xs:simpleType>
+
+ <xs:simpleType name="simpleType.Number">
+ <xs:restriction base="xs:nonNegativeInteger">
+ <xs:pattern value="[0-9]+"/>
</xs:restriction>
</xs:simpleType>
@@ -117,9 +141,7 @@
one or more digits
</xs:documentation>
</xs:annotation>
- <xs:restriction base="xs:nonNegativeInteger">
- <xs:pattern value="[0-9]+"/>
- </xs:restriction>
+ <xs:union memberTypes="simpleType.Number elOnlyExpression" />
</xs:simpleType>
<xs:simpleType name="tabindexNumber">
@@ -130,10 +152,17 @@
a number between 0 and 32767. User agents should ignore leading zeros.
</xs:documentation>
</xs:annotation>
- <xs:restriction base="Number">
- <xs:minInclusive value="0"/>
- <xs:maxInclusive value="32767"/>
- </xs:restriction>
+ <xs:union>
+ <xs:simpleType>
+ <xs:restriction base="simpleType.Number">
+ <xs:minInclusive value="0"/>
+ <xs:maxInclusive value="32767"/>
+ </xs:restriction>
+ </xs:simpleType>
+ <xs:simpleType>
+ <xs:restriction base="elOnlyExpression"/>
+ </xs:simpleType>
+ </xs:union>
</xs:simpleType>
<xs:simpleType name="LinkTypes">
@@ -142,7 +171,7 @@
space-separated list of link types
</xs:documentation>
</xs:annotation>
- <xs:restriction base="xs:NMTOKENS"/>
+ <xs:union memberTypes="xs:NMTOKENS elOnlyExpression" />
</xs:simpleType>
<xs:simpleType name="MediaDesc">
@@ -151,9 +180,16 @@
single or comma-separated list of media descriptors
</xs:documentation>
</xs:annotation>
- <xs:restriction base="xs:string">
- <xs:pattern value="[^,]+(,\s*[^,]+)*"/>
- </xs:restriction>
+ <xs:union>
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:pattern value="[^,]+(,\s*[^,]+)*"/>
+ </xs:restriction>
+ </xs:simpleType>
+ <xs:simpleType>
+ <xs:restriction base="elOnlyExpression"/>
+ </xs:simpleType>
+ </xs:union>
</xs:simpleType>
<xs:simpleType name="URI">
@@ -162,7 +198,7 @@
a Uniform Resource Identifier, see [RFC2396]
</xs:documentation>
</xs:annotation>
- <xs:restriction base="xs:anyURI"/>
+ <xs:union memberTypes="xs:anyURI elOnlyExpression"/>
</xs:simpleType>
<xs:simpleType name="UriList">
@@ -171,7 +207,7 @@
a space separated list of Uniform Resource Identifiers
</xs:documentation>
</xs:annotation>
- <xs:restriction base="xs:string"/>
+ <xs:restriction base="elExpression"/>
</xs:simpleType>
<xs:simpleType name="Datetime">
@@ -180,7 +216,7 @@
date and time information. ISO date format
</xs:documentation>
</xs:annotation>
- <xs:restriction base="xs:dateTime"/>
+ <xs:union memberTypes="xs:dateTime elOnlyExpression"/>
</xs:simpleType>
<xs:simpleType name="Script">
@@ -189,7 +225,7 @@
script expression
</xs:documentation>
</xs:annotation>
- <xs:restriction base="xs:string"/>
+ <xs:restriction base="elExpression"/>
</xs:simpleType>
<xs:simpleType name="StyleSheet">
@@ -198,7 +234,7 @@
style sheet data
</xs:documentation>
</xs:annotation>
- <xs:restriction base="xs:string"/>
+ <xs:restriction base="elExpression"/>
</xs:simpleType>
<xs:simpleType name="Text">
@@ -207,7 +243,7 @@
used for titles etc.
</xs:documentation>
</xs:annotation>
- <xs:restriction base="xs:string"/>
+ <xs:restriction base="elExpression"/>
</xs:simpleType>
<xs:simpleType name="FrameTarget">
@@ -216,9 +252,16 @@
render in this frame
</xs:documentation>
</xs:annotation>
- <xs:restriction base="xs:NMTOKEN">
- <xs:pattern value="_(blank|self|parent|top)|[A-Za-z]\c*"/>
- </xs:restriction>
+ <xs:union>
+ <xs:simpleType>
+ <xs:restriction base="xs:NMTOKEN">
+ <xs:pattern value="_(blank|self|parent|top)|[A-Za-z]\c*"/>
+ </xs:restriction>
+ </xs:simpleType>
+ <xs:simpleType>
+ <xs:restriction base="elOnlyExpression"/>
+ </xs:simpleType>
+ </xs:union>
</xs:simpleType>
<xs:simpleType name="Length">
@@ -227,9 +270,16 @@
nn for pixels or nn% for percentage length
</xs:documentation>
</xs:annotation>
- <xs:restriction base="xs:string">
- <xs:pattern value="[-+]?(\d+|\d+(\.\d+)?%)"/>
- </xs:restriction>
+ <xs:union>
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:pattern value="[-+]?(\d+|\d+(\.\d+)?%)"/>
+ </xs:restriction>
+ </xs:simpleType>
+ <xs:simpleType>
+ <xs:restriction base="elOnlyExpression"/>
+ </xs:simpleType>
+ </xs:union>
</xs:simpleType>
<xs:simpleType name="MultiLength">
@@ -238,9 +288,16 @@
pixel, percentage, or relative
</xs:documentation>
</xs:annotation>
- <xs:restriction base="xs:string">
- <xs:pattern value="[-+]?(\d+|\d+(\.\d+)?%)|[1-9]?(\d+)?\*"/>
- </xs:restriction>
+ <xs:union>
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:pattern value="[-+]?(\d+|\d+(\.\d+)?%)|[1-9]?(\d+)?\*"/>
+ </xs:restriction>
+ </xs:simpleType>
+ <xs:simpleType>
+ <xs:restriction base="elOnlyExpression" />
+ </xs:simpleType>
+ </xs:union>
</xs:simpleType>
<xs:simpleType name="Pixels">
@@ -249,7 +306,7 @@
integer representing length in pixels
</xs:documentation>
</xs:annotation>
- <xs:restriction base="xs:nonNegativeInteger"/>
+ <xs:union memberTypes="xs:nonNegativeInteger elOnlyExpression"/>
</xs:simpleType>
<xs:annotation>
@@ -259,12 +316,19 @@
</xs:annotation>
<xs:simpleType name="Shape">
- <xs:restriction base="xs:token">
- <xs:enumeration value="rect"/>
- <xs:enumeration value="circle"/>
- <xs:enumeration value="poly"/>
- <xs:enumeration value="default"/>
- </xs:restriction>
+ <xs:union>
+ <xs:simpleType>
+ <xs:restriction base="xs:token">
+ <xs:enumeration value="rect"/>
+ <xs:enumeration value="circle"/>
+ <xs:enumeration value="poly"/>
+ <xs:enumeration value="default"/>
+ </xs:restriction>
+ </xs:simpleType>
+ <xs:simpleType>
+ <xs:restriction base="elOnlyExpression"/>
+ </xs:simpleType>
+ </xs:union>
</xs:simpleType>
<xs:simpleType name="Coords">
@@ -273,10 +337,17 @@
comma separated list of lengths
</xs:documentation>
</xs:annotation>
- <xs:restriction base="xs:string">
- <xs:pattern
- value="[-+]?(\d+|\d+(\.\d+)?%)(,\s*[-+]?(\d+|\d+(\.\d+)?%))*"/>
- </xs:restriction>
+ <xs:union>
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:pattern
+ value="[-+]?(\d+|\d+(\.\d+)?%)(,\s*[-+]?(\d+|\d+(\.\d+)?%))*"/>
+ </xs:restriction>
+ </xs:simpleType>
+ <xs:simpleType>
+ <xs:restriction base="elOnlyExpression"/>
+ </xs:simpleType>
+ </xs:union>
</xs:simpleType>
<xs:simpleType name="ImgAlign">
@@ -285,13 +356,20 @@
used for object, applet, img, input and iframe
</xs:documentation>
</xs:annotation>
- <xs:restriction base="xs:token">
- <xs:enumeration value="top"/>
- <xs:enumeration value="middle"/>
- <xs:enumeration value="bottom"/>
- <xs:enumeration value="left"/>
- <xs:enumeration value="right"/>
- </xs:restriction>
+ <xs:union>
+ <xs:simpleType>
+ <xs:restriction base="xs:token">
+ <xs:enumeration value="top"/>
+ <xs:enumeration value="middle"/>
+ <xs:enumeration value="bottom"/>
+ <xs:enumeration value="left"/>
+ <xs:enumeration value="right"/>
+ </xs:restriction>
+ </xs:simpleType>
+ <xs:simpleType>
+ <xs:restriction base="elOnlyExpression"/>
+ </xs:simpleType>
+ </xs:union>
</xs:simpleType>
<xs:simpleType name="Color">
@@ -311,11 +389,34 @@
Fuchsia= #FF00FF Aqua = #00FFFF
</xs:documentation>
</xs:annotation>
- <xs:restriction base="xs:string">
- <xs:pattern value="[A-Za-z]+|#[0-9A-Fa-f]{3}|#[0-9A-Fa-f]{6}"/>
- </xs:restriction>
+ <xs:union>
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:pattern value="[A-Za-z]+|#[0-9A-Fa-f]{3}|#[0-9A-Fa-f]{6}"/>
+ </xs:restriction>
+ </xs:simpleType>
+ <xs:simpleType>
+ <xs:restriction base="elOnlyExpression"/>
+ </xs:simpleType>
+ </xs:union>
</xs:simpleType>
+ <xs:simpleType name="ID">
+ <xs:union memberTypes="xs:ID elOnlyExpression"/>
+ </xs:simpleType>
+ <xs:simpleType name="IDREF">
+ <xs:union memberTypes="xs:IDREF elOnlyExpression"/>
+ </xs:simpleType>
+ <xs:simpleType name="IDREFS">
+ <xs:union memberTypes="xs:IDREFS elOnlyExpression"/>
+ </xs:simpleType>
+ <xs:simpleType name="NMTOKEN">
+ <xs:union memberTypes="xs:NMTOKEN elOnlyExpression"/>
+ </xs:simpleType>
+ <xs:simpleType name="NMTOKENS">
+ <xs:union memberTypes="xs:NMTOKENS elOnlyExpression"/>
+ </xs:simpleType>
+
<xs:annotation>
<xs:documentation>
=================== Generic Attributes ===============================
@@ -332,11 +433,18 @@
title advisory title/amplification
</xs:documentation>
</xs:annotation>
- <xs:attribute name="id" type="xs:ID"/>
- <xs:attribute name="class" type="xs:NMTOKENS"/>
+ <xs:attribute name="id" type="ID"/>
+ <xs:attribute name="class" type="NMTOKENS"/>
<xs:attribute name="style" type="StyleSheet"/>
<xs:attribute name="title" type="Text"/>
</xs:attributeGroup>
+
+ <xs:simpleType name="simpleType.dir">
+ <xs:restriction base="xs:token">
+ <xs:enumeration value="ltr"/>
+ <xs:enumeration value="rtl"/>
+ </xs:restriction>
+ </xs:simpleType>
<xs:attributeGroup name="i18n">
<xs:annotation>
@@ -348,13 +456,12 @@
</xs:documentation>
</xs:annotation>
<xs:attribute name="lang" type="LanguageCode"/>
- <xs:attribute ref="xml:lang"/>
+
+ <!-- TODO: xml:lang can be made EL -->
+ <xs:attribute ref="xml:lang" />
<xs:attribute name="dir">
<xs:simpleType>
- <xs:restriction base="xs:token">
- <xs:enumeration value="ltr"/>
- <xs:enumeration value="rtl"/>
- </xs:restriction>
+ <xs:union memberTypes="simpleType.dir elOnlyExpression" />
</xs:simpleType>
</xs:attribute>
</xs:attributeGroup>
@@ -417,12 +524,19 @@
</xs:annotation>
<xs:attribute name="align">
<xs:simpleType>
- <xs:restriction base="xs:token">
- <xs:enumeration value="left"/>
- <xs:enumeration value="center"/>
- <xs:enumeration value="right"/>
- <xs:enumeration value="justify"/>
- </xs:restriction>
+ <xs:union>
+ <xs:simpleType>
+ <xs:restriction base="xs:token">
+ <xs:enumeration value="left"/>
+ <xs:enumeration value="center"/>
+ <xs:enumeration value="right"/>
+ <xs:enumeration value="justify"/>
+ </xs:restriction>
+ </xs:simpleType>
+ <xs:simpleType>
+ <xs:restriction base="elOnlyExpression"/>
+ </xs:simpleType>
+ </xs:union>
</xs:simpleType>
</xs:attribute>
</xs:attributeGroup>
@@ -727,7 +841,7 @@
<xs:element ref="body"/>
</xs:sequence>
<xs:attributeGroup ref="i18n"/>
- <xs:attribute name="id" type="xs:ID"/>
+ <xs:attribute name="id" type="ID"/>
</xs:complexType>
</xs:element>
@@ -778,7 +892,7 @@
</xs:choice>
</xs:sequence>
<xs:attributeGroup ref="i18n"/>
- <xs:attribute name="id" type="xs:ID"/>
+ <xs:attribute name="id" type="ID"/>
<xs:attribute name="profile" type="URI"/>
</xs:complexType>
</xs:element>
@@ -793,7 +907,7 @@
</xs:annotation>
<xs:complexType mixed="true">
<xs:attributeGroup ref="i18n"/>
- <xs:attribute name="id" type="xs:ID"/>
+ <xs:attribute name="id" type="ID"/>
</xs:complexType>
</xs:element>
@@ -804,7 +918,7 @@
</xs:documentation>
</xs:annotation>
<xs:complexType>
- <xs:attribute name="id" type="xs:ID"/>
+ <xs:attribute name="id" type="ID"/>
<xs:attribute name="href" type="URI"/>
<xs:attribute name="target" type="FrameTarget"/>
</xs:complexType>
@@ -818,7 +932,7 @@
</xs:annotation>
<xs:complexType>
<xs:attributeGroup ref="i18n"/>
- <xs:attribute name="id" type="xs:ID"/>
+ <xs:attribute name="id" type="ID"/>
<xs:attribute name="http-equiv"/>
<xs:attribute name="name"/>
<xs:attribute name="content" use="required"/>
@@ -863,7 +977,7 @@
</xs:annotation>
<xs:complexType mixed="true">
<xs:attributeGroup ref="i18n"/>
- <xs:attribute name="id" type="xs:ID"/>
+ <xs:attribute name="id" type="ID"/>
<xs:attribute name="type" use="required" type="ContentType"/>
<xs:attribute name="media" type="MediaDesc"/>
<xs:attribute name="title" type="Text"/>
@@ -878,16 +992,23 @@
</xs:documentation>
</xs:annotation>
<xs:complexType mixed="true">
- <xs:attribute name="id" type="xs:ID"/>
+ <xs:attribute name="id" type="ID"/>
<xs:attribute name="charset" type="Charset"/>
<xs:attribute name="type" use="required" type="ContentType"/>
<xs:attribute name="language"/>
<xs:attribute name="src" type="URI"/>
<xs:attribute name="defer">
<xs:simpleType>
- <xs:restriction base="xs:token">
- <xs:enumeration value="defer"/>
- </xs:restriction>
+ <xs:union>
+ <xs:simpleType>
+ <xs:restriction base="xs:token">
+ <xs:enumeration value="defer"/>
+ </xs:restriction>
+ </xs:simpleType>
+ <xs:simpleType>
+ <xs:restriction base="elOnlyExpression"/>
+ </xs:simpleType>
+ </xs:union>
</xs:simpleType>
</xs:attribute>
<xs:attribute ref="xml:space" fixed="preserve"/>
@@ -926,25 +1047,39 @@
<xs:extension base="Flow">
<xs:attributeGroup ref="coreattrs"/>
<xs:attribute name="longdesc" type="URI"/>
- <xs:attribute name="name" type="xs:NMTOKEN"/>
+ <xs:attribute name="name" type="NMTOKEN"/>
<xs:attribute name="src" type="URI"/>
<xs:attribute name="frameborder" default="1">
<xs:simpleType>
- <xs:restriction base="xs:token">
- <xs:enumeration value="1"/>
- <xs:enumeration value="0"/>
- </xs:restriction>
+ <xs:union>
+ <xs:simpleType>
+ <xs:restriction base="xs:token">
+ <xs:enumeration value="1"/>
+ <xs:enumeration value="0"/>
+ </xs:restriction>
+ </xs:simpleType>
+ <xs:simpleType>
+ <xs:restriction base="elOnlyExpression"/>
+ </xs:simpleType>
+ </xs:union>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="marginwidth" type="Pixels"/>
<xs:attribute name="marginheight" type="Pixels"/>
<xs:attribute name="scrolling" default="auto">
<xs:simpleType>
- <xs:restriction base="xs:token">
- <xs:enumeration value="yes"/>
- <xs:enumeration value="no"/>
- <xs:enumeration value="auto"/>
- </xs:restriction>
+ <xs:union>
+ <xs:simpleType>
+ <xs:restriction base="xs:token">
+ <xs:enumeration value="yes"/>
+ <xs:enumeration value="no"/>
+ <xs:enumeration value="auto"/>
+ </xs:restriction>
+ </xs:simpleType>
+ <xs:simpleType>
+ <xs:restriction base="elOnlyExpression"/>
+ </xs:simpleType>
+ </xs:union>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="align" type="ImgAlign"/>
@@ -1114,12 +1249,34 @@
Unordered list bullet styles
</xs:documentation>
</xs:annotation>
- <xs:restriction base="xs:token">
- <xs:enumeration value="disc"/>
- <xs:enumeration value="square"/>
- <xs:enumeration value="circle"/>
- </xs:restriction>
+ <xs:union>
+ <xs:simpleType>
+ <xs:restriction base="xs:token">
+ <xs:enumeration value="disc"/>
+ <xs:enumeration value="square"/>
+ <xs:enumeration value="circle"/>
+ </xs:restriction>
+ </xs:simpleType>
+ <xs:simpleType>
+ <xs:restriction base="elOnlyExpression"/>
+ </xs:simpleType>
+ </xs:union>
</xs:simpleType>
+
+ <xs:attribute name="compact">
+ <xs:simpleType>
+ <xs:union>
+ <xs:simpleType>
+ <xs:restriction base="xs:token">
+ <xs:enumeration value="compact"/>
+ </xs:restriction>
+ </xs:simpleType>
+ <xs:simpleType>
+ <xs:restriction base="elOnlyExpression"/>
+ </xs:simpleType>
+ </xs:union>
+ </xs:simpleType>
+ </xs:attribute>
<xs:element name="ul">
<xs:annotation>
@@ -1133,13 +1290,7 @@
</xs:sequence>
<xs:attributeGroup ref="attrs"/>
<xs:attribute name="type" type="ULStyle"/>
- <xs:attribute name="compact">
- <xs:simpleType>
- <xs:restriction base="xs:token">
- <xs:enumeration value="compact"/>
- </xs:restriction>
- </xs:simpleType>
- </xs:attribute>
+ <xs:attribute ref="compact" />
</xs:complexType>
</xs:element>
@@ -1158,7 +1309,7 @@
is reset to 1 for the first list item in an ordered list.
</xs:documentation>
</xs:annotation>
- <xs:restriction base="xs:string"/>
+ <xs:restriction base="elExpression"/>
</xs:simpleType>
<xs:element name="ol">
@@ -1173,13 +1324,7 @@
</xs:sequence>
<xs:attributeGroup ref="attrs"/>
<xs:attribute name="type" type="OLStyle"/>
- <xs:attribute name="compact">
- <xs:simpleType>
- <xs:restriction base="xs:token">
- <xs:enumeration value="compact"/>
- </xs:restriction>
- </xs:simpleType>
- </xs:attribute>
+ <xs:attribute ref="compact" />
<xs:attribute name="start" type="Number"/>
</xs:complexType>
</xs:element>
@@ -1195,13 +1340,7 @@
<xs:element maxOccurs="unbounded" ref="li"/>
</xs:sequence>
<xs:attributeGroup ref="attrs"/>
- <xs:attribute name="compact">
- <xs:simpleType>
- <xs:restriction base="xs:token">
- <xs:enumeration value="compact"/>
- </xs:restriction>
- </xs:simpleType>
- </xs:attribute>
+ <xs:attribute ref="compact" />
</xs:complexType>
</xs:element>
@@ -1216,13 +1355,7 @@
<xs:element maxOccurs="unbounded" ref="li"/>
</xs:sequence>
<xs:attributeGroup ref="attrs"/>
- <xs:attribute name="compact">
- <xs:simpleType>
- <xs:restriction base="xs:token">
- <xs:enumeration value="compact"/>
- </xs:restriction>
- </xs:simpleType>
- </xs:attribute>
+ <xs:attribute ref="compact" />
</xs:complexType>
</xs:element>
@@ -1232,7 +1365,7 @@
LIStyle is constrained to: "(ULStyle|OLStyle)"
</xs:documentation>
</xs:annotation>
- <xs:restriction base="xs:string"/>
+ <xs:restriction base="elExpression"/>
</xs:simpleType>
<xs:element name="li">
@@ -1265,13 +1398,7 @@
<xs:element ref="dd"/>
</xs:choice>
<xs:attributeGroup ref="attrs"/>
- <xs:attribute name="compact">
- <xs:simpleType>
- <xs:restriction base="xs:token">
- <xs:enumeration value="compact"/>
- </xs:restriction>
- </xs:simpleType>
- </xs:attribute>
+ <xs:attribute ref="compact" />
</xs:complexType>
</xs:element>
@@ -1328,18 +1455,32 @@
<xs:attributeGroup ref="attrs"/>
<xs:attribute name="align">
<xs:simpleType>
- <xs:restriction base="xs:token">
- <xs:enumeration value="left"/>
- <xs:enumeration value="center"/>
- <xs:enumeration value="right"/>
- </xs:restriction>
+ <xs:union>
+ <xs:simpleType>
+ <xs:restriction base="xs:token">
+ <xs:enumeration value="left"/>
+ <xs:enumeration value="center"/>
+ <xs:enumeration value="right"/>
+ </xs:restriction>
+ </xs:simpleType>
+ <xs:simpleType>
+ <xs:restriction base="elOnlyExpression"/>
+ </xs:simpleType>
+ </xs:union>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="noshade">
<xs:simpleType>
- <xs:restriction base="xs:token">
- <xs:enumeration value="noshade"/>
- </xs:restriction>
+ <xs:union>
+ <xs:simpleType>
+ <xs:restriction base="xs:token">
+ <xs:enumeration value="noshade"/>
+ </xs:restriction>
+ </xs:simpleType>
+ <xs:simpleType>
+ <xs:restriction base="elOnlyExpression"/>
+ </xs:simpleType>
+ </xs:union>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="size" type="Pixels"/>
@@ -1462,7 +1603,7 @@
<xs:attributeGroup ref="focus"/>
<xs:attribute name="charset" type="Charset"/>
<xs:attribute name="type" type="ContentType"/>
- <xs:attribute name="name" type="xs:NMTOKEN"/>
+ <xs:attribute name="name" type="NMTOKEN"/>
<xs:attribute name="href" type="URI"/>
<xs:attribute name="hreflang" type="LanguageCode"/>
<xs:attribute name="rel" type="LinkTypes"/>
@@ -1510,12 +1651,9 @@
<xs:attribute name="lang" type="LanguageCode"/>
<xs:attribute ref="xml:lang"/>
<xs:attribute name="dir" use="required">
- <xs:simpleType>
- <xs:restriction base="xs:token">
- <xs:enumeration value="ltr"/>
- <xs:enumeration value="rtl"/>
- </xs:restriction>
- </xs:simpleType>
+ <xs:simpleType>
+ <xs:union memberTypes="simpleType.dir elOnlyExpression" />
+ </xs:simpleType>
</xs:attribute>
</xs:extension>
</xs:complexContent>
@@ -1532,12 +1670,19 @@
<xs:attributeGroup ref="coreattrs"/>
<xs:attribute name="clear" default="none">
<xs:simpleType>
- <xs:restriction base="xs:token">
- <xs:enumeration value="left"/>
- <xs:enumeration value="all"/>
- <xs:enumeration value="right"/>
- <xs:enumeration value="none"/>
- </xs:restriction>
+ <xs:union>
+ <xs:simpleType>
+ <xs:restriction base="xs:token">
+ <xs:enumeration value="left"/>
+ <xs:enumeration value="all"/>
+ <xs:enumeration value="right"/>
+ <xs:enumeration value="none"/>
+ </xs:restriction>
+ </xs:simpleType>
+ <xs:simpleType>
+ <xs:restriction base="elOnlyExpression"/>
+ </xs:simpleType>
+ </xs:union>
</xs:simpleType>
</xs:attribute>
</xs:complexType>
@@ -1866,7 +2011,7 @@
</xs:documentation>
</xs:annotation>
<xs:complexType>
- <xs:attribute name="id" type="xs:ID"/>
+ <xs:attribute name="id" type="ID"/>
<xs:attribute name="size" use="required"/>
<xs:attribute name="color" type="Color"/>
<xs:attribute name="face"/>
@@ -1915,9 +2060,16 @@
<xs:attributeGroup ref="attrs"/>
<xs:attribute name="declare">
<xs:simpleType>
- <xs:restriction base="xs:token">
- <xs:enumeration value="declare"/>
- </xs:restriction>
+ <xs:union>
+ <xs:simpleType>
+ <xs:restriction base="xs:token">
+ <xs:enumeration value="declare"/>
+ </xs:restriction>
+ </xs:simpleType>
+ <xs:simpleType>
+ <xs:restriction base="elOnlyExpression"/>
+ </xs:simpleType>
+ </xs:union>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="classid" type="URI"/>
@@ -1930,7 +2082,7 @@
<xs:attribute name="height" type="Length"/>
<xs:attribute name="width" type="Length"/>
<xs:attribute name="usemap" type="URI"/>
- <xs:attribute name="name" type="xs:NMTOKEN"/>
+ <xs:attribute name="name" type="NMTOKEN"/>
<xs:attribute name="tabindex" type="Number"/>
<xs:attribute name="align" type="ImgAlign"/>
<xs:attribute name="border" type="Pixels"/>
@@ -1949,16 +2101,23 @@
</xs:documentation>
</xs:annotation>
<xs:complexType>
- <xs:attribute name="id" type="xs:ID"/>
+ <xs:attribute name="id" type="ID"/>
<xs:attribute name="name" use="required"/>
<xs:attribute name="value"/>
<xs:attribute name="valuetype" default="data">
<xs:simpleType>
- <xs:restriction base="xs:token">
- <xs:enumeration value="data"/>
- <xs:enumeration value="ref"/>
- <xs:enumeration value="object"/>
- </xs:restriction>
+ <xs:union>
+ <xs:simpleType>
+ <xs:restriction base="xs:token">
+ <xs:enumeration value="data"/>
+ <xs:enumeration value="ref"/>
+ <xs:enumeration value="object"/>
+ </xs:restriction>
+ </xs:simpleType>
+ <xs:simpleType>
+ <xs:restriction base="elOnlyExpression"/>
+ </xs:simpleType>
+ </xs:union>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="type" type="ContentType"/>
@@ -1989,7 +2148,7 @@
<xs:attribute name="code"/>
<xs:attribute name="object"/>
<xs:attribute name="alt" type="Text"/>
- <xs:attribute name="name" type="xs:NMTOKEN"/>
+ <xs:attribute name="name" type="NMTOKEN"/>
<xs:attribute name="width" use="required" type="Length"/>
<xs:attribute name="height" use="required" type="Length"/>
<xs:attribute name="align" type="ImgAlign"/>
@@ -2014,7 +2173,7 @@
<xs:attributeGroup ref="attrs"/>
<xs:attribute name="src" use="required" type="URI"/>
<xs:attribute name="alt" use="required" type="Text"/>
- <xs:attribute name="name" type="xs:NMTOKEN"/>
+ <xs:attribute name="name" type="NMTOKEN"/>
<xs:attribute name="longdesc" type="URI"/>
<xs:attribute name="height" type="Length"/>
<xs:attribute name="width" type="Length"/>
@@ -2028,9 +2187,16 @@
</xs:attribute>
<xs:attribute name="ismap">
<xs:simpleType>
- <xs:restriction base="xs:token">
- <xs:enumeration value="ismap"/>
- </xs:restriction>
+ <xs:union>
+ <xs:simpleType>
+ <xs:restriction base="xs:token">
+ <xs:enumeration value="ismap"/>
+ </xs:restriction>
+ </xs:simpleType>
+ <xs:simpleType>
+ <xs:restriction base="elOnlyExpression"/>
+ </xs:simpleType>
+ </xs:union>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="align" type="ImgAlign"/>
@@ -2061,7 +2227,7 @@
</xs:choice>
<xs:attributeGroup ref="i18n"/>
<xs:attributeGroup ref="events"/>
- <xs:attribute name="id" use="required" type="xs:ID"/>
+ <xs:attribute name="id" use="required" type="ID"/>
<xs:attribute name="class"/>
<xs:attribute name="style" type="StyleSheet"/>
<xs:attribute name="title" type="Text"/>
@@ -2078,9 +2244,16 @@
<xs:attribute name="href" type="URI"/>
<xs:attribute name="nohref">
<xs:simpleType>
- <xs:restriction base="xs:token">
- <xs:enumeration value="nohref"/>
- </xs:restriction>
+ <xs:union>
+ <xs:simpleType>
+ <xs:restriction base="xs:token">
+ <xs:enumeration value="nohref"/>
+ </xs:restriction>
+ </xs:simpleType>
+ <xs:simpleType>
+ <xs:restriction base="elOnlyExpression"/>
+ </xs:simpleType>
+ </xs:union>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="alt" use="required" type="Text"/>
@@ -2102,10 +2275,17 @@
<xs:attribute name="action" use="required" type="URI"/>
<xs:attribute name="method" default="get">
<xs:simpleType>
- <xs:restriction base="xs:token">
- <xs:enumeration value="get"/>
- <xs:enumeration value="post"/>
- </xs:restriction>
+ <xs:union>
+ <xs:simpleType>
+ <xs:restriction base="xs:token">
+ <xs:enumeration value="get"/>
+ <xs:enumeration value="post"/>
+ </xs:restriction>
+ </xs:simpleType>
+ <xs:simpleType>
+ <xs:restriction base="elOnlyExpression"/>
+ </xs:simpleType>
+ </xs:union>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="enctype" type="ContentType"
@@ -2131,7 +2311,7 @@
<xs:complexContent>
<xs:extension base="Inline">
<xs:attributeGroup ref="attrs"/>
- <xs:attribute name="for" type="xs:IDREF"/>
+ <xs:attribute name="for" type="IDREF" />
<xs:attribute name="accesskey" type="Character"/>
<xs:attribute name="onfocus" type="Script"/>
<xs:attribute name="onblur" type="Script"/>
@@ -2141,19 +2321,69 @@
</xs:element>
<xs:simpleType name="InputType">
- <xs:restriction base="xs:token">
- <xs:enumeration value="text"/>
- <xs:enumeration value="password"/>
- <xs:enumeration value="checkbox"/>
- <xs:enumeration value="radio"/>
- <xs:enumeration value="submit"/>
- <xs:enumeration value="reset"/>
- <xs:enumeration value="file"/>
- <xs:enumeration value="hidden"/>
- <xs:enumeration value="image"/>
- <xs:enumeration value="button"/>
- </xs:restriction>
+ <xs:union>
+ <xs:simpleType>
+ <xs:restriction base="xs:token">
+ <xs:enumeration value="text"/>
+ <xs:enumeration value="password"/>
+ <xs:enumeration value="checkbox"/>
+ <xs:enumeration value="radio"/>
+ <xs:enumeration value="submit"/>
+ <xs:enumeration value="reset"/>
+ <xs:enumeration value="file"/>
+ <xs:enumeration value="hidden"/>
+ <xs:enumeration value="image"/>
+ <xs:enumeration value="button"/>
+ </xs:restriction>
+ </xs:simpleType>
+ <xs:simpleType>
+ <xs:restriction base="elOnlyExpression"/>
+ </xs:simpleType>
+ </xs:union>
</xs:simpleType>
+
+ <xs:attribute name="checked">
+ <xs:simpleType>
+ <xs:union>
+ <xs:simpleType>
+ <xs:restriction base="xs:token">
+ <xs:enumeration value="checked"/>
+ </xs:restriction>
+ </xs:simpleType>
+ <xs:simpleType>
+ <xs:restriction base="elOnlyExpression"/>
+ </xs:simpleType>
+ </xs:union>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="disabled">
+ <xs:simpleType>
+ <xs:union>
+ <xs:simpleType>
+ <xs:restriction base="xs:token">
+ <xs:enumeration value="disabled"/>
+ </xs:restriction>
+ </xs:simpleType>
+ <xs:simpleType>
+ <xs:restriction base="elOnlyExpression"/>
+ </xs:simpleType>
+ </xs:union>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="readonly">
+ <xs:simpleType>
+ <xs:union>
+ <xs:simpleType>
+ <xs:restriction base="xs:token">
+ <xs:enumeration value="readonly"/>
+ </xs:restriction>
+ </xs:simpleType>
+ <xs:simpleType>
+ <xs:restriction base="elOnlyExpression"/>
+ </xs:simpleType>
+ </xs:union>
+ </xs:simpleType>
+ </xs:attribute>
<xs:element name="input">
<xs:annotation>
@@ -2173,27 +2403,9 @@
</xs:annotation>
</xs:attribute>
<xs:attribute name="value"/>
- <xs:attribute name="checked">
- <xs:simpleType>
- <xs:restriction base="xs:token">
- <xs:enumeration value="checked"/>
- </xs:restriction>
- </xs:simpleType>
- </xs:attribute>
- <xs:attribute name="disabled">
- <xs:simpleType>
- <xs:restriction base="xs:token">
- <xs:enumeration value="disabled"/>
- </xs:restriction>
- </xs:simpleType>
- </xs:attribute>
- <xs:attribute name="readonly">
- <xs:simpleType>
- <xs:restriction base="xs:token">
- <xs:enumeration value="readonly"/>
- </xs:restriction>
- </xs:simpleType>
- </xs:attribute>
+ <xs:attribute ref="checked" />
+ <xs:attribute ref="disabled" />
+ <xs:attribute ref="readonly" />
<xs:attribute name="size"/>
<xs:attribute name="maxlength" type="Number"/>
<xs:attribute name="src" type="URI"/>
@@ -2222,18 +2434,19 @@
<xs:attribute name="size" type="Number"/>
<xs:attribute name="multiple">
<xs:simpleType>
- <xs:restriction base="xs:token">
- <xs:enumeration value="multiple"/>
- </xs:restriction>
+ <xs:union>
+ <xs:simpleType>
+ <xs:restriction base="xs:token">
+ <xs:enumeration value="multiple"/>
+ </xs:restriction>
+ </xs:simpleType>
+ <xs:simpleType>
+ <xs:restriction base="elOnlyExpression"/>
+ </xs:simpleType>
+ </xs:union>
</xs:simpleType>
</xs:attribute>
- <xs:attribute name="disabled">
- <xs:simpleType>
- <xs:restriction base="xs:token">
- <xs:enumeration value="disabled"/>
- </xs:restriction>
- </xs:simpleType>
- </xs:attribute>
+ <xs:attribute ref="disabled" />
<xs:attribute name="tabindex" type="tabindexNumber"/>
<xs:attribute name="onfocus" type="Script"/>
<xs:attribute name="onblur" type="Script"/>
@@ -2252,13 +2465,7 @@
<xs:element maxOccurs="unbounded" ref="option"/>
</xs:sequence>
<xs:attributeGroup ref="attrs"/>
- <xs:attribute name="disabled">
- <xs:simpleType>
- <xs:restriction base="xs:token">
- <xs:enumeration value="disabled"/>
- </xs:restriction>
- </xs:simpleType>
- </xs:attribute>
+ <xs:attribute ref="disabled" />
<xs:attribute name="label" use="required" type="Text"/>
</xs:complexType>
</xs:element>
@@ -2273,18 +2480,19 @@
<xs:attributeGroup ref="attrs"/>
<xs:attribute name="selected">
<xs:simpleType>
- <xs:restriction base="xs:token">
- <xs:enumeration value="selected"/>
- </xs:restriction>
+ <xs:union>
+ <xs:simpleType>
+ <xs:restriction base="xs:token">
+ <xs:enumeration value="selected"/>
+ </xs:restriction>
+ </xs:simpleType>
+ <xs:simpleType>
+ <xs:restriction base="elOnlyExpression"/>
+ </xs:simpleType>
+ </xs:union>
</xs:simpleType>
</xs:attribute>
- <xs:attribute name="disabled">
- <xs:simpleType>
- <xs:restriction base="xs:token">
- <xs:enumeration value="disabled"/>
- </xs:restriction>
- </xs:simpleType>
- </xs:attribute>
+ <xs:attribute ref="disabled" />
<xs:attribute name="label" type="Text"/>
<xs:attribute name="value"/>
</xs:complexType>
@@ -2302,20 +2510,8 @@
<xs:attribute name="name"/>
<xs:attribute name="rows" use="required" type="Number"/>
<xs:attribute name="cols" use="required" type="Number"/>
- <xs:attribute name="disabled">
- <xs:simpleType>
- <xs:restriction base="xs:token">
- <xs:enumeration value="disabled"/>
- </xs:restriction>
- </xs:simpleType>
- </xs:attribute>
- <xs:attribute name="readonly">
- <xs:simpleType>
- <xs:restriction base="xs:token">
- <xs:enumeration value="readonly"/>
- </xs:restriction>
- </xs:simpleType>
- </xs:attribute>
+ <xs:attribute ref="disabled" />
+ <xs:attribute ref="readonly" />
<xs:attribute name="onselect" type="Script"/>
<xs:attribute name="onchange" type="Script"/>
</xs:complexType>
@@ -2347,12 +2543,19 @@
</xs:element>
<xs:simpleType name="LAlign">
- <xs:restriction base="xs:token">
- <xs:enumeration value="top"/>
- <xs:enumeration value="bottom"/>
- <xs:enumeration value="left"/>
- <xs:enumeration value="right"/>
- </xs:restriction>
+ <xs:union>
+ <xs:simpleType>
+ <xs:restriction base="xs:token">
+ <xs:enumeration value="top"/>
+ <xs:enumeration value="bottom"/>
+ <xs:enumeration value="left"/>
+ <xs:enumeration value="right"/>
+ </xs:restriction>
+ </xs:simpleType>
+ <xs:simpleType>
+ <xs:restriction base="elOnlyExpression"/>
+ </xs:simpleType>
+ </xs:union>
</xs:simpleType>
<xs:element name="legend">
@@ -2387,20 +2590,21 @@
<xs:attribute name="value"/>
<xs:attribute name="type" default="submit">
<xs:simpleType>
- <xs:restriction base="xs:token">
- <xs:enumeration value="button"/>
- <xs:enumeration value="submit"/>
- <xs:enumeration value="reset"/>
- </xs:restriction>
+ <xs:union>
+ <xs:simpleType>
+ <xs:restriction base="xs:token">
+ <xs:enumeration value="button"/>
+ <xs:enumeration value="submit"/>
+ <xs:enumeration value="reset"/>
+ </xs:restriction>
+ </xs:simpleType>
+ <xs:simpleType>
+ <xs:restriction base="elOnlyExpression"/>
+ </xs:simpleType>
+ </xs:union>
</xs:simpleType>
</xs:attribute>
- <xs:attribute name="disabled">
- <xs:simpleType>
- <xs:restriction base="xs:token">
- <xs:enumeration value="disabled"/>
- </xs:restriction>
- </xs:simpleType>
- </xs:attribute>
+ <xs:attribute ref="disabled" />
</xs:extension>
</xs:complexContent>
</xs:complexType>
@@ -2438,17 +2642,24 @@
CALS to avoid a name clash with the valign attribute.
</xs:documentation>
</xs:annotation>
- <xs:restriction base="xs:token">
- <xs:enumeration value="void"/>
- <xs:enumeration value="above"/>
- <xs:enumeration value="below"/>
- <xs:enumeration value="hsides"/>
- <xs:enumeration value="lhs"/>
- <xs:enumeration value="rhs"/>
- <xs:enumeration value="vsides"/>
- <xs:enumeration value="box"/>
- <xs:enumeration value="border"/>
- </xs:restriction>
+ <xs:union>
+ <xs:simpleType>
+ <xs:restriction base="xs:token">
+ <xs:enumeration value="void"/>
+ <xs:enumeration value="above"/>
+ <xs:enumeration value="below"/>
+ <xs:enumeration value="hsides"/>
+ <xs:enumeration value="lhs"/>
+ <xs:enumeration value="rhs"/>
+ <xs:enumeration value="vsides"/>
+ <xs:enumeration value="box"/>
+ <xs:enumeration value="border"/>
+ </xs:restriction>
+ </xs:simpleType>
+ <xs:simpleType>
+ <xs:restriction base="elOnlyExpression"/>
+ </xs:simpleType>
+ </xs:union>
</xs:simpleType>
<xs:simpleType name="TRules">
@@ -2460,13 +2671,20 @@
"none" if border is absent or border="0" otherwise "all"
</xs:documentation>
</xs:annotation>
- <xs:restriction base="xs:token">
- <xs:enumeration value="none"/>
- <xs:enumeration value="groups"/>
- <xs:enumeration value="rows"/>
- <xs:enumeration value="cols"/>
- <xs:enumeration value="all"/>
- </xs:restriction>
+ <xs:union>
+ <xs:simpleType>
+ <xs:restriction base="xs:token">
+ <xs:enumeration value="none"/>
+ <xs:enumeration value="groups"/>
+ <xs:enumeration value="rows"/>
+ <xs:enumeration value="cols"/>
+ <xs:enumeration value="all"/>
+ </xs:restriction>
+ </xs:simpleType>
+ <xs:simpleType>
+ <xs:restriction base="elOnlyExpression"/>
+ </xs:simpleType>
+ </xs:union>
</xs:simpleType>
<xs:simpleType name="TAlign">
@@ -2475,11 +2693,18 @@
horizontal placement of table relative to document
</xs:documentation>
</xs:annotation>
- <xs:restriction base="xs:token">
- <xs:enumeration value="left"/>
- <xs:enumeration value="center"/>
- <xs:enumeration value="right"/>
- </xs:restriction>
+ <xs:union>
+ <xs:simpleType>
+ <xs:restriction base="xs:token">
+ <xs:enumeration value="left"/>
+ <xs:enumeration value="center"/>
+ <xs:enumeration value="right"/>
+ </xs:restriction>
+ </xs:simpleType>
+ <xs:simpleType>
+ <xs:restriction base="elOnlyExpression"/>
+ </xs:simpleType>
+ </xs:union>
</xs:simpleType>
<xs:attributeGroup name="cellhalign">
@@ -2493,13 +2718,20 @@
</xs:annotation>
<xs:attribute name="align">
<xs:simpleType>
- <xs:restriction base="xs:token">
- <xs:enumeration value="left"/>
- <xs:enumeration value="center"/>
- <xs:enumeration value="right"/>
- <xs:enumeration value="justify"/>
- <xs:enumeration value="char"/>
- </xs:restriction>
+ <xs:union>
+ <xs:simpleType>
+ <xs:restriction base="xs:token">
+ <xs:enumeration value="left"/>
+ <xs:enumeration value="center"/>
+ <xs:enumeration value="right"/>
+ <xs:enumeration value="justify"/>
+ <xs:enumeration value="char"/>
+ </xs:restriction>
+ </xs:simpleType>
+ <xs:simpleType>
+ <xs:restriction base="elOnlyExpression"/>
+ </xs:simpleType>
+ </xs:union>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="char" type="Character"/>
@@ -2514,12 +2746,19 @@
</xs:annotation>
<xs:attribute name="valign">
<xs:simpleType>
- <xs:restriction base="xs:token">
- <xs:enumeration value="top"/>
- <xs:enumeration value="middle"/>
- <xs:enumeration value="bottom"/>
- <xs:enumeration value="baseline"/>
- </xs:restriction>
+ <xs:union>
+ <xs:simpleType>
+ <xs:restriction base="xs:token">
+ <xs:enumeration value="top"/>
+ <xs:enumeration value="middle"/>
+ <xs:enumeration value="bottom"/>
+ <xs:enumeration value="baseline"/>
+ </xs:restriction>
+ </xs:simpleType>
+ <xs:simpleType>
+ <xs:restriction base="elOnlyExpression"/>
+ </xs:simpleType>
+ </xs:union>
</xs:simpleType>
</xs:attribute>
</xs:attributeGroup>
@@ -2553,12 +2792,19 @@
</xs:element>
<xs:simpleType name="CAlign">
- <xs:restriction base="xs:token">
- <xs:enumeration value="top"/>
- <xs:enumeration value="bottom"/>
- <xs:enumeration value="left"/>
- <xs:enumeration value="right"/>
- </xs:restriction>
+ <xs:union>
+ <xs:simpleType>
+ <xs:restriction base="xs:token">
+ <xs:enumeration value="top"/>
+ <xs:enumeration value="bottom"/>
+ <xs:enumeration value="left"/>
+ <xs:enumeration value="right"/>
+ </xs:restriction>
+ </xs:simpleType>
+ <xs:simpleType>
+ <xs:restriction base="elOnlyExpression"/>
+ </xs:simpleType>
+ </xs:union>
</xs:simpleType>
<xs:element name="caption">
@@ -2682,12 +2928,19 @@
Scope is simpler than headers attribute for common tables
</xs:documentation>
</xs:annotation>
- <xs:restriction base="xs:token">
- <xs:enumeration value="row"/>
- <xs:enumeration value="col"/>
- <xs:enumeration value="rowgroup"/>
- <xs:enumeration value="colgroup"/>
- </xs:restriction>
+ <xs:union>
+ <xs:simpleType>
+ <xs:restriction base="xs:token">
+ <xs:enumeration value="row"/>
+ <xs:enumeration value="col"/>
+ <xs:enumeration value="rowgroup"/>
+ <xs:enumeration value="colgroup"/>
+ </xs:restriction>
+ </xs:simpleType>
+ <xs:simpleType>
+ <xs:restriction base="elOnlyExpression"/>
+ </xs:simpleType>
+ </xs:union>
</xs:simpleType>
<xs:annotation>
@@ -2696,6 +2949,21 @@
</xs:documentation>
</xs:annotation>
+ <xs:attribute name="nowrap">
+ <xs:simpleType>
+ <xs:union>
+ <xs:simpleType>
+ <xs:restriction base="xs:token">
+ <xs:enumeration value="nowrap"/>
+ </xs:restriction>
+ </xs:simpleType>
+ <xs:simpleType>
+ <xs:restriction base="elOnlyExpression"/>
+ </xs:simpleType>
+ </xs:union>
+ </xs:simpleType>
+ </xs:attribute>
+
<xs:element name="th">
<xs:complexType mixed="true">
<xs:complexContent>
@@ -2703,19 +2971,13 @@
<xs:attributeGroup ref="attrs"/>
<xs:attribute name="abbr" type="Text"/>
<xs:attribute name="axis"/>
- <xs:attribute name="headers" type="xs:IDREFS"/>
+ <xs:attribute name="headers" type="IDREFS"/>
<xs:attribute name="scope" type="Scope"/>
<xs:attribute name="rowspan" default="1" type="Number"/>
<xs:attribute name="colspan" default="1" type="Number"/>
<xs:attributeGroup ref="cellhalign"/>
<xs:attributeGroup ref="cellvalign"/>
- <xs:attribute name="nowrap">
- <xs:simpleType>
- <xs:restriction base="xs:token">
- <xs:enumeration value="nowrap"/>
- </xs:restriction>
- </xs:simpleType>
- </xs:attribute>
+ <xs:attribute ref="nowrap" />
<xs:attribute name="bgcolor" type="Color"/>
<xs:attribute name="width" type="Length"/>
<xs:attribute name="height" type="Length"/>
@@ -2731,19 +2993,13 @@
<xs:attributeGroup ref="attrs"/>
<xs:attribute name="abbr" type="Text"/>
<xs:attribute name="axis"/>
- <xs:attribute name="headers" type="xs:IDREFS"/>
+ <xs:attribute name="headers" type="IDREFS"/>
<xs:attribute name="scope" type="Scope"/>
<xs:attribute name="rowspan" default="1" type="Number"/>
<xs:attribute name="colspan" default="1" type="Number"/>
<xs:attributeGroup ref="cellhalign"/>
<xs:attributeGroup ref="cellvalign"/>
- <xs:attribute name="nowrap">
- <xs:simpleType>
- <xs:restriction base="xs:token">
- <xs:enumeration value="nowrap"/>
- </xs:restriction>
- </xs:simpleType>
- </xs:attribute>
+ <xs:attribute ref="nowrap" />
<xs:attribute name="bgcolor" type="Color"/>
<xs:attribute name="width" type="Length"/>
<xs:attribute name="height" type="Length"/>
15 years, 5 months