Introduce XForms support.
authorMathieu Baudier <mbaudier@argeo.org>
Sun, 1 Nov 2020 10:31:10 +0000 (11:31 +0100)
committerMathieu Baudier <mbaudier@argeo.org>
Sun, 1 Nov 2020 10:31:10 +0000 (11:31 +0100)
25 files changed:
dep/org.argeo.suite.dep.ui.rap/pom.xml
knowledge/org.argeo.support.odk/bnd.bnd
knowledge/org.argeo.support.odk/pom.xml
knowledge/org.argeo.support.odk/src/org/argeo/support/odk/odk.cnd [new file with mode: 0644]
knowledge/org.argeo.support.xforms/.classpath [new file with mode: 0644]
knowledge/org.argeo.support.xforms/.gitignore [new file with mode: 0644]
knowledge/org.argeo.support.xforms/.project [new file with mode: 0644]
knowledge/org.argeo.support.xforms/META-INF/.gitignore [new file with mode: 0644]
knowledge/org.argeo.support.xforms/bnd.bnd [new file with mode: 0644]
knowledge/org.argeo.support.xforms/build.properties [new file with mode: 0644]
knowledge/org.argeo.support.xforms/pom.xml [new file with mode: 0644]
knowledge/org.argeo.support.xforms/src/org/argeo/support/xforms/xforms.cnd [new file with mode: 0644]
knowledge/org.argeo.support.xforms/xsd/XForms-Schema.xsd [new file with mode: 0644]
knowledge/pom.xml
org.argeo.entity.api/bnd.bnd
org.argeo.entity.api/src/org/argeo/entity/EntityJcrUtils.java [deleted file]
org.argeo.entity.api/src/org/argeo/entity/EntityNames.java
org.argeo.entity.api/src/org/argeo/entity/EntityType.java
org.argeo.entity.api/src/org/argeo/entity/entity.cnd
org.argeo.suite.core/.project
org.argeo.suite.core/OSGI-INF/maintenanceService.xml [new file with mode: 0644]
org.argeo.suite.core/bnd.bnd
org.argeo.suite.core/build.properties
org.argeo.suite.core/pom.xml
org.argeo.suite.core/src/org/argeo/suite/core/SuiteMaintenanceService.java [new file with mode: 0644]

index bcaa6a481ddc066ae3596a8a8ea99c17c5ae30b0..8cba39e20b5eb14098268262c02616f3604e5764 100644 (file)
                </dependency>
 
                <!-- Argeo Knowledge -->
+               <dependency>
+                       <groupId>org.argeo.suite</groupId>
+                       <artifactId>org.argeo.support.xforms</artifactId>
+                       <version>2.1.16-SNAPSHOT</version>
+               </dependency>
                <dependency>
                        <groupId>org.argeo.suite</groupId>
                        <artifactId>org.argeo.support.odk</artifactId>
index 9db4e0c84b83475b492f88a7272780c50e0cd3e6..caa9dcee01431afc629017903613d091960c23e0 100644 (file)
@@ -1,9 +1,16 @@
-Import-Package:\
-org.osgi.service.http.context,\
-*
+Require-Capability:\
+cms.datamodel;filter:="(name=entity)",\
+cms.datamodel;filter:="(name=xforms)"
+
+Provide-Capability:\
+cms.datamodel; name=odk; cnd=/org/argeo/support/odk/odk.cnd
 
 Service-Component:\
 OSGI-INF/odkServletContext.xml,\
 OSGI-INF/odkFormListServlet.xml,\
 OSGI-INF/odkFormServlet.xml,\
 OSGI-INF/odkSubmissionServlet.xml
+
+Import-Package:\
+org.osgi.service.http.context,\
+*
index 26177c91d3ad6278346f8db2a0376da3591c2306..69cc95e7c4827d1ae5dfaaa7e938c6585e463a2d 100644 (file)
@@ -14,9 +14,9 @@
        <packaging>jar</packaging>
        <dependencies>
                <dependency>
-                       <groupId>org.argeo.commons</groupId>
-                       <artifactId>org.argeo.cms</artifactId>
-                       <version>${version.argeo-commons}</version>
+                       <groupId>org.argeo.suite</groupId>
+                       <artifactId>org.argeo.suite.core</artifactId>
+                       <version>2.1.16-SNAPSHOT</version>
                </dependency>
        </dependencies>
 </project>
diff --git a/knowledge/org.argeo.support.odk/src/org/argeo/support/odk/odk.cnd b/knowledge/org.argeo.support.odk/src/org/argeo/support/odk/odk.cnd
new file mode 100644 (file)
index 0000000..c3f43c8
--- /dev/null
@@ -0,0 +1,39 @@
+<jr = "http://openrosa.org/javarosa">
+<orx = "http://openrosa.org/xforms">
+<orxList = "http://openrosa.org/xforms/xformsList">
+<orxManifest = "http://openrosa.org/xforms/xformsManifest">
+<odk = "http://www.opendatakit.org/xforms">
+
+[orxList:xform]
++ h:html (odk:html) = odk:html
+
+[odk:head]
++ h:title (jcrx:xmlvalue) = jcrx:xmlvalue
++ xforms:model (odk:model) = odk:model
+
+[odk:body] > xforms:ui
+
+
+[odk:html] > mix:referenceable
++ h:head (odk:head) = odk:head
++ h:body (odk:body) = odk:body
+
+[odk:model] > xforms:model
++ odk:setgeopoint (odk:setgeopoint) = odk:setgeopoint
++ xforms:itext (odk:itext) = odk:itext
+
+[odk:itext]
++ xforms:translation (odk:translation) = odk:translation *
+
+[odk:translation]
+- lang (STRING) m
+- default (STRING)
++ xforms:text (odk:text) = odk:text *
+
+[odk:text]
+- id (STRING) m
++ xforms:value (jcrx:xmlvalue) = jcrx:xmlvalue
+
+[odk:setgeopoint]
+- event (STRING)
+- ref (STRING)
diff --git a/knowledge/org.argeo.support.xforms/.classpath b/knowledge/org.argeo.support.xforms/.classpath
new file mode 100644 (file)
index 0000000..e801ebf
--- /dev/null
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+       <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
+       <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+       <classpathentry kind="src" path="src"/>
+       <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/knowledge/org.argeo.support.xforms/.gitignore b/knowledge/org.argeo.support.xforms/.gitignore
new file mode 100644 (file)
index 0000000..09e3bc9
--- /dev/null
@@ -0,0 +1,2 @@
+/bin/
+/target/
diff --git a/knowledge/org.argeo.support.xforms/.project b/knowledge/org.argeo.support.xforms/.project
new file mode 100644 (file)
index 0000000..3c50bfa
--- /dev/null
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+       <name>org.argeo.support.xforms</name>
+       <comment></comment>
+       <projects>
+       </projects>
+       <buildSpec>
+               <buildCommand>
+                       <name>org.eclipse.jdt.core.javabuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+               <buildCommand>
+                       <name>org.eclipse.pde.ManifestBuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+               <buildCommand>
+                       <name>org.eclipse.pde.SchemaBuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+       </buildSpec>
+       <natures>
+               <nature>org.eclipse.pde.PluginNature</nature>
+               <nature>org.eclipse.jdt.core.javanature</nature>
+       </natures>
+</projectDescription>
diff --git a/knowledge/org.argeo.support.xforms/META-INF/.gitignore b/knowledge/org.argeo.support.xforms/META-INF/.gitignore
new file mode 100644 (file)
index 0000000..4854a41
--- /dev/null
@@ -0,0 +1 @@
+/MANIFEST.MF
diff --git a/knowledge/org.argeo.support.xforms/bnd.bnd b/knowledge/org.argeo.support.xforms/bnd.bnd
new file mode 100644 (file)
index 0000000..23c86a9
--- /dev/null
@@ -0,0 +1,5 @@
+Require-Capability:\
+cms.datamodel;filter:="(name=entity)"
+
+Provide-Capability:\
+cms.datamodel; name=xforms; cnd=/org/argeo/support/xforms/xforms.cnd
diff --git a/knowledge/org.argeo.support.xforms/build.properties b/knowledge/org.argeo.support.xforms/build.properties
new file mode 100644 (file)
index 0000000..34d2e4d
--- /dev/null
@@ -0,0 +1,4 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+               .
diff --git a/knowledge/org.argeo.support.xforms/pom.xml b/knowledge/org.argeo.support.xforms/pom.xml
new file mode 100644 (file)
index 0000000..0d75c9a
--- /dev/null
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+       <modelVersion>4.0.0</modelVersion>
+       <parent>
+               <groupId>org.argeo.suite</groupId>
+               <artifactId>knowledge</artifactId>
+               <version>2.1.16-SNAPSHOT</version>
+               <relativePath>..</relativePath>
+       </parent>
+       <artifactId>org.argeo.support.xforms</artifactId>
+       <name>XForms support</name>
+       <packaging>jar</packaging>
+       <dependencies>
+               <dependency>
+                       <groupId>org.argeo.suite</groupId>
+                       <artifactId>org.argeo.suite.core</artifactId>
+                       <version>2.1.16-SNAPSHOT</version>
+               </dependency>
+       </dependencies>
+</project>
diff --git a/knowledge/org.argeo.support.xforms/src/org/argeo/support/xforms/xforms.cnd b/knowledge/org.argeo.support.xforms/src/org/argeo/support/xforms/xforms.cnd
new file mode 100644 (file)
index 0000000..a9f986a
--- /dev/null
@@ -0,0 +1,37 @@
+<xforms = "http://www.w3.org/2002/xforms">
+
+[xforms:model]
++ xforms:instance (nt:base) = nt:unstructured *
++ xforms:bind (xforms:bind) = xforms:bind *
++ xforms:setvalue (xforms:setvalue) = xforms:setvalue *
+
+[xforms:bind]
+- * (STRING)
+
+[xforms:setvalue]
+- * (STRING)
+
+[xforms:select] > xforms:input
++ xforms:itemset (xforms:itemset) = xforms:itemset
+
+[xforms:itemset]
+- nodeset (STRING)
++ xforms:label (jcrx:xmlvalue) = jcrx:xmlvalue
++ xforms:value (jcrx:xmlvalue) = jcrx:xmlvalue
+
+[xforms:ui]
+- * (STRING)
++ xforms:label (jcrx:xmlvalue) = jcrx:xmlvalue *
++ xforms:hint (jcrx:xmlvalue) = jcrx:xmlvalue *
++ xforms:input (xforms:input) = xforms:input *
++ xforms:select (xforms:select) = xforms:select *
++ xforms:select1 (xforms:select) = xforms:select *
++ xforms:trigger (xforms:input) = xforms:input *
++ xforms:upload (xforms:input) = xforms:input *
++ xforms:group (xforms:ui) = xforms:ui *
++ xforms:repeat (xforms:ui) = xforms:ui *
+
+[xforms:input]
+- * (STRING)
++ xforms:label (jcrx:xmlvalue) = jcrx:xmlvalue
++ xforms:hint (jcrx:xmlvalue) = jcrx:xmlvalue *
diff --git a/knowledge/org.argeo.support.xforms/xsd/XForms-Schema.xsd b/knowledge/org.argeo.support.xforms/xsd/XForms-Schema.xsd
new file mode 100644 (file)
index 0000000..6383f86
--- /dev/null
@@ -0,0 +1,858 @@
+<xsd:schema targetNamespace="http://www.w3.org/2002/xforms" xmlns:ev="http://www.w3.org/2001/xml-events" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xforms="http://www.w3.org/2002/xforms" elementFormDefault="qualified">
+ <!--
+  Changes:
+26-Aug MJD fixed typo where more than one child allowed on <instance>
+04-Sep MJD fixed typo on <send> : attribute 'submission' is required
+04-Sep MJD fixed typo on <rebuild><recalculate><revalidate><refresh>: 'model' attribute is required
+06-Sep MJD clarified specific allowed values of @level on <message>
+06-Sep MJD removed UI Common attributes from <help><hint><alert><label>
+09-Sep MJD changed minOccurrs and maxOccurs to use XPath expressions, default values
+09-Sep MJD fixed typo: added linking attributes to <message>
+09-Sep MJD removed <extension> from content models of <mode> and UI common elements
+09-Sep MJD fixed typo: removed 'format' attribute
+17-Sep MJD fixed typo: <output> now uses the attribute group for binding attributes, instead of similarly named individual attrs
+17-Sep MJD added XPathExpression simpleType for internal use. This doesn't actually change anything, but makes
+the Schema a better documentation resource (instead of using xsd:string for everything)
+17-Sep MJD removed 'mediatype' attribute from <submission>, as it was unused
+17-Sep MJD fixed typo: only 'ref' and 'bind' attributes, not 'model' on <submission>
+17-Sep MJD added XML Events attributes to <model>
+17-Sep MJD in accordance with 3.2.1, removed all id attributes
+19-Sep MJD fixed typo: clarified that nested <action>s are permitted.
+19-Sep MJD factor UI.Inline into <group>. Renamed <group>s and <attributeGroup>s to match the prose names
+19-Sep MJD changed to agreed-upon namespace for CR
+25-Sep MJD fixed typo: added UI.Inlne to content model of <message>, enabled mixed content
+29-Sep MJD fixed typo: 'model' required on <reset>
+29-Sep MJD fixed typo: binding attributes allowed on <submit>
+29-Sep MJD fixed typo: explicit enumerated values for 'show' on <load>
+04-Oct MJD 'resource' attribute not required
+
+12-Nov 2002 : Published as CR
+
+13-Jan MJD added new attribute includenamespaceprefixes on <submission>
+13-Jan MJD added UI Common elements to content model of <group>
+03-Feb MJD synchoninzed duration types with 15 Nov Query Operators document
+31-Mar MJD added mediatype attribute on <submission>
+14-May MJD typo : "xsd:NCName"
+26-Jun MJD removed 'accesskey' and 'navindex' (over to host language definition)
+
+01-Aug 2003 : Published as PR
+
+15-Sep MJD final namespace
+15-Sep MJD corrected content model of <value>
+15-Sep MJD changed the name of the import for XML Events to highlight that only the attributes are used
+
+1.0 Second Edition errata
+
+16-Apr 2005 RAM - erratum E4 - optional @model
+16-Apr 2005 RAM - erratum E22 - default value for @show
+16-Apr 2005 RAM - erratum E54 - remove xforms:minOccurs and xforms:maxOccurs
+26-Jun 2005 RAM - erratum E71 - allow an empty case element
+
+16-Jun 2006 JMB - erratum E69 - instance attribute in submission; id in common attributes
+
+15-Aug-2006 CFW - erratum E18 on 2nd ed. Added Action to content model for Case
+
+09-Sep 2006 JMB - non-substantive: explicitly declared some use="optional" settings, 
+                  substantive: erratum E18 on 2nd ed. Declared default false for selected attribute of case
+                  substantive: erratum E21 on 2nd ed. Added multipart-post to enumeration of method attribute
+23-Nov 2006 JMB - substantive: erratum E32 on 2nd ed. switch in repeat
+17-Jul 2007 JMB - substantive: erratum E41 on 2nd ed. version attribute and associated simple types
+-->
+ <xsd:import namespace="http://www.w3.org/2001/xml-events" schemaLocation="http://www.w3.org/MarkUp/SCHEMA/xml-events-attribs-1.xsd"/>
+ <xsd:import namespace="http://www.w3.org/2001/XMLSchema" schemaLocation="http://www.w3.org/2001/XMLSchema.xsd"/>
+ <!--
+structural elements
+-->
+ <xsd:attributeGroup name="Common.Attributes">
+  <xsd:annotation>
+   <xsd:documentation>Attributes for _every_ element in XForms</xsd:documentation>
+  </xsd:annotation>
+                <xsd:attribute name="id" type="xsd:ID" use="optional"/>  
+  <xsd:anyAttribute namespace="##other"/>
+ </xsd:attributeGroup>
+ <xsd:element name="model">
+  <xsd:complexType>
+   <xsd:sequence minOccurs="0" maxOccurs="unbounded">
+    <xsd:choice>
+     <xsd:element ref="xforms:instance"/>
+     <xsd:element ref="xsd:schema"/>
+     <xsd:element ref="xforms:submission"/>
+     <xsd:element ref="xforms:bind"/>
+     <xsd:group ref="xforms:Action"/>
+    </xsd:choice>
+   </xsd:sequence>
+   <xsd:attributeGroup ref="xforms:Common.Attributes"/>
+   <xsd:attributeGroup ref="xforms:XML.Events"/>
+   <xsd:attribute name="functions" type="xforms:QNameList" use="optional"/>
+   <xsd:attribute name="schema" type="xforms:anyURIList" use="optional"/>
+   <xsd:attribute name="version" type="xforms:versionList" use="optional"/>
+  </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="instance">
+  <xsd:annotation>
+   <xsd:documentation>instance container.</xsd:documentation>
+  </xsd:annotation>
+  <xsd:complexType>
+   <xsd:sequence>
+    <xsd:any namespace="##any" processContents="skip" minOccurs="0"/>
+   </xsd:sequence>
+   <xsd:attributeGroup ref="xforms:Common.Attributes"/>
+   <xsd:attributeGroup ref="xforms:Linking.Attributes"/>
+  </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="submission">
+  <xsd:annotation>
+   <xsd:documentation>submit info container.</xsd:documentation>
+  </xsd:annotation>
+  <xsd:complexType>
+   <xsd:sequence minOccurs="0" maxOccurs="unbounded">
+    <xsd:group ref="xforms:Action"/>
+   </xsd:sequence>
+
+   <xsd:attributeGroup ref="xforms:Common.Attributes"/>
+
+   <xsd:attribute name="ref" type="xforms:XPathExpression" use="optional"/>
+   <xsd:attribute name="bind" type="xsd:IDREF" use="optional"/>
+   <xsd:attribute name="action" type="xsd:anyURI" use="optional"/>
+
+   <xsd:attribute name="method" use="required">
+    <xsd:simpleType>
+     <xsd:union memberTypes="xforms:QNameButNotNCNAME">
+      <xsd:simpleType>
+       <xsd:restriction base="xsd:string">
+        <xsd:enumeration value="post"/>
+        <xsd:enumeration value="put"/>
+        <xsd:enumeration value="get"/>
+        <xsd:enumeration value="multipart-post"/>
+        <xsd:enumeration value="form-data-post"/>
+        <xsd:enumeration value="urlencoded-post"/>
+       </xsd:restriction>
+      </xsd:simpleType>
+     </xsd:union>
+    </xsd:simpleType>
+   </xsd:attribute>
+
+   <xsd:attribute name="version" type="xsd:NMTOKEN" use="optional"/>
+   <xsd:attribute name="indent" type="xsd:boolean" use="optional"/>
+   <xsd:attribute name="mediatype" type="xsd:string" use="optional"/>
+   <xsd:attribute name="encoding" type="xsd:string" use="optional"/>
+   <xsd:attribute name="omit-xml-declaration" type="xsd:boolean" use="optional"/>
+   <xsd:attribute name="standalone" type="xsd:boolean" use="optional"/>
+   <xsd:attribute name="cdata-section-elements" type="xforms:QNameList" use="optional"/>
+
+                       <xsd:attribute name="replace" use="optional" default="all">
+    <xsd:simpleType>
+     <xsd:union memberTypes="xforms:QNameButNotNCNAME">
+      <xsd:simpleType>
+       <xsd:restriction base="xsd:string">
+        <xsd:enumeration value="all"/>
+        <xsd:enumeration value="instance"/>
+        <xsd:enumeration value="none"/>
+       </xsd:restriction>
+      </xsd:simpleType>
+     </xsd:union>
+    </xsd:simpleType>
+   </xsd:attribute>
+
+                        <xsd:attribute name="instance" type="xsd:IDREF" use="optional"/>
+
+   <xsd:attribute name="separator" use="optional" default=";">
+    <xsd:simpleType>
+     <xsd:restriction base="xsd:string">
+      <xsd:enumeration value=";"/>
+      <xsd:enumeration value="&amp;"/>
+     </xsd:restriction>
+    </xsd:simpleType>
+   </xsd:attribute>
+
+                        <xsd:attribute name="includenamespaceprefixes" use="optional">
+                          <xsd:simpleType>
+                            <xsd:list>
+                              <xsd:simpleType>
+                                <xsd:union>
+                                  <xsd:simpleType>
+                                    <xsd:restriction base='xsd:NCName'/>
+                                  </xsd:simpleType>
+                                  <xsd:simpleType>
+                                    <xsd:restriction base='xsd:string'>
+                                      <xsd:enumeration value='#default'/>
+                                    </xsd:restriction>
+                                  </xsd:simpleType>
+                                </xsd:union>
+                              </xsd:simpleType>
+                            </xsd:list>
+                          </xsd:simpleType>
+                        </xsd:attribute>
+
+  </xsd:complexType>
+ </xsd:element>
+ <xsd:attributeGroup name="Linking.Attributes">
+  <xsd:attribute name="src" type="xsd:anyURI"/>
+ </xsd:attributeGroup>
+ <xsd:element name="bind">
+  <xsd:annotation>
+   <xsd:documentation>Definition of bind container.</xsd:documentation>
+  </xsd:annotation>
+  <xsd:complexType>
+   <xsd:sequence minOccurs="0" maxOccurs="unbounded">
+    <xsd:element ref="xforms:bind"/>
+   </xsd:sequence>
+   <xsd:attributeGroup ref="xforms:Common.Attributes"/>
+   <xsd:attribute name="nodeset" type="xforms:XPathExpression" use="optional"/>
+   <xsd:attribute name="type" type="xsd:QName" use="optional"/>
+   <xsd:attribute name="readonly" type="xforms:XPathExpression" use="optional"/>
+   <xsd:attribute name="required" type="xforms:XPathExpression" use="optional"/>
+   <xsd:attribute name="relevant" type="xforms:XPathExpression" use="optional"/>
+   <xsd:attribute name="constraint" type="xforms:XPathExpression" use="optional"/>
+   <xsd:attribute name="calculate" type="xforms:XPathExpression" use="optional"/>
+   <xsd:attribute name="p3ptype" type="xsd:string" use="optional"/>
+   <!-- E54 -->
+  </xsd:complexType>
+ </xsd:element>
+ <!--
+User Interface form controls
+-->
+ <xsd:group name="Form.Controls">
+  <xsd:choice>
+   <xsd:element ref="xforms:input"/>
+   <xsd:element ref="xforms:textarea"/>
+   <xsd:element ref="xforms:secret"/>
+   <xsd:element ref="xforms:output"/>
+   <xsd:element ref="xforms:upload"/>
+   <xsd:element ref="xforms:select1"/>
+   <xsd:element ref="xforms:select"/>
+   <xsd:element ref="xforms:range"/>
+   <xsd:element ref="xforms:submit"/>
+   <xsd:element ref="xforms:trigger"/>
+  </xsd:choice>
+ </xsd:group>
+ <xsd:attributeGroup name="Single.Node.Binding.Attributes">
+  <xsd:attribute name="model" type="xsd:IDREF" use="optional"/>
+  <xsd:attribute name="ref" type="xforms:XPathExpression" use="optional"/>
+  <xsd:attribute name="bind" type="xsd:IDREF" use="optional"/>
+ </xsd:attributeGroup>
+ <xsd:attributeGroup name="Nodeset.Binding.Attributes">
+  <xsd:attribute name="model" type="xsd:IDREF" use="optional"/>
+  <xsd:attribute name="nodeset" type="xforms:XPathExpression" use="optional"/>
+  <xsd:attribute name="bind" type="xsd:IDREF" use="optional"/>
+ </xsd:attributeGroup>
+ <xsd:attributeGroup name="UI.Common.Attrs">
+  <xsd:attribute name="appearance" type="xforms:appearanceType" use="optional"/>
+ </xsd:attributeGroup>
+ <xsd:group name="UI.Inline">
+  <xsd:sequence>
+   <xsd:choice minOccurs="0">
+    <xsd:element ref="xforms:output"/>
+    <!-- containing document language to add additional allowed content here -->
+   </xsd:choice>
+  </xsd:sequence>
+ </xsd:group>
+ <xsd:element name="label">
+  <xsd:complexType mixed="true">
+   <xsd:group ref="xforms:UI.Inline"/>
+   <xsd:attributeGroup ref="xforms:Common.Attributes"/>
+   <xsd:attributeGroup ref="xforms:Single.Node.Binding.Attributes"/>
+   <xsd:attributeGroup ref="xforms:Linking.Attributes"/>
+  </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="hint">
+  <xsd:complexType mixed="true">
+   <xsd:group ref="xforms:UI.Inline"/>
+   <xsd:attributeGroup ref="xforms:Common.Attributes"/>
+   <xsd:attributeGroup ref="xforms:Single.Node.Binding.Attributes"/>
+   <xsd:attributeGroup ref="xforms:Linking.Attributes"/>
+  </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="help">
+  <xsd:complexType mixed="true">
+   <xsd:group ref="xforms:UI.Inline"/>
+   <xsd:attributeGroup ref="xforms:Common.Attributes"/>
+   <xsd:attributeGroup ref="xforms:Single.Node.Binding.Attributes"/>
+   <xsd:attributeGroup ref="xforms:Linking.Attributes"/>
+  </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="alert">
+  <xsd:complexType mixed="true">
+   <xsd:group ref="xforms:UI.Inline"/>
+   <xsd:attributeGroup ref="xforms:Common.Attributes"/>
+   <xsd:attributeGroup ref="xforms:Single.Node.Binding.Attributes"/>
+   <xsd:attributeGroup ref="xforms:Linking.Attributes"/>
+  </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="extension">
+  <xsd:complexType>
+   <xsd:sequence>
+    <xsd:any namespace="##other"/>
+   </xsd:sequence>
+   <xsd:attributeGroup ref="xforms:Common.Attributes"/>
+  </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="choices">
+  <xsd:complexType>
+   <xsd:sequence>
+    <xsd:element ref="xforms:label" minOccurs="0"/>
+    <xsd:sequence maxOccurs="unbounded">
+     <xsd:choice>
+      <xsd:element ref="xforms:choices"/>
+      <xsd:element ref="xforms:item"/>
+      <xsd:element ref="xforms:itemset"/>
+     </xsd:choice>
+    </xsd:sequence>
+   </xsd:sequence>
+   <xsd:attributeGroup ref="xforms:Common.Attributes"/>
+  </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="value">
+  <xsd:complexType mixed="true">
+   <xsd:sequence>
+    <xsd:any namespace="##any" processContents="skip" minOccurs="0" maxOccurs="unbounded"/>
+   </xsd:sequence>
+   <xsd:attributeGroup ref="xforms:Common.Attributes"/>
+   <xsd:attributeGroup ref="xforms:Single.Node.Binding.Attributes"/>
+  </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="item">
+  <xsd:complexType>
+   <xsd:sequence>
+    <xsd:element ref="xforms:label"/>
+    <xsd:element ref="xforms:value"/>
+    <xsd:group ref="xforms:UI.Common" minOccurs="0" maxOccurs="unbounded"/>
+   </xsd:sequence>
+   <xsd:attributeGroup ref="xforms:Common.Attributes"/>
+  </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="itemset">
+  <xsd:complexType>
+   <xsd:sequence>
+    <xsd:element ref="xforms:label"/>
+    <xsd:choice>
+     <xsd:element ref="xforms:value"/>
+     <xsd:element ref="xforms:copy"/>
+    </xsd:choice>
+    <xsd:group ref="xforms:UI.Common" minOccurs="0" maxOccurs="unbounded"/>
+   </xsd:sequence>
+   <xsd:attributeGroup ref="xforms:Common.Attributes"/>
+   <xsd:attributeGroup ref="xforms:Nodeset.Binding.Attributes"/>
+  </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="copy">
+  <xsd:complexType>
+   <xsd:attributeGroup ref="xforms:Common.Attributes"/>
+   <xsd:attributeGroup ref="xforms:Single.Node.Binding.Attributes"/>
+  </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="filename">
+  <xsd:complexType>
+   <xsd:attributeGroup ref="xforms:Common.Attributes"/>
+   <xsd:attributeGroup ref="xforms:Single.Node.Binding.Attributes"/>
+  </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="mediatype">
+  <xsd:complexType>
+   <xsd:attributeGroup ref="xforms:Common.Attributes"/>
+   <xsd:attributeGroup ref="xforms:Single.Node.Binding.Attributes"/>
+  </xsd:complexType>
+ </xsd:element>
+ <xsd:group name="UI.Common">
+  <xsd:sequence>
+   <xsd:choice minOccurs="0" maxOccurs="unbounded">
+    <xsd:element ref="xforms:help"/>
+    <xsd:element ref="xforms:hint"/>
+    <xsd:element ref="xforms:alert"/>
+    <xsd:group ref="xforms:Action"/>
+   </xsd:choice>
+  </xsd:sequence>
+ </xsd:group>
+ <xsd:element name="input">
+  <xsd:complexType>
+   <xsd:sequence>
+    <xsd:element ref="xforms:label"/>
+    <xsd:group ref="xforms:UI.Common" minOccurs="0" maxOccurs="unbounded"/>
+   </xsd:sequence>
+   <xsd:attributeGroup ref="xforms:Common.Attributes"/>
+   <xsd:attributeGroup ref="xforms:Single.Node.Binding.Attributes"/>
+   <xsd:attribute name="inputmode" type="xsd:string" use="optional"/>
+   <xsd:attributeGroup ref="xforms:UI.Common.Attrs"/>
+   <xsd:attribute name="incremental" type="xsd:boolean" use="optional" default="false"/>
+  </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="textarea">
+  <xsd:complexType>
+   <xsd:sequence>
+    <xsd:element ref="xforms:label"/>
+    <xsd:group ref="xforms:UI.Common" minOccurs="0" maxOccurs="unbounded"/>
+   </xsd:sequence>
+   <xsd:attributeGroup ref="xforms:Common.Attributes"/>
+   <xsd:attributeGroup ref="xforms:Single.Node.Binding.Attributes"/>
+   <xsd:attribute name="inputmode" type="xsd:string" use="optional"/>
+   <xsd:attributeGroup ref="xforms:UI.Common.Attrs"/>
+   <xsd:attribute name="incremental" type="xsd:boolean" use="optional" default="false"/>
+  </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="secret">
+  <xsd:complexType>
+   <xsd:sequence>
+    <xsd:element ref="xforms:label"/>
+    <xsd:group ref="xforms:UI.Common" minOccurs="0" maxOccurs="unbounded"/>
+   </xsd:sequence>
+   <xsd:attributeGroup ref="xforms:Common.Attributes"/>
+   <xsd:attributeGroup ref="xforms:Single.Node.Binding.Attributes"/>
+   <xsd:attribute name="inputmode" type="xsd:string" use="optional"/>
+   <xsd:attributeGroup ref="xforms:UI.Common.Attrs"/>
+   <xsd:attribute name="incremental" type="xsd:boolean" use="optional" default="false"/>
+  </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="upload">
+  <xsd:complexType>
+   <xsd:sequence>
+    <xsd:element ref="xforms:label"/>
+    <xsd:element ref="xforms:filename" minOccurs="0"/>
+    <xsd:element ref="xforms:mediatype" minOccurs="0"/>
+    <xsd:group ref="xforms:UI.Common" minOccurs="0" maxOccurs="unbounded"/>
+   </xsd:sequence>
+   <xsd:attributeGroup ref="xforms:Common.Attributes"/>
+   <xsd:attributeGroup ref="xforms:Single.Node.Binding.Attributes"/>
+   <xsd:attributeGroup ref="xforms:UI.Common.Attrs"/>
+   <xsd:attribute name="mediatype" type="xsd:string" use="optional"/>
+   <xsd:attribute name="incremental" type="xsd:boolean" use="optional" default="false"/>
+  </xsd:complexType>
+ </xsd:element>
+ <xsd:group name="List.UI.Common">
+  <xsd:sequence>
+   <xsd:choice>
+    <xsd:element ref="xforms:item"/>
+    <xsd:element ref="xforms:itemset"/>
+    <xsd:element ref="xforms:choices"/>
+   </xsd:choice>
+  </xsd:sequence>
+ </xsd:group>
+ <xsd:element name="select1">
+  <xsd:complexType>
+   <xsd:sequence>
+    <xsd:element ref="xforms:label"/>
+    <xsd:group ref="xforms:List.UI.Common" maxOccurs="unbounded"/>
+    <xsd:group ref="xforms:UI.Common" minOccurs="0" maxOccurs="unbounded"/>
+   </xsd:sequence>
+   <xsd:attributeGroup ref="xforms:Common.Attributes"/>
+   <xsd:attributeGroup ref="xforms:Single.Node.Binding.Attributes"/>
+   <xsd:attributeGroup ref="xforms:UI.Common.Attrs"/>
+   <xsd:attribute name="selection" use="optional" default="closed">
+    <xsd:simpleType>
+     <xsd:restriction base="xsd:string">
+      <xsd:enumeration value="open"/>
+      <xsd:enumeration value="closed"/>
+     </xsd:restriction>
+    </xsd:simpleType>
+   </xsd:attribute>
+   <xsd:attribute name="incremental" type="xsd:boolean" use="optional" default="true"/>
+  </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="select">
+  <xsd:complexType>
+   <xsd:sequence>
+    <xsd:element ref="xforms:label"/>
+    <xsd:group ref="xforms:List.UI.Common" maxOccurs="unbounded"/>
+    <xsd:group ref="xforms:UI.Common" minOccurs="0" maxOccurs="unbounded"/>
+   </xsd:sequence>
+   <xsd:attributeGroup ref="xforms:Common.Attributes"/>
+   <xsd:attributeGroup ref="xforms:Single.Node.Binding.Attributes"/>
+   <xsd:attributeGroup ref="xforms:UI.Common.Attrs"/>
+   <xsd:attribute name="selection" use="optional" default="closed">
+    <xsd:simpleType>
+     <xsd:restriction base="xsd:string">
+      <xsd:enumeration value="open"/>
+      <xsd:enumeration value="closed"/>
+     </xsd:restriction>
+    </xsd:simpleType>
+   </xsd:attribute>
+   <xsd:attribute name="incremental" type="xsd:boolean" use="optional" default="true"/>
+  </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="range">
+  <xsd:complexType>
+   <xsd:sequence>
+    <xsd:element ref="xforms:label"/>
+    <xsd:group ref="xforms:UI.Common" minOccurs="0" maxOccurs="unbounded"/>
+   </xsd:sequence>
+   <xsd:attributeGroup ref="xforms:Common.Attributes"/>
+   <xsd:attributeGroup ref="xforms:Single.Node.Binding.Attributes"/>
+   <xsd:attributeGroup ref="xforms:UI.Common.Attrs"/>
+   <xsd:attribute name="start" type="xsd:string" use="optional"/>
+   <xsd:attribute name="end" type="xsd:string" use="optional"/>
+   <xsd:attribute name="step" type="xsd:string" use="optional"/>
+   <xsd:attribute name="incremental" type="xsd:boolean" use="optional" default="false"/>
+  </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="trigger">
+  <xsd:complexType>
+   <xsd:sequence>
+    <xsd:element ref="xforms:label"/>
+    <xsd:group ref="xforms:UI.Common" minOccurs="0" maxOccurs="unbounded"/>
+   </xsd:sequence>
+   <xsd:attributeGroup ref="xforms:Common.Attributes"/>
+   <xsd:attributeGroup ref="xforms:Single.Node.Binding.Attributes"/>
+   <xsd:attributeGroup ref="xforms:UI.Common.Attrs"/>
+  </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="output">
+  <xsd:complexType>
+   <xsd:sequence minOccurs="0">
+    <xsd:element ref="xforms:label"/>
+   </xsd:sequence>
+   <xsd:attributeGroup ref="xforms:Common.Attributes"/>
+   <xsd:attributeGroup ref="xforms:Single.Node.Binding.Attributes"/>
+   <xsd:attribute name="appearance" type="xforms:appearanceType" use="optional"/>
+   <xsd:attribute name="value" type="xforms:XPathExpression" use="optional"/>
+  </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="submit">
+  <xsd:complexType>
+   <xsd:sequence>
+    <xsd:element ref="xforms:label"/>
+    <xsd:group ref="xforms:UI.Common" minOccurs="0" maxOccurs="unbounded"/>
+   </xsd:sequence>
+   <xsd:attributeGroup ref="xforms:Common.Attributes"/>
+   <xsd:attribute name="submission" type="xsd:IDREF" use="required"/>
+   <xsd:attributeGroup ref="xforms:Single.Node.Binding.Attributes"/>
+   <xsd:attributeGroup ref="xforms:UI.Common.Attrs"/>
+  </xsd:complexType>
+ </xsd:element>
+ <!--
+XForms Actions
+-->
+ <xsd:attributeGroup name="XML.Events">
+  <xsd:attribute ref="ev:event"/>
+  <xsd:attribute ref="ev:observer"/>
+  <xsd:attribute ref="ev:target"/>
+  <xsd:attribute ref="ev:handler"/>
+  <xsd:attribute ref="ev:phase"/>
+  <xsd:attribute ref="ev:propagate"/>
+  <xsd:attribute ref="ev:defaultAction"/>
+ </xsd:attributeGroup>
+ <xsd:group name="Action">
+  <xsd:sequence>
+   <xsd:choice minOccurs="0" maxOccurs="unbounded">
+    <xsd:element ref="xforms:action"/>
+    <xsd:element ref="xforms:dispatch"/>
+    <xsd:element ref="xforms:rebuild"/>
+    <xsd:element ref="xforms:recalculate"/>
+    <xsd:element ref="xforms:revalidate"/>
+    <xsd:element ref="xforms:refresh"/>
+    <xsd:element ref="xforms:setfocus"/>
+    <xsd:element ref="xforms:load"/>
+    <xsd:element ref="xforms:setvalue"/>
+    <xsd:element ref="xforms:send"/>
+    <xsd:element ref="xforms:reset"/>
+    <xsd:element ref="xforms:insert"/>
+    <xsd:element ref="xforms:delete"/>
+    <xsd:element ref="xforms:setindex"/>
+    <xsd:element ref="xforms:toggle"/>
+    <xsd:element ref="xforms:message"/>
+   </xsd:choice>
+  </xsd:sequence>
+ </xsd:group>
+ <xsd:element name="action">
+  <xsd:complexType>
+   <xsd:sequence maxOccurs="unbounded">
+    <xsd:group ref="xforms:Action"/>
+   </xsd:sequence>
+   <xsd:attributeGroup ref="xforms:Common.Attributes"/>
+   <xsd:attributeGroup ref="xforms:XML.Events"/>
+  </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="dispatch">
+  <xsd:complexType>
+   <xsd:attributeGroup ref="xforms:Common.Attributes"/>
+   <xsd:attribute name="name" type="xsd:NMTOKEN" use="required"/>
+   <xsd:attribute name="target" type="xsd:IDREF" use="required"/>
+   <xsd:attribute name="bubbles" type="xsd:boolean" use="optional" default="true"/>
+   <xsd:attribute name="cancelable" type="xsd:boolean" use="optional" default="true"/>
+   <xsd:attributeGroup ref="xforms:XML.Events"/>
+  </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="rebuild">
+  <xsd:complexType>
+   <xsd:attributeGroup ref="xforms:Common.Attributes"/>
+   <xsd:attribute name="model" type="xsd:IDREF" use="optional"/>
+   <xsd:attributeGroup ref="xforms:XML.Events"/>
+   <!-- E4 -->
+  </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="revalidate">
+  <xsd:complexType>
+   <xsd:attributeGroup ref="xforms:Common.Attributes"/>
+   <xsd:attribute name="model" type="xsd:IDREF" use="optional"/>
+   <xsd:attributeGroup ref="xforms:XML.Events"/>
+   <!-- E4 -->
+  </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="recalculate">
+  <xsd:complexType>
+   <xsd:attributeGroup ref="xforms:Common.Attributes"/>
+   <xsd:attribute name="model" type="xsd:IDREF" use="optional"/>
+   <xsd:attributeGroup ref="xforms:XML.Events"/>
+   <!-- E4 -->
+  </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="refresh">
+  <xsd:complexType>
+   <xsd:attributeGroup ref="xforms:Common.Attributes"/>
+   <xsd:attribute name="model" type="xsd:IDREF" use="optional"/>
+   <xsd:attributeGroup ref="xforms:XML.Events"/>
+   <!-- E4 -->
+  </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="setfocus">
+  <xsd:complexType>
+   <xsd:attributeGroup ref="xforms:Common.Attributes"/>
+   <xsd:attribute name="control" type="xsd:IDREF" use="required"/>
+   <xsd:attributeGroup ref="xforms:XML.Events"/>
+  </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="load">
+  <xsd:complexType>
+   <xsd:attributeGroup ref="xforms:Common.Attributes"/>
+   <xsd:attributeGroup ref="xforms:Single.Node.Binding.Attributes"/>
+   <xsd:attribute name="resource" type="xsd:anyURI"/>
+   <xsd:attribute name="show" use="optional" default="replace">
+    <xsd:simpleType>
+     <xsd:restriction base="xsd:string">
+      <xsd:enumeration value="new"/>
+      <xsd:enumeration value="replace"/>
+     </xsd:restriction>
+    </xsd:simpleType>
+    <!-- E22 -->
+   </xsd:attribute>
+   <xsd:attributeGroup ref="xforms:XML.Events"/>
+  </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="setvalue">
+  <xsd:complexType>
+   <xsd:simpleContent>
+    <xsd:extension base="xsd:string">
+     <xsd:attributeGroup ref="xforms:Common.Attributes"/>
+     <xsd:attributeGroup ref="xforms:Single.Node.Binding.Attributes"/>
+     <xsd:attribute name="value" type="xforms:XPathExpression" use="optional"/>
+     <xsd:attributeGroup ref="xforms:XML.Events"/>
+    </xsd:extension>
+   </xsd:simpleContent>
+  </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="send">
+  <xsd:complexType>
+   <xsd:attributeGroup ref="xforms:Common.Attributes"/>
+   <xsd:attribute name="submission" type="xsd:IDREF" use="required"/>
+   <xsd:attributeGroup ref="xforms:XML.Events"/>
+  </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="reset">
+  <xsd:complexType>
+   <xsd:attributeGroup ref="xforms:Common.Attributes"/>
+   <xsd:attributeGroup ref="xforms:XML.Events"/>
+   <xsd:attribute name="model" type="xsd:IDREF" use="optional"/>
+   <!-- E4 -->
+  </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="insert">
+  <xsd:complexType>
+   <xsd:attributeGroup ref="xforms:Common.Attributes"/>
+   <xsd:attributeGroup ref="xforms:Nodeset.Binding.Attributes"/>
+   <xsd:attribute name="at" type="xforms:XPathExpression" use="required"/>
+   <xsd:attribute name="position" use="required">
+    <xsd:simpleType>
+     <xsd:restriction base="xsd:string">
+      <xsd:enumeration value="before"/>
+      <xsd:enumeration value="after"/>
+     </xsd:restriction>
+    </xsd:simpleType>
+   </xsd:attribute>
+   <xsd:attributeGroup ref="xforms:XML.Events"/>
+  </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="delete">
+  <xsd:complexType>
+   <xsd:attributeGroup ref="xforms:Common.Attributes"/>
+   <xsd:attributeGroup ref="xforms:Nodeset.Binding.Attributes"/>
+   <xsd:attribute name="at" type="xforms:XPathExpression" use="required"/>
+   <xsd:attributeGroup ref="xforms:XML.Events"/>
+  </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="setindex">
+  <xsd:complexType>
+   <xsd:attributeGroup ref="xforms:Common.Attributes"/>
+   <xsd:attribute name="repeat" type="xsd:IDREF" use="required"/>
+   <xsd:attribute name="index" type="xforms:XPathExpression" use="required"/>
+   <xsd:attributeGroup ref="xforms:XML.Events"/>
+  </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="toggle">
+  <xsd:complexType>
+   <xsd:attributeGroup ref="xforms:Common.Attributes"/>
+   <xsd:attribute name="case" type="xsd:IDREF" use="required"/>
+   <xsd:attributeGroup ref="xforms:XML.Events"/>
+  </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="message">
+  <xsd:complexType mixed="true">
+   <xsd:group ref="xforms:UI.Inline"/>
+   <xsd:attributeGroup ref="xforms:Common.Attributes"/>
+   <xsd:attributeGroup ref="xforms:Single.Node.Binding.Attributes"/>
+   <xsd:attribute name="level" use="required">
+    <xsd:simpleType>
+     <xsd:union memberTypes="xforms:QNameButNotNCNAME">
+      <xsd:simpleType>
+       <xsd:restriction base="xsd:string">
+        <xsd:enumeration value="ephemeral"/>
+        <xsd:enumeration value="modeless"/>
+        <xsd:enumeration value="modal"/>
+       </xsd:restriction>
+      </xsd:simpleType>
+     </xsd:union>
+    </xsd:simpleType>
+   </xsd:attribute>
+   <xsd:attributeGroup ref="xforms:Linking.Attributes"/>
+   <xsd:attributeGroup ref="xforms:XML.Events"/>
+  </xsd:complexType>
+ </xsd:element>
+ <!--
+Advanced User Interface
+-->
+ <xsd:attribute name="repeat-nodeset" type="xforms:XPathExpression"/>
+ <xsd:attribute name="repeat-model" type="xsd:IDREF"/>
+ <xsd:attribute name="repeat-bind" type="xsd:IDREF"/>
+ <xsd:attribute name="repeat-startindex" type="xsd:positiveInteger"/>
+ <xsd:attribute name="repeat-number" type="xsd:nonNegativeInteger"/>
+ <xsd:element name="repeat">
+  <xsd:complexType>
+   <xsd:sequence>
+    <xsd:sequence minOccurs="0" maxOccurs="unbounded">
+     <xsd:choice>
+      <xsd:group ref="xforms:Form.Controls"/>
+      <xsd:element ref="xforms:group"/>
+      <xsd:element ref="xforms:switch"/>
+      <xsd:element ref="xforms:repeat"/>
+      <!-- containing document language to add additional allowed content here -->
+     </xsd:choice>
+    </xsd:sequence>
+   </xsd:sequence>
+   <xsd:attributeGroup ref="xforms:Common.Attributes"/>
+   <xsd:attributeGroup ref="xforms:Nodeset.Binding.Attributes"/>
+   <xsd:attributeGroup ref="xforms:UI.Common.Attrs"/>
+   <xsd:attribute name="startindex" type="xsd:positiveInteger"/>
+   <xsd:attribute name="number" type="xsd:nonNegativeInteger"/>
+  </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="group">
+  <xsd:complexType>
+   <xsd:sequence>
+    <xsd:element ref="xforms:label" minOccurs="0"/>
+    <xsd:sequence minOccurs="0" maxOccurs="unbounded">
+     <xsd:choice>
+      <xsd:group ref="xforms:UI.Common"/>
+      <xsd:group ref="xforms:Form.Controls"/>
+      <xsd:element ref="xforms:group"/>
+      <xsd:element ref="xforms:switch"/>
+      <xsd:element ref="xforms:repeat"/>
+      <!-- containing document language to add additional allowed content here -->
+     </xsd:choice>
+    </xsd:sequence>
+   </xsd:sequence>
+   <xsd:attributeGroup ref="xforms:Common.Attributes"/>
+   <xsd:attributeGroup ref="xforms:Single.Node.Binding.Attributes"/>
+   <xsd:attributeGroup ref="xforms:UI.Common.Attrs"/>
+  </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="switch">
+  <xsd:complexType>
+   <xsd:sequence maxOccurs="unbounded">
+    <xsd:element ref="xforms:case"/>
+   </xsd:sequence>
+   <xsd:attributeGroup ref="xforms:Common.Attributes"/>
+   <xsd:attributeGroup ref="xforms:Single.Node.Binding.Attributes"/>
+   <xsd:attributeGroup ref="xforms:UI.Common.Attrs"/>
+  </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="case">
+  <xsd:complexType>
+   <xsd:sequence>
+    <xsd:element ref="xforms:label" minOccurs="0"/>
+    <xsd:sequence minOccurs="0" maxOccurs="unbounded">
+     <xsd:choice>
+      <xsd:group ref="xforms:Form.Controls"/>
+      <xsd:group ref="xforms:Action"/>
+      <xsd:element ref="xforms:group"/>
+      <xsd:element ref="xforms:switch"/>
+      <xsd:element ref="xforms:repeat"/>
+      <!-- containing document language to add additional allowed content here -->
+     </xsd:choice>
+     <!-- E71 -->
+    </xsd:sequence>
+   </xsd:sequence>
+   <xsd:attribute name="selected" type="xsd:boolean" use="optional" default="false"/>
+   <xsd:attributeGroup ref="xforms:Common.Attributes"/>
+  </xsd:complexType>
+ </xsd:element>
+ <!--
+New simpleTypes
+-->
+
+ <xsd:simpleType name="versionList">
+  <xsd:list itemType="xforms:versionNumber"/>
+ </xsd:simpleType>
+ <xsd:simpleType name="versionNumber">
+  <xsd:restriction base="xsd:string">
+   <xsd:pattern value="[1-9]\d*\.\d+"/>
+  </xsd:restriction>
+ </xsd:simpleType>
+ <xsd:simpleType name="XPathExpression">
+  <xsd:restriction base="xsd:string"/>
+ </xsd:simpleType>
+ <xsd:simpleType name="QNameList">
+  <xsd:list itemType="xsd:QName"/>
+ </xsd:simpleType>
+ <xsd:simpleType name="anyURIList">
+  <xsd:list itemType="xsd:anyURI"/>
+ </xsd:simpleType>
+ <xsd:simpleType name="QNameButNotNCNAME">
+  <xsd:restriction base="xsd:QName">
+   <xsd:pattern value="[^:]+:[^:]+"/>
+  </xsd:restriction>
+ </xsd:simpleType>
+ <xsd:simpleType name="appearanceType">
+  <xsd:union memberTypes="xforms:QNameButNotNCNAME">
+   <xsd:simpleType>
+    <xsd:restriction base="xsd:string">
+     <xsd:enumeration value="full"/>
+     <xsd:enumeration value="compact"/>
+     <xsd:enumeration value="minimal"/>
+    </xsd:restriction>
+   </xsd:simpleType>
+  </xsd:union>
+ </xsd:simpleType>
+ <xsd:simpleType name="listItem">
+  <xsd:restriction base="xsd:string">
+   <xsd:pattern value="\S+"/>
+  </xsd:restriction>
+ </xsd:simpleType>
+ <xsd:simpleType name="listItems">
+  <xsd:list itemType="xforms:listItem"/>
+ </xsd:simpleType>
+ <xsd:simpleType name="dayTimeDuration">
+  <xsd:restriction base="xsd:duration">
+   <xsd:pattern value="[\-]?P([0-9]+D(T([0-9]+(H([0-9]+(M([0-9]+(\.[0-9]*)?S
+               |\.[0-9]+S)?|(\.[0-9]*)?S)|(\.[0-9]*)?S)?|M([0-9]+
+               (\.[0-9]*)?S|\.[0-9]+S)?|(\.[0-9]*)?S)|\.[0-9]+S))?
+               |T([0-9]+(H([0-9]+(M([0-9]+(\.[0-9]*)?S|\.[0-9]+S)?
+               |(\.[0-9]*)?S)|(\.[0-9]*)?S)?|M([0-9]+(\.[0-9]*)?S|\.[0-9]+S)?
+               |(\.[0-9]*)?S)|\.[0-9]+S))"/>
+  </xsd:restriction>
+ </xsd:simpleType>
+ <xsd:simpleType name="yearMonthDuration">
+  <xsd:restriction base="xsd:duration">
+   <xsd:pattern value="[\-]?P[0-9]+(Y([0-9]+M)?|M)"/>
+  </xsd:restriction>
+ </xsd:simpleType>
+</xsd:schema>
index 6316767839f91528664973cce159d6039d9c95f8..91c2af32dc7f7faca5c0d92ab678eece98aec168 100644 (file)
@@ -11,6 +11,7 @@
        <name>Argeo Knowledge Components</name>
        <packaging>pom</packaging>
        <modules>
+               <module>org.argeo.support.xforms</module>
                <module>org.argeo.support.odk</module>
                <module>org.argeo.support.geonames</module>
        </modules>
index a7d5dd1f5bc02749f6b2a27aee53660bcfc8c194..ab46172b78359868766e969e95dbd025c40215ee 100644 (file)
@@ -1,3 +1,5 @@
+Require-Capability:\
+cms.datamodel;filter:="(name=jcrx)"
 
 Provide-Capability:\
 cms.datamodel; name=entity; cnd=/org/argeo/entity/entity.cnd
diff --git a/org.argeo.entity.api/src/org/argeo/entity/EntityJcrUtils.java b/org.argeo.entity.api/src/org/argeo/entity/EntityJcrUtils.java
deleted file mode 100644 (file)
index dfe3df7..0000000
+++ /dev/null
@@ -1,60 +0,0 @@
-package org.argeo.entity;
-
-import javax.jcr.Node;
-import javax.jcr.RepositoryException;
-
-/** JCR utilities around the entity concepts. */
-public class EntityJcrUtils {
-       /**
-        * The name of a node which will be serialized as XML text, as per section 7.3.1
-        * of the JCR 2.0 specifications.
-        */
-       private final static String JCR_XMLTEXT = "jcr:xmltext";
-
-       /**
-        * The name of a property which will be serialized as XML text, as per section
-        * 7.3.1 of the JCR 2.0 specifications.
-        */
-       private final static String JCR_XMLCHARACTERS = "jcr:xmlcharacters";
-
-       /*
-        * XML
-        */
-       /**
-        * Set both as a property and as a subnode which will be exported as an XML
-        * element.
-        */
-
-//     public static void setAttrAndElem(Node node, String name, String value) {
-//             Jcr.set(node, name, value);
-//             setElem(node, name, value);
-//     }
-       /**
-        * Set as a subnode which will be exported as an XML element.
-        */
-       public static String getXmlValue(Node node, String name) {
-               try {
-                       if (!node.hasNode(name))
-                               throw new IllegalArgumentException("No XML text named " + name);
-                       return node.getNode(name).getNode(JCR_XMLTEXT).getProperty(JCR_XMLCHARACTERS).getString();
-               } catch (RepositoryException e) {
-                       throw new IllegalStateException("Cannot get " + name + " as XML text", e);
-               }
-       }
-
-       /**
-        * Set as a subnode which will be exported as an XML element.
-        */
-       public static void setXmlValue(Node node, String name, String value) {
-               try {
-                       if (node.hasNode(name))
-                               node.getNode(name).getNode(JCR_XMLTEXT).setProperty(JCR_XMLCHARACTERS, value);
-                       else
-                               node.addNode(name, EntityType.xmlvalue.qualified()).addNode(JCR_XMLTEXT, EntityType.xmltext.qualified())
-                                               .setProperty(JCR_XMLCHARACTERS, value);
-               } catch (RepositoryException e) {
-                       throw new IllegalStateException("Cannot set " + name + " as XML text", e);
-               }
-       }
-
-}
index b28e71df35c1699fb2d14cde8c04d206cac24486..f8c88401ba36671bed308a2b5149c66ebcba1d4e 100644 (file)
@@ -6,6 +6,7 @@ import org.argeo.naming.LdapAttrs;
 public interface EntityNames {
        final String ENTITY_DEFINITIONS_PATH = "/entity";
        final String TYPOLOGIES_PATH = "/class";
+       final String FORM_BASE = "form";
 
        /** Administrative units. */
        final String ADM = "adm";
index 7fc86a3cc1e4ba6503cf86eb45f28783d771f8a2..f0905d8ea289e3d71d6b6705fe47986d9605d072 100644 (file)
@@ -7,11 +7,13 @@ public enum EntityType implements QualifiedName {
        // entity
        entity, definition,
        // xml
-       xmlvalue,xmltext,
+       xmlvalue, xmltext,
        // typology
-       typology, term
+       typology, term,
+       // form
+       form, formSet,
        // ldap
-       person;
+       person;
 
        @Override
        public String getPrefix() {
index 1ef20a7604a670f553b33148225bc87e4ed4a19a..45be8adee863bbf59498f0f57c4127944e5e39d7 100644 (file)
@@ -1,14 +1,11 @@
-<ldap = 'http://www.argeo.org/ns/ldap'>
-<entity = 'http://www.argeo.org/ns/entity'>
-
-// standard namespaces
+// Standard namespaces
 <xsd = "http://www.w3.org/2001/XMLSchema">
 <h = "http://www.w3.org/1999/xhtml">
-<xforms = "http://www.w3.org/2002/xforms">
-
 // see https://www.w3.org/2003/01/geo/
-<geo = 'http://www.w3.org/2003/01/geo/wgs84_pos#'>
+//<geo = "http://www.w3.org/2003/01/geo/wgs84_pos#">
 
+<ldap = "http://www.argeo.org/ns/ldap">
+<entity = 'http://www.argeo.org/ns/entity'>
 
 [entity:entity] > mix:created, mix:referenceable
 mixin
@@ -43,29 +40,13 @@ orderable
 + * (entity:term) *
 
 //
-// XML
-//
-[entity:xmlvalue] > mix:language
-- *
-+ jcr:xmltext (entity:xmltext)
-
-[entity:xmltext]
- - jcr:xmlcharacters (String) mandatory
-
-//
-// HTML
+// FORM
 //
-[h:head]
-+ h:title (entity:xmlvalue)
-+ h:base (entity:xmlvalue)
-+ h:style (entity:xmlvalue) multiple
-+ h:meta (entity:xmlvalue) multiple
-+ h:link (entity:xmlvalue) multiple
-+ h:script (entity:xmlvalue) multiple
+[entity:form]
+mixin
 
-[h:html]
-+ h:head (h:head)
-+ h:body (nt:unstructured)
+[entity:formSet]
+mixin
 
 // LDAP-LIKE ENTITIES
 // A real person
index f47b00e9cbc90d9a1a84e1d07be05897cc3cfce3..ab084afcc38232c96bbb56981db910d346ac26eb 100644 (file)
                        <arguments>
                        </arguments>
                </buildCommand>
+               <buildCommand>
+                       <name>org.eclipse.pde.ds.core.builder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
        </buildSpec>
        <natures>
                <nature>org.eclipse.pde.PluginNature</nature>
diff --git a/org.argeo.suite.core/OSGI-INF/maintenanceService.xml b/org.argeo.suite.core/OSGI-INF/maintenanceService.xml
new file mode 100644 (file)
index 0000000..2d495c8
--- /dev/null
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" activate="init" deactivate="destroy" name="Suite Maintenance Service">
+   <implementation class="org.argeo.suite.core.SuiteMaintenanceService"/>
+   <reference bind="setRepository" cardinality="1..1" interface="javax.jcr.Repository" name="Repository" policy="static" target="(cn=entity)"/>
+   <reference bind="setUserTransaction" cardinality="1..1" interface="javax.transaction.UserTransaction" name="UserTransaction" policy="static"/>
+   <reference bind="setUserAdmin" cardinality="1..1" interface="org.osgi.service.useradmin.UserAdmin" name="UserAdmin" policy="static"/>
+</scr:component>
index d70ca8c988a14e84692e1c66e0d8f8273fd2942e..48876750a06b57ddca0fd5123ef40659d59b3327 100644 (file)
@@ -1,4 +1,10 @@
+Service-Component:\
+OSGI-INF/maintenanceService.xml
 
 Import-Package:\
+javax.transaction,\
+org.osgi.service.useradmin,\
+javax.jcr.nodetype,\
 org.argeo.api,\
+org.argeo.entity,\
 *
\ No newline at end of file
index 34d2e4d2dad529ceaeb953bfcdb63c51d69ffed2..6210e849b591d26fa9e17057ad3e8d09511917b6 100644 (file)
@@ -1,4 +1,5 @@
-source.. = src/
 output.. = bin/
 bin.includes = META-INF/,\
-               .
+               .,\
+               OSGI-INF/
+source.. = src/
index c6a7d4f15576eccd9812ae6bbe51964e0f525d9e..9c89ce5e77a8a4532b8836816fbde05ca4f3a1d2 100644 (file)
                        <artifactId>org.argeo.cms</artifactId>
                        <version>${version.argeo-commons}</version>
                </dependency>
+               <dependency>
+                       <groupId>org.argeo.commons</groupId>
+                       <artifactId>org.argeo.maintenance</artifactId>
+                       <version>${version.argeo-commons}</version>
+               </dependency>
        </dependencies>
 </project>
diff --git a/org.argeo.suite.core/src/org/argeo/suite/core/SuiteMaintenanceService.java b/org.argeo.suite.core/src/org/argeo/suite/core/SuiteMaintenanceService.java
new file mode 100644 (file)
index 0000000..7e54eaa
--- /dev/null
@@ -0,0 +1,19 @@
+package org.argeo.suite.core;
+
+import java.io.IOException;
+
+import javax.jcr.RepositoryException;
+import javax.jcr.Session;
+
+import org.argeo.maintenance.AbstractMaintenanceService;
+
+/** Initialises an Argeo Suite backend. */
+public class SuiteMaintenanceService extends AbstractMaintenanceService {
+
+       @Override
+       public boolean prepareJcrTree(Session adminSession) throws RepositoryException, IOException {
+               //EntityJcrUtils.getOrAddFormFolder(adminSession.getRootNode(), EntityNames.FORM_BASE);
+               return adminSession.hasPendingChanges();
+       }
+
+}