Improve initialisation.
authorMathieu Baudier <mbaudier@argeo.org>
Mon, 27 Jun 2022 16:56:34 +0000 (18:56 +0200)
committerMathieu Baudier <mbaudier@argeo.org>
Mon, 27 Jun 2022 16:56:34 +0000 (18:56 +0200)
16 files changed:
eclipse/org.argeo.cms.servlet/src/org/argeo/cms/servlet/internal/jetty/JettyConfig.java
eclipse/org.argeo.cms.servlet/src/org/argeo/cms/servlet/internal/jetty/JettyServiceFactory.java
org.argeo.cms/OSGI-INF/cmsDeployment.xml
org.argeo.cms/OSGI-INF/cmsUserManager.xml
org.argeo.cms/src/org/argeo/cms/acr/AbstractContentRepository.java
org.argeo.cms/src/org/argeo/cms/acr/CmsContentTypes.java
org.argeo.cms/src/org/argeo/cms/acr/schemas/xhtml11-model-1.xsd [deleted file]
org.argeo.cms/src/org/argeo/cms/acr/schemas/xhtml11-modules-1.xsd [deleted file]
org.argeo.cms/src/org/argeo/cms/acr/schemas/xhtml11.xsd [deleted file]
org.argeo.cms/src/org/argeo/cms/internal/auth/CmsUserManagerImpl.java
org.argeo.cms/src/org/argeo/cms/internal/osgi/DeployConfig.java
org.argeo.cms/src/org/argeo/cms/internal/runtime/CmsDeploymentImpl.java
org.argeo.cms/src/org/argeo/cms/internal/runtime/CmsStateImpl.java
org.argeo.cms/src/org/argeo/cms/internal/runtime/CmsUserAdmin.java
org.argeo.cms/src/org/argeo/cms/internal/runtime/DeployedContentRepository.java
org.argeo.cms/src/org/argeo/cms/runtime/StaticCms.java

index 026993eabba1d1d039abde6eaaa782fcbc97d33b..ad93fad61e759ca19a2e7542b3c7e061866e349d 100644 (file)
@@ -70,6 +70,20 @@ public class JettyConfig {
 
                };
                serverSt.open();
+
+               // check initialisation
+//             ServiceTracker<?, ?> httpSt = new ServiceTracker<HttpService, HttpService>(bc, HttpService.class, null) {
+//
+//                     @Override
+//                     public HttpService addingService(ServiceReference<HttpService> sr) {
+//                             Object httpPort = sr.getProperty("http.port");
+//                             Object httpsPort = sr.getProperty("https.port");
+//                             log.info(httpPortsMsg(httpPort, httpsPort));
+//                             close();
+//                             return super.addingService(sr);
+//                     }
+//             };
+//             httpSt.open();
        }
 
        public void stop() {
index f1d9216c2d19fca8ddd7f2ce96ba18cbb7636a62..005af743ca87221abb368bf8750428148de97eb3 100644 (file)
@@ -21,6 +21,7 @@ import org.osgi.service.cm.ConfigurationException;
 import org.osgi.service.cm.ManagedServiceFactory;
 import org.osgi.util.tracker.ServiceTracker;
 
+@Deprecated
 public class JettyServiceFactory implements ManagedServiceFactory {
        private final static CmsLog log = CmsLog.getLog(JettyServiceFactory.class);
 
index 5f5ed5fcc7932434893af20a8eea125202c4b8d8..8495daad73d1ebe3467021fdbe732c258a42d0fe 100644 (file)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" activate="start" deactivate="stop" immediate="false" name="CMS Deployment">
+<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" activate="start" deactivate="stop" immediate="true" name="CMS Deployment">
    <implementation class="org.argeo.cms.internal.runtime.CmsDeploymentImpl"/>
    <reference bind="setCmsState" cardinality="1..1" interface="org.argeo.api.cms.CmsState" name="CmsState" policy="static"/>
    <service>
index 2e8f868aee577f8bc51873c9e944ce07896192de..d22660c9fc57034a6bb9345e6eee6b65fe428f52 100644 (file)
@@ -1,10 +1,9 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" name="User Admin Service">
+<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" activate="start" deactivate="stop" immediate="true" name="User Admin Service">
    <implementation class="org.argeo.cms.internal.auth.CmsUserManagerImpl"/>
    <service>
       <provide interface="org.argeo.cms.CmsUserManager"/>
    </service>
    <reference bind="setUserAdmin" cardinality="1..1" interface="org.osgi.service.useradmin.UserAdmin" name="UserAdmin" policy="static"/>
    <reference bind="setUserTransaction" cardinality="1..1" interface="org.argeo.util.transaction.WorkTransaction" name="UserTransaction" policy="static"/>
-   <reference bind="addUserDirectory" cardinality="0..n" interface="org.argeo.osgi.useradmin.UserDirectory" name="UserDirectory" policy="static" unbind="removeUserDirectory"/>
 </scr:component>
index 8ff14169868c2d4878cef8152166aa5e60a3c549..26ba6be2a18b503ee637224354bbd67cca981d72 100644 (file)
@@ -52,6 +52,7 @@ public abstract class AbstractContentRepository implements ProvidedRepository {
 //     public final static String ACR_MOUNT_PATH_PROPERTY = "acr.mount.path";
 
        public AbstractContentRepository() {
+               long begin = System.currentTimeMillis();
                // types
                typesManager = new TypesManager();
                typesManager.init();
@@ -60,7 +61,8 @@ public abstract class AbstractContentRepository implements ProvidedRepository {
                        for (QName type : types) {
                                log.trace(type + " - " + typesManager.getAttributeTypes(type));
                        }
-
+               long duration = System.currentTimeMillis() - begin;
+               log.debug(() -> "CMS content types available (initialisation took " + duration + " ms)");
        }
 
        protected abstract CmsContentSession newSystemSession();
@@ -81,10 +83,14 @@ public abstract class AbstractContentRepository implements ProvidedRepository {
         */
        @Override
        public void addProvider(ContentProvider provider) {
-               if (mountManager == null)
+               if (mountManager == null) {
                        providersToAdd.add(provider);
-               else
+                       log.debug(
+                                       () -> "Will add provider " + provider.getMountPath() + " (" + provider.getClass().getName() + ")");
+               } else {
                        mountManager.addStructuralContentProvider(provider);
+                       log.debug(() -> "Added provider " + provider.getMountPath() + " (" + provider.getClass().getName() + ")");
+               }
        }
 
        public void registerTypes(String prefix, String namespaceURI, String schemaSystemId) {
index 6a09a8987c873d80367480b147e6efade51f8973..3f8fd9568ed56467d5fd9de6efe713bb7af2e84f 100644 (file)
@@ -30,8 +30,6 @@ public enum CmsContentTypes {
        SVG_1_1("svg", "http://www.w3.org/2000/svg", "SVG.xsd",
                        "https://raw.githubusercontent.com/oreillymedia/HTMLBook/master/schema/svg/SVG.xsd"),
        //
-       XHTML_1_1("h", "http://www.w3.org/1999/xhtml", "xhtml11.xsd", "https://www.w3.org/MarkUp/SCHEMA/xhtml11.xsd"),
-       //
        DOCBOOK_5_0_1("dbk", "http://docbook.org/ns/docbook", "docbook.xsd",
                        "http://docbook.org/xml/5.0.1/xsd/docbook.xsd"),
        //
diff --git a/org.argeo.cms/src/org/argeo/cms/acr/schemas/xhtml11-model-1.xsd b/org.argeo.cms/src/org/argeo/cms/acr/schemas/xhtml11-model-1.xsd
deleted file mode 100644 (file)
index a1c138d..0000000
+++ /dev/null
@@ -1,716 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<xs:schema
-    xmlns:xs="http://www.w3.org/2001/XMLSchema"
-    xmlns:xh11d="http://www.w3.org/1999/xhtml/datatypes/"
-    elementFormDefault="qualified" >
-    <xs:import
-        namespace="http://www.w3.org/1999/xhtml/datatypes/"
-        schemaLocation="http://www.w3.org/MarkUp/SCHEMA/xhtml-datatypes-1.xsd"/>
-    <xs:annotation>
-        <xs:documentation> 
-            This is the XML Schema module of common content models for XHTML11 
-            
-            $Id: xhtml11-model-1.xsd,v 1.9 2009/02/03 15:14:49 ahby Exp $ 
-        </xs:documentation>
-        <xs:documentation source="xhtml-copyright-1.xsd"/>
-    </xs:annotation>
-    <xs:annotation>
-        <xs:documentation> 
-            XHTML Document Model 
-            This module describes the groupings of elements/attributes 
-            that make up common content models for XHTML elements. 
-            XHTML has following basic content models: 
-               xhtml.Inline.mix; character-level elements
-               xhtml.Block.mix; block-like elements, e.g., paragraphs and lists
-               xhtml.Flow.mix; any block or inline elements 
-               xhtml.HeadOpts.mix; Head Elements 
-               xhtml.InlinePre.mix; Special class for pre content model 
-               xhtml.InlineNoAnchor.mix; Content model for Anchor 
-            
-            Any groups declared in this module may be used to create 
-            element content models, but the above are considered 'global' 
-            (insofar as that term applies here). XHTML has the
-            following Attribute Groups 
-               xhtml.Core.extra.attrib 
-               xhtml.I18n.extra.attrib
-               xhtml.Common.extra 
-            
-            The above attribute Groups are considered Global 
-        </xs:documentation>
-    </xs:annotation>
-    <xs:attributeGroup
-        name="xhtml.I18n.extra.attrib">
-        <xs:annotation>
-            <xs:documentation> Extended I18n attribute </xs:documentation>
-        </xs:annotation>
-        <xs:attributeGroup
-            ref="xhtml.dir.attrib">
-            <xs:annotation>
-                <xs:documentation> 
-                "dir" Attribute from Bi Directional Text (bdo) Module
-                </xs:documentation>
-            </xs:annotation>
-        </xs:attributeGroup>
-        <xs:attribute name="lang" type="xh11d:LanguageCode" />
-    </xs:attributeGroup>
-    <xs:attributeGroup
-        name="xhtml.Common.extra">
-        <xs:annotation>
-            <xs:documentation> Extended Common Attributes </xs:documentation>
-        </xs:annotation>
-        <xs:attributeGroup
-            ref="xhtml.style.attrib">
-            <xs:annotation>
-                <xs:documentation> 
-                "style" attribute from Inline Style Module 
-                </xs:documentation>
-            </xs:annotation>
-        </xs:attributeGroup>
-       <xs:attributeGroup ref="xhtml.Events.attrib">
-                       <xs:annotation>
-                               <xs:documentation> 
-                               Attributes from Events Module
-                               </xs:documentation>
-                       </xs:annotation>
-               </xs:attributeGroup>
-       </xs:attributeGroup>
-    <xs:attributeGroup
-        name="xhtml.Core.extra.attrib">
-        <xs:annotation>
-            <xs:documentation> Extend Core Attributes </xs:documentation>
-        </xs:annotation>
-    </xs:attributeGroup>
-    <xs:attributeGroup
-        name="xhtml.Global.core.extra.attrib">
-        <xs:annotation>
-            <xs:documentation> Extended Global Core Attributes </xs:documentation>
-        </xs:annotation>
-    </xs:attributeGroup>
-    <xs:attributeGroup
-        name="xhtml.Global.I18n.extra.attrib">
-        <xs:annotation>
-            <xs:documentation> Extended Global I18n attributes </xs:documentation>
-        </xs:annotation>
-    </xs:attributeGroup>
-    <xs:attributeGroup
-        name="xhtml.Global.Common.extra">
-        <xs:annotation>
-            <xs:documentation> Extended Global Common Attributes </xs:documentation>
-        </xs:annotation>
-    </xs:attributeGroup>
-    <xs:group
-        name="xhtml.Head.extra">
-        <xs:sequence/>
-    </xs:group>
-    <xs:group
-        name="xhtml.HeadOpts.mix">
-        <xs:choice>
-            <xs:element
-                name="script"
-                type="xhtml.script.type"/>
-            <xs:element
-                name="style"
-                type="xhtml.style.type"/>
-            <xs:element
-                name="meta"
-                type="xhtml.meta.type"/>
-            <xs:element
-                name="link"
-                type="xhtml.link.type"/>
-            <xs:element
-                name="object"
-                type="xhtml.object.type"/>
-            <xs:group
-                ref="xhtml.Head.extra"/>
-        </xs:choice>
-    </xs:group>
-    <xs:group
-        name="xhtml.head.content">
-        <xs:sequence>
-            <xs:group
-                ref="xhtml.HeadOpts.mix"
-                minOccurs="0"
-                maxOccurs="unbounded"/>
-            <xs:choice>
-                <xs:sequence>
-                    <xs:element
-                        name="title"
-                        minOccurs="1"
-                        maxOccurs="1"
-                        type="xhtml.title.type"/>
-                    <xs:group
-                        ref="xhtml.HeadOpts.mix"
-                        minOccurs="0"
-                        maxOccurs="unbounded"/>
-                    <xs:sequence
-                        minOccurs="0">
-                        <xs:element
-                            name="base"
-                            type="xhtml.base.type"/>
-                        <xs:group
-                            ref="xhtml.HeadOpts.mix"
-                            minOccurs="0"
-                            maxOccurs="unbounded"/>
-                    </xs:sequence>
-                </xs:sequence>
-                <xs:sequence>
-                    <xs:element
-                        name="base"
-                        type="xhtml.base.type"
-                        minOccurs="1"
-                        maxOccurs="1"/>
-                    <xs:group
-                        ref="xhtml.HeadOpts.mix"
-                        minOccurs="0"
-                        maxOccurs="unbounded"/>
-                    <xs:element
-                        name="title"
-                        minOccurs="1"
-                        maxOccurs="1"
-                        type="xhtml.title.type"/>
-                    <xs:group
-                        ref="xhtml.HeadOpts.mix"
-                        minOccurs="0"
-                        maxOccurs="unbounded"/>
-                </xs:sequence>
-            </xs:choice>
-        </xs:sequence>
-    </xs:group>
-    <!--
-    ins and del are used to denote editing changes
-  -->
-    <xs:group
-        name="xhtml.Edit.class">
-        <xs:choice>
-            <xs:element
-                name="ins"
-                type="xhtml.edit.type"/>
-            <xs:element
-                name="del"
-                type="xhtml.edit.type"/>
-        </xs:choice>
-    </xs:group>
-    <!--
-    script and noscript are used to contain scripts
-    and alternative content
-  -->
-    <xs:group
-        name="xhtml.Script.class">
-        <xs:choice>
-            <xs:element
-                name="script"
-                type="xhtml.script.type"/>
-            <xs:element
-                name="noscript"
-                type="xhtml.noscript.type"/>
-        </xs:choice>
-    </xs:group>
-    <xs:group
-        name="xhtml.Misc.extra">
-        <xs:sequence/>
-    </xs:group>
-    <!--
-    These elements are neither block nor inline, and can
-    essentially be used anywhere in the document body.
-  -->
-    <xs:group
-        name="xhtml.Misc.class">
-        <xs:choice>
-            <xs:group
-                ref="xhtml.Edit.class"/>
-            <xs:group
-                ref="xhtml.Script.class"/>
-            <xs:group
-                ref="xhtml.Misc.extra"/>
-        </xs:choice>
-    </xs:group>
-    <!-- Inline Elements -->
-    <xs:group
-        name="xhtml.InlStruct.class">
-        <xs:choice>
-            <xs:element
-                name="br"
-                type="xhtml.br.type"/>
-            <xs:element
-                name="span"
-                type="xhtml.span.type"/>
-        </xs:choice>
-    </xs:group>
-    <xs:group
-        name="xhtml.InlPhras.class">
-        <xs:choice>
-            <xs:element
-                name="em"
-                type="xhtml.em.type"/>
-            <xs:element
-                name="strong"
-                type="xhtml.strong.type"/>
-            <xs:element
-                name="dfn"
-                type="xhtml.dfn.type"/>
-            <xs:element
-                name="code"
-                type="xhtml.code.type"/>
-            <xs:element
-                name="samp"
-                type="xhtml.samp.type"/>
-            <xs:element
-                name="kbd"
-                type="xhtml.kbd.type"/>
-            <xs:element
-                name="var"
-                type="xhtml.var.type"/>
-            <xs:element
-                name="cite"
-                type="xhtml.cite.type"/>
-            <xs:element
-                name="abbr"
-                type="xhtml.abbr.type"/>
-            <xs:element
-                name="acronym"
-                type="xhtml.acronym.type"/>
-            <xs:element
-                name="q"
-                type="xhtml.q.type"/>
-        </xs:choice>
-    </xs:group>
-    <xs:group
-        name="xhtml.InlPres.class">
-        <xs:choice>
-            <xs:element
-                name="tt"
-                type="xhtml.InlPres.type"/>
-            <xs:element
-                name="i"
-                type="xhtml.InlPres.type"/>
-            <xs:element
-                name="b"
-                type="xhtml.InlPres.type"/>
-            <xs:element
-                name="big"
-                type="xhtml.InlPres.type"/>
-            <xs:element
-                name="small"
-                type="xhtml.InlPres.type"/>
-            <xs:element
-                name="sub"
-                type="xhtml.InlPres.type"/>
-            <xs:element
-                name="sup"
-                type="xhtml.InlPres.type"/>
-        </xs:choice>
-    </xs:group>
-    <xs:group
-        name="xhtml.I18n.class">
-        <xs:sequence>
-            <xs:element
-                name="bdo"
-                type="xhtml.bdo.type"/>
-        </xs:sequence>
-    </xs:group>
-    <xs:group
-        name="xhtml.Anchor.class">
-        <xs:sequence>
-            <xs:element
-                name="a"
-                type="xhtml.a.type"/>
-        </xs:sequence>
-    </xs:group>
-    <xs:group
-        name="xhtml.InlSpecial.class">
-        <xs:choice>
-            <xs:element
-                name="img"
-                type="xhtml.img.type"/>
-            <xs:element
-                name="map"
-                type="xhtml.map.type"/>
-            <xs:element
-                name="object"
-                type="xhtml.object.type"/>
-        </xs:choice>
-    </xs:group>
-    <xs:group
-        name="xhtml.InlForm.class">
-        <xs:choice>
-            <xs:element
-                name="input"
-                type="xhtml.input.type"/>
-            <xs:element
-                name="select"
-                type="xhtml.select.type"/>
-            <xs:element
-                name="textarea"
-                type="xhtml.textarea.type"/>
-            <xs:element
-                name="label"
-                type="xhtml.label.type"/>
-            <xs:element
-                name="button"
-                type="xhtml.button.type"/>
-        </xs:choice>
-    </xs:group>
-    <xs:group
-        name="xhtml.Inline.extra">
-        <xs:sequence/>
-    </xs:group>
-    <xs:group
-        name="xhtml.Ruby.class">
-        <xs:sequence>
-            <xs:element
-                name="ruby"
-                type="xhtml.ruby.type"/>
-        </xs:sequence>
-    </xs:group>
-    <!--
-    Inline.class includes all inline elements,
-    used as a component in mixes
-  -->
-    <xs:group
-        name="xhtml.Inline.class">
-        <xs:choice>
-            <xs:group
-                ref="xhtml.InlStruct.class"/>
-            <xs:group
-                ref="xhtml.InlPhras.class"/>
-            <xs:group
-                ref="xhtml.InlPres.class"/>
-            <xs:group
-                ref="xhtml.I18n.class"/>
-            <xs:group
-                ref="xhtml.Anchor.class"/>
-            <xs:group
-                ref="xhtml.InlSpecial.class"/>
-            <xs:group
-                ref="xhtml.InlForm.class"/>
-            <xs:group
-                ref="xhtml.Ruby.class"/>
-            <xs:group
-                ref="xhtml.Inline.extra"/>
-        </xs:choice>
-    </xs:group>
-    <!--
-     InlNoRuby.class includes all inline elements
-     except ruby
-  -->
-    <xs:group
-        name="xhtml.InlNoRuby.class">
-        <xs:choice>
-            <xs:group
-                ref="xhtml.InlStruct.class"/>
-            <xs:group
-                ref="xhtml.InlPhras.class"/>
-            <xs:group
-                ref="xhtml.InlPres.class"/>
-            <xs:group
-                ref="xhtml.I18n.class"/>
-            <xs:group
-                ref="xhtml.Anchor.class"/>
-            <xs:group
-                ref="xhtml.InlSpecial.class"/>
-            <xs:group
-                ref="xhtml.InlForm.class"/>
-            <xs:group
-                ref="xhtml.Inline.extra"/>
-        </xs:choice>
-    </xs:group>
-    <!--
-    InlinePre.mix
-    Used as a component in pre model
-  -->
-    <xs:group
-        name="xhtml.InlinePre.mix">
-        <xs:choice>
-            <xs:group
-                ref="xhtml.InlStruct.class"/>
-            <xs:group
-                ref="xhtml.InlPhras.class"/>
-            <xs:element
-                name="tt"
-                type="xhtml.InlPres.type"/>
-            <xs:element
-                name="i"
-                type="xhtml.InlPres.type"/>
-            <xs:element
-                name="b"
-                type="xhtml.InlPres.type"/>
-            <xs:group
-                ref="xhtml.I18n.class"/>
-            <xs:group
-                ref="xhtml.Anchor.class"/>
-            <xs:group
-                ref="xhtml.Misc.class"/>
-            <xs:element
-                name="map"
-                type="xhtml.map.type"/>
-            <xs:group
-                ref="xhtml.Inline.extra"/>
-        </xs:choice>
-    </xs:group>
-    <!--
-    InlNoAnchor.class includes all non-anchor inlines,
-    used as a component in mixes
-  -->
-    <xs:group
-        name="xhtml.InlNoAnchor.class">
-        <xs:choice>
-            <xs:group
-                ref="xhtml.InlStruct.class"/>
-            <xs:group
-                ref="xhtml.InlPhras.class"/>
-            <xs:group
-                ref="xhtml.InlPres.class"/>
-            <xs:group
-                ref="xhtml.I18n.class"/>
-            <xs:group
-                ref="xhtml.InlSpecial.class"/>
-            <xs:group
-                ref="xhtml.InlForm.class"/>
-            <xs:group
-                ref="xhtml.Ruby.class"/>
-            <xs:group
-                ref="xhtml.Inline.extra"/>
-        </xs:choice>
-    </xs:group>
-    <!--
-    InlNoAnchor.mix includes all non-anchor inlines
-  -->
-    <xs:group
-        name="xhtml.InlNoAnchor.mix">
-        <xs:choice>
-            <xs:group
-                ref="xhtml.InlNoAnchor.class"/>
-            <xs:group
-                ref="xhtml.Misc.class"/>
-        </xs:choice>
-    </xs:group>
-    <!--
-    Inline.mix includes all inline elements, including Misc.class
-  -->
-    <xs:group
-        name="xhtml.Inline.mix">
-        <xs:choice>
-            <xs:group
-                ref="xhtml.Inline.class"/>
-            <xs:group
-                ref="xhtml.Misc.class"/>
-        </xs:choice>
-    </xs:group>
-    <!--
-   InlNoRuby.mix includes all of inline.mix elements
-   except ruby
-  -->
-    <xs:group
-        name="xhtml.InlNoRuby.mix">
-        <xs:choice>
-            <xs:group
-                ref="xhtml.InlNoRuby.class"/>
-            <xs:group
-                ref="xhtml.Misc.class"/>
-        </xs:choice>
-    </xs:group>
-    <!--
-    In the HTML 4 DTD, heading and list elements were included
-    in the block group. The Heading.class and
-    List.class groups must now be included explicitly
-    on element declarations where desired.
-  -->
-    <xs:group
-        name="xhtml.Heading.class">
-        <xs:choice>
-            <xs:element
-                name="h1"
-                type="xhtml.h1.type"/>
-            <xs:element
-                name="h2"
-                type="xhtml.h2.type"/>
-            <xs:element
-                name="h3"
-                type="xhtml.h3.type"/>
-            <xs:element
-                name="h4"
-                type="xhtml.h4.type"/>
-            <xs:element
-                name="h5"
-                type="xhtml.h5.type"/>
-            <xs:element
-                name="h6"
-                type="xhtml.h6.type"/>
-        </xs:choice>
-    </xs:group>
-    <xs:group
-        name="xhtml.List.class">
-        <xs:choice>
-            <xs:element
-                name="ul"
-                type="xhtml.ul.type"/>
-            <xs:element
-                name="ol"
-                type="xhtml.ol.type"/>
-            <xs:element
-                name="dl"
-                type="xhtml.dl.type"/>
-        </xs:choice>
-    </xs:group>
-    <xs:group
-        name="xhtml.Table.class">
-        <xs:choice>
-            <xs:element
-                name="table"
-                type="xhtml.table.type"/>
-        </xs:choice>
-    </xs:group>
-    <xs:group
-        name="xhtml.Form.class">
-        <xs:choice>
-            <xs:element
-                name="form"
-                type="xhtml.form.type"/>
-        </xs:choice>
-    </xs:group>
-    <xs:group
-        name="xhtml.Fieldset.class">
-        <xs:choice>
-            <xs:element
-                name="fieldset"
-                type="xhtml.fieldset.type"/>
-        </xs:choice>
-    </xs:group>
-    <xs:group
-        name="xhtml.BlkStruct.class">
-        <xs:choice>
-            <xs:element
-                name="p"
-                type="xhtml.p.type"/>
-            <xs:element
-                name="div"
-                type="xhtml.div.type"/>
-        </xs:choice>
-    </xs:group>
-    <xs:group
-        name="xhtml.BlkPhras.class">
-        <xs:choice>
-            <xs:element
-                name="pre"
-                type="xhtml.pre.type"/>
-            <xs:element
-                name="blockquote"
-                type="xhtml.blockquote.type"/>
-            <xs:element
-                name="address"
-                type="xhtml.address.type"/>
-        </xs:choice>
-    </xs:group>
-    <xs:group
-        name="xhtml.BlkPres.class">
-        <xs:sequence>
-            <xs:element
-                name="hr"
-                type="xhtml.hr.type"/>
-        </xs:sequence>
-    </xs:group>
-    <xs:group
-        name="xhtml.BlkSpecial.class">
-        <xs:choice>
-            <xs:group
-                ref="xhtml.Table.class"/>
-            <xs:group
-                ref="xhtml.Form.class"/>
-            <xs:group
-                ref="xhtml.Fieldset.class"/>
-        </xs:choice>
-    </xs:group>
-    <xs:group
-        name="xhtml.Block.extra">
-        <xs:sequence/>
-    </xs:group>
-    <!--
-    Block.class includes all block elements,
-    used as an component in mixes
-  -->
-    <xs:group
-        name="xhtml.Block.class">
-        <xs:choice>
-            <xs:group
-                ref="xhtml.BlkStruct.class"/>
-            <xs:group
-                ref="xhtml.BlkPhras.class"/>
-            <xs:group
-                ref="xhtml.BlkPres.class"/>
-            <xs:group
-                ref="xhtml.BlkSpecial.class"/>
-            <xs:group
-                ref="xhtml.Block.extra"/>
-        </xs:choice>
-    </xs:group>
-    <!--
-   Block.mix includes all block elements plus %Misc.class;
-  -->
-    <xs:group
-        name="xhtml.Block.mix">
-        <xs:choice>
-            <xs:group
-                ref="xhtml.Heading.class"/>
-            <xs:group
-                ref="xhtml.List.class"/>
-            <xs:group
-                ref="xhtml.Block.class"/>
-            <xs:group
-                ref="xhtml.Misc.class"/>
-        </xs:choice>
-    </xs:group>
-    <!--
-    All Content Elements
-    Flow.mix includes all text content, block and inline
-    Note that the "any" element included here allows us
-    to add data from any other namespace, a necessity
-    for compound document creation.
-    Note however that it is not possible to add
-    to any head level element without further
-    modification. To add RDF metadata to the head
-    of a document, modify the structure module.
-  -->
-    <xs:group
-        name="xhtml.Flow.mix">
-        <xs:choice>
-            <xs:group
-                ref="xhtml.Heading.class"/>
-            <xs:group
-                ref="xhtml.List.class"/>
-            <xs:group
-                ref="xhtml.Block.class"/>
-            <xs:group
-                ref="xhtml.Inline.class"/>
-            <xs:group
-                ref="xhtml.Misc.class"/>
-        </xs:choice>
-    </xs:group>
-    <!--
-    BlkNoForm.mix includes all non-form block elements,
-    plus Misc.class
-  -->
-    <xs:group
-        name="xhtml.BlkNoForm.mix">
-        <xs:choice>
-            <xs:group
-                ref="xhtml.Heading.class"/>
-            <xs:group
-                ref="xhtml.List.class"/>
-            <xs:group
-                ref="xhtml.BlkStruct.class"/>
-            <xs:group
-                ref="xhtml.BlkPhras.class"/>
-            <xs:group
-                ref="xhtml.BlkPres.class"/>
-            <xs:group
-                ref="xhtml.Table.class"/>
-            <xs:group
-                ref="xhtml.Block.extra"/>
-            <xs:group
-                ref="xhtml.Misc.class"/>
-        </xs:choice>
-    </xs:group>
-    <xs:element
-        name="html"
-        type="xhtml.html.type"/>
-</xs:schema>
diff --git a/org.argeo.cms/src/org/argeo/cms/acr/schemas/xhtml11-modules-1.xsd b/org.argeo.cms/src/org/argeo/cms/acr/schemas/xhtml11-modules-1.xsd
deleted file mode 100644 (file)
index 6767067..0000000
+++ /dev/null
@@ -1,605 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" 
-           elementFormDefault="qualified" 
-           xmlns:xh11d="http://www.w3.org/1999/xhtml/datatypes/" >
-    <xs:import namespace="http://www.w3.org/1999/xhtml/datatypes/" 
-        schemaLocation="http://www.w3.org/MarkUp/SCHEMA/xhtml-datatypes-1.xsd" />
-
-    <xs:annotation>
-        <xs:documentation>
-      This schema includes all modules for XHTML1.1 Document Type.
-      $Id: xhtml11-modules-1.xsd,v 1.10 2009/02/03 15:14:49 ahby Exp $
-    </xs:documentation>
-        <xs:documentation source="xhtml-copyright-1.xsd"/>
-    </xs:annotation>
-    <xs:annotation>
-        <xs:documentation>
-     This schema includes all modules (and redefinitions)
-     for XHTML1.1 Document Type.
-     XHTML1.1 Document Type includes the following Modules
-
-       XHTML Core modules (Required for XHTML Family Conformance)
-            +  text
-            +  hypertext
-            +  lists
-            +  structure
-
-       Other XHTML modules
-            +  Edit
-            +  Bdo
-            +  Presentational
-            +  Link
-            +  Meta
-            +  Base
-            +  Scripting
-            +  Style
-            +  Image
-            +  Applet
-            +  Object
-            +  Param (Applet/Object modules require Param Module)
-            +  Tables
-            +  Target
-            +  Forms
-            +  Client side image maps
-            +  Server side image maps
-
-    </xs:documentation>
-    </xs:annotation>
-    <xs:include schemaLocation="http://www.w3.org/MarkUp/SCHEMA/xhtml-framework-1.xsd">
-        <xs:annotation>
-            <xs:documentation>
-        Schema Framework Component Modules:
-            +  notations
-            +  datatypes
-            +  common attributes
-            +  character entities
-      </xs:documentation>
-            <xs:documentation source="http://www.w3.org/TR/xhtml-modularization/abstract_modules.html#s_commonatts"/>
-        </xs:annotation>
-    </xs:include>
-    <xs:include schemaLocation="http://www.w3.org/MarkUp/SCHEMA/xhtml-text-1.xsd">
-        <xs:annotation>
-            <xs:documentation>
-        Text module
-
-        The Text module includes declarations for all core
-        text container elements and their attributes.
-
-            +  block phrasal
-            +  block structural
-            +  inline phrasal
-            +  inline structural
-
-        Elements defined here:
-          * address, blockquote, pre, h1, h2, h3, h4, h5, h6
-          * div, p
-          * abbr, acronym, cite, code, dfn, em, kbd, q, samp, strong, var
-          * br, span
-      </xs:documentation>
-            <xs:documentation source="http://www.w3.org/TR/2001/REC-xhtml-modularization-20010410/abstract_modules.html#s_textmodule"/>
-        </xs:annotation>
-    </xs:include>
-    <xs:redefine schemaLocation="http://www.w3.org/MarkUp/SCHEMA/xhtml-hypertext-1.xsd">
-        <xs:annotation>
-            <xs:documentation>
-         Hypertext module
-
-         Elements defined here:
-          * a
-      </xs:documentation>
-            <xs:documentation source="http://www.w3.org/TR/2001/REC-xhtml-modularization-20010410/abstract_modules.html#s_hypertextmodule"/>
-        </xs:annotation>
-        <xs:attributeGroup name="xhtml.a.attlist">
-            <xs:attributeGroup ref="xhtml.a.attlist"/>
-            <xs:attributeGroup ref="xhtml.a.csim.attlist">
-                <xs:annotation>
-                    <xs:documentation>
-              Redefinition by Client Side Image Map Module
-            </xs:documentation>
-                </xs:annotation>
-            </xs:attributeGroup>
-            <xs:attributeGroup ref="xhtml.a.events.attlist">
-                <xs:annotation>
-                    <xs:documentation>
-              Redefinition by XHTML Event Attribute Module
-            </xs:documentation>
-                </xs:annotation>
-            </xs:attributeGroup>
-            <xs:attributeGroup ref="xhtml.a.target.attlist">
-                <xs:annotation>
-                    <xs:documentation>
-              Target Module - A Attribute Additions
-            </xs:documentation>
-                </xs:annotation>
-            </xs:attributeGroup>
-        </xs:attributeGroup>
-    </xs:redefine>
-    <xs:include schemaLocation="http://www.w3.org/MarkUp/SCHEMA/xhtml-list-1.xsd">
-        <xs:annotation>
-            <xs:documentation>
-        Lists module
-
-        Elements defined here:
-          * dt, dd, dl, ol, ul, li
-      </xs:documentation>
-            <xs:documentation source="http://www.w3.org/TR/2001/REC-xhtml-modularization-20010410/abstract_modules.html#s_listmodule"/>
-        </xs:annotation>
-    </xs:include>
-    <xs:redefine schemaLocation="http://www.w3.org/MarkUp/SCHEMA/xhtml-struct-1.xsd">
-        <xs:annotation>
-            <xs:documentation>
-        Structural module
-
-        Elements defined here:
-          * title, head, body, html
-      </xs:documentation>
-            <xs:documentation source="http://www.w3.org/TR/2001/REC-xhtml-modularization-20010410/abstract_modules.html#s_structuremodule"/>
-        </xs:annotation>
-        <xs:attributeGroup name="xhtml.version.attrib">
-            <xs:annotation>
-                <xs:documentation>
-            Redefinition by the XHTML11 Markup (for value of version attr)
-         </xs:documentation>
-            </xs:annotation>
-            <xs:attribute name="version" type="xh11d:CDATA" fixed="-//W3C//DTD XHTML 1.1//EN"/>
-        </xs:attributeGroup>
-        <xs:attributeGroup name="xhtml.body.attlist">
-            <xs:attributeGroup ref="xhtml.body.attlist">
-                <xs:annotation>
-                    <xs:documentation>
-              Original Body Attlist
-            </xs:documentation>
-                </xs:annotation>
-            </xs:attributeGroup>
-            <xs:attributeGroup ref="xhtml.body.events.attlist">
-                <xs:annotation>
-                    <xs:documentation>
-              Redefinition by XHTML Event Attribute Module
-            </xs:documentation>
-                </xs:annotation>
-            </xs:attributeGroup>
-        </xs:attributeGroup>
-    </xs:redefine>
-    <xs:include schemaLocation="http://www.w3.org/MarkUp/SCHEMA/xhtml-edit-1.xsd">
-        <xs:annotation>
-            <xs:documentation>
-        Edit module
-
-        Elements defined here:
-          * ins, del
-      </xs:documentation>
-            <xs:documentation source="http://www.w3.org/TR/xhtml-modularization/abstract_modules.html#s_editmodule"/>
-        </xs:annotation>
-    </xs:include>
-    <xs:include schemaLocation="http://www.w3.org/MarkUp/SCHEMA/xhtml-bdo-1.xsd">
-        <xs:annotation>
-            <xs:documentation>
-        Bidirectional element module
-
-        Elements defined here:
-          * bdo
-      </xs:documentation>
-            <xs:documentation source="http://www.w3.org/TR/xhtml-modularization/abstract_modules.html#s_bdomodule"/>
-        </xs:annotation>
-    </xs:include>
-    <xs:include schemaLocation="http://www.w3.org/MarkUp/SCHEMA/xhtml-pres-1.xsd">
-        <xs:annotation>
-            <xs:documentation>
-        Presentational module
-
-         Elements defined here:
-           * hr, b, big, i, small,sub, sup, tt
-      </xs:documentation>
-            <xs:documentation source="http://www.w3.org/TR/xhtml-modularization/abstract_modules.html#s_presentationmodule"/>
-        </xs:annotation>
-    </xs:include>
-    <xs:redefine schemaLocation="http://www.w3.org/MarkUp/SCHEMA/xhtml-link-1.xsd">
-        <xs:annotation>
-            <xs:documentation>
-                Link module
-
-                Elements defined here:
-                   * link
-            </xs:documentation>
-            <xs:documentation source="http://www.w3.org/TR/xhtml-modularization/abstract_modules.html#s_linkmodule"/>
-        </xs:annotation>
-        <xs:attributeGroup name="xhtml.link.attlist">
-            <xs:annotation>
-                <xs:documentation>
-            Changes to XHTML Link Attlist
-          </xs:documentation>
-            </xs:annotation>
-            <xs:attributeGroup ref="xhtml.link.attlist">
-                <xs:annotation>
-                    <xs:documentation>
-                Original Link Attributes (declared in Link Module)
-             </xs:documentation>
-                </xs:annotation>
-            </xs:attributeGroup>
-            <xs:attributeGroup ref="xhtml.link.target.attlist">
-                <xs:annotation>
-                    <xs:documentation>
-                      XHTML Target Module - Attribute additions
-                     </xs:documentation>
-                </xs:annotation>
-            </xs:attributeGroup>
-        </xs:attributeGroup>
-    </xs:redefine>
-    <xs:include schemaLocation="http://www.w3.org/MarkUp/SCHEMA/xhtml-meta-1.xsd">
-        <xs:annotation>
-            <xs:documentation>
-        Meta module
-
-        Elements defined here:
-        * meta
-      </xs:documentation>
-            <xs:documentation source="http://www.w3.org/TR/xhtml-modularization/abstract_modules.html#s_metamodule"/>
-        </xs:annotation>
-    </xs:include>
-    <xs:redefine schemaLocation="http://www.w3.org/MarkUp/SCHEMA/xhtml-base-1.xsd">
-        <xs:annotation>
-            <xs:documentation>
-        Base module
-
-        Elements defined here:
-          * base
-      </xs:documentation>
-            <xs:documentation source="http://www.w3.org/TR/xhtml-modularization/abstract_modules.html#s_basemodule"/>
-        </xs:annotation>
-        <xs:attributeGroup name="xhtml.base.attlist">
-            <xs:annotation>
-                <xs:documentation>
-            Changes to XHTML base Attlist
-          </xs:documentation>
-            </xs:annotation>
-            <xs:attributeGroup ref="xhtml.base.attlist">
-                <xs:annotation>
-                    <xs:documentation>
-                Original Base Attributes (declared in Base Module)
-             </xs:documentation>
-                </xs:annotation>
-            </xs:attributeGroup>
-            <xs:attributeGroup ref="xhtml.base.target.attlist">
-                <xs:annotation>
-                    <xs:documentation>
-                XHTML Target Module - Attribute additions
-             </xs:documentation>
-                </xs:annotation>
-            </xs:attributeGroup>
-        </xs:attributeGroup>
-    </xs:redefine>
-    <xs:include schemaLocation="http://www.w3.org/MarkUp/SCHEMA/xhtml-script-1.xsd">
-        <xs:annotation>
-            <xs:documentation>
-        Scripting module
-
-        Elements defined here:
-          * script, noscript
-      </xs:documentation>
-            <xs:documentation source="http://www.w3.org/TR/xhtml-modularization/abstract_modules.html#s_scriptmodule"/>
-        </xs:annotation>
-    </xs:include>
-    <xs:include schemaLocation="http://www.w3.org/MarkUp/SCHEMA/xhtml-style-1.xsd">
-        <xs:annotation>
-            <xs:documentation>
-        Style module
-
-        Elements defined here:
-          * style
-      </xs:documentation>
-            <xs:documentation source="http://www.w3.org/TR/xhtml-modularization/abstract_modules.html#s_stylemodule"/>
-        </xs:annotation>
-    </xs:include>
-    <xs:include schemaLocation="http://www.w3.org/MarkUp/SCHEMA/xhtml-inlstyle-1.xsd">
-        <xs:annotation>
-            <xs:documentation>
-        Style attribute module
-
-        Attribute defined here:
-          * style
-      </xs:documentation>
-            <xs:documentation source="http://www.w3.org/TR/xhtml-modularization/abstract_modules.html#s_styleattributemodule"/>
-        </xs:annotation>
-    </xs:include>
-    <xs:redefine schemaLocation="http://www.w3.org/MarkUp/SCHEMA/xhtml-image-1.xsd">
-        <xs:annotation>
-            <xs:documentation>
-        Image module
-
-        Elements defined here:
-          * img
-      </xs:documentation>
-            <xs:documentation source="http://www.w3.org/TR/xhtml-modularization/abstract_modules.html#s_imagemodule"/>
-        </xs:annotation>
-        <xs:attributeGroup name="xhtml.img.attlist">
-            <xs:attributeGroup ref="xhtml.img.attlist">
-                <xs:annotation>
-                    <xs:documentation>
-                Original Image Attributes (in Image Module)
-             </xs:documentation>
-                </xs:annotation>
-            </xs:attributeGroup>
-            <xs:attributeGroup ref="xhtml.img.csim.attlist">
-                <xs:annotation>
-                    <xs:documentation>
-                Redefinition by Client Side Image Map Module
-             </xs:documentation>
-                </xs:annotation>
-            </xs:attributeGroup>
-            <xs:attributeGroup ref="xhtml.img.ssimap.attlist">
-                <xs:annotation>
-                    <xs:documentation>
-                Redefinition by Server Side Image Module
-             </xs:documentation>
-                </xs:annotation>
-            </xs:attributeGroup>
-        </xs:attributeGroup>
-    </xs:redefine>
-    <xs:redefine schemaLocation="http://www.w3.org/MarkUp/SCHEMA/xhtml-csismap-1.xsd">
-        <xs:annotation>
-            <xs:documentation>
-        Client-side mage maps module
-
-        Elements defined here:
-          * area, map
-      </xs:documentation>
-            <xs:documentation source="http://www.w3.org/TR/xhtml-modularization/abstract_modules.html#s_imapmodule"/>
-        </xs:annotation>
-        <xs:attributeGroup name="xhtml.area.attlist">
-            <xs:attributeGroup ref="xhtml.area.attlist">
-                <xs:annotation>
-                    <xs:documentation>
-                Original Area Attributes (in CSI Module)
-             </xs:documentation>
-                </xs:annotation>
-            </xs:attributeGroup>
-            <xs:attributeGroup ref="xhtml.area.events.attlist">
-                <xs:annotation>
-                    <xs:documentation>
-                Redefinition by Events Attribute Module
-             </xs:documentation>
-                </xs:annotation>
-            </xs:attributeGroup>
-            <xs:attributeGroup ref="xhtml.area.target.attlist">
-                <xs:annotation>
-                    <xs:documentation>
-                Target Module - Area Attribute Additions
-             </xs:documentation>
-                </xs:annotation>
-            </xs:attributeGroup>
-        </xs:attributeGroup>
-    </xs:redefine>
-    <xs:include schemaLocation="http://www.w3.org/MarkUp/SCHEMA/xhtml-ssismap-1.xsd">
-        <xs:annotation>
-            <xs:documentation>
-       Server-side image maps module
-
-        Attributes defined here:
-          * ismap on img
-      </xs:documentation>
-            <xs:documentation source="http://www.w3.org/TR/xhtml-modularization/abstract_modules.html#s_servermapmodule"/>
-        </xs:annotation>
-    </xs:include>
-    <xs:redefine schemaLocation="http://www.w3.org/MarkUp/SCHEMA/xhtml-object-1.xsd">
-        <xs:annotation>
-            <xs:documentation>
-        Object module
-
-        Elements defined here:
-          * object
-      </xs:documentation>
-            <xs:documentation source="http://www.w3.org/TR/xhtml-modularization/abstract_modules.html#s_objectmodule"/>
-        </xs:annotation>
-        <xs:attributeGroup name="xhtml.object.attlist">
-            <xs:attributeGroup ref="xhtml.object.attlist">
-                <xs:annotation>
-                    <xs:documentation>
-                Original Object Attlist
-              </xs:documentation>
-                </xs:annotation>
-            </xs:attributeGroup>
-            <xs:attributeGroup ref="xhtml.object.csim.attlist">
-                <xs:annotation>
-                    <xs:documentation>
-                Redefinition by Client Image Map Module
-              </xs:documentation>
-                </xs:annotation>
-            </xs:attributeGroup>
-        </xs:attributeGroup>
-    </xs:redefine>
-    <xs:include schemaLocation="http://www.w3.org/MarkUp/SCHEMA/xhtml-param-1.xsd">
-        <xs:annotation>
-            <xs:documentation>
-        Param module
-
-        Elements defined here:
-          * param
-      </xs:documentation>
-        </xs:annotation>
-    </xs:include>
-    <xs:include schemaLocation="http://www.w3.org/MarkUp/SCHEMA/xhtml-table-1.xsd">
-        <xs:annotation>
-            <xs:documentation>
-        Tables module
-
-        Elements defined here:
-          * table, caption, thead, tfoot, tbody, colgroup, col, tr, th, td
-      </xs:documentation>
-            <xs:documentation source="http://www.w3.org/TR/xhtml-modularization/abstract_modules.html#s_tablemodule"/>
-        </xs:annotation>
-    </xs:include>
-    <xs:redefine schemaLocation="http://www.w3.org/MarkUp/SCHEMA/xhtml-form-1.xsd">
-        <xs:annotation>
-            <xs:documentation>
-            Forms module
-
-            Elements defined here:
-              * form, label, input, select, optgroup, option,
-              * textarea, fieldset, legend, button
-          </xs:documentation>
-            <xs:documentation source="http://www.w3.org/TR/xhtml-modularization/abstract_modules.html#s_extformsmodule"/>
-        </xs:annotation>
-        <xs:attributeGroup name="xhtml.form.attlist">
-            <xs:annotation>
-                <xs:documentation>
-            Changes to XHTML Form Attlist
-          </xs:documentation>
-            </xs:annotation>
-            <xs:attributeGroup ref="xhtml.form.attlist">
-                <xs:annotation>
-                    <xs:documentation>
-                Original Form Attributes (declared in Forms Module)
-             </xs:documentation>
-                </xs:annotation>
-            </xs:attributeGroup>
-            <xs:attributeGroup ref="xhtml.form.events.attlist">
-                <xs:annotation>
-                    <xs:documentation>
-                XHTML Events Module - Attribute additions
-             </xs:documentation>
-                </xs:annotation>
-            </xs:attributeGroup>
-            <xs:attributeGroup ref="xhtml.form.target.attlist">
-                <xs:annotation>
-                    <xs:documentation>
-                      XHTML Target Module - Attribute additions
-                     </xs:documentation>
-                </xs:annotation>
-            </xs:attributeGroup>
-        </xs:attributeGroup>
-        <xs:attributeGroup name="xhtml.input.attlist">
-            <xs:annotation>
-                <xs:documentation>
-            Changes to XHTML Form Input Element
-          </xs:documentation>
-            </xs:annotation>
-            <xs:attributeGroup ref="xhtml.input.attlist">
-                <xs:annotation>
-                    <xs:documentation>
-                Original Input Attributes (in Forms Module)
-             </xs:documentation>
-                </xs:annotation>
-            </xs:attributeGroup>
-            <xs:attributeGroup ref="xhtml.input.csim.attlist">
-                <xs:annotation>
-                    <xs:documentation>
-                Redefinition by Client Side Image Map Module
-             </xs:documentation>
-                </xs:annotation>
-            </xs:attributeGroup>
-            <xs:attributeGroup ref="xhtml.input.ssimap.attlist">
-                <xs:annotation>
-                    <xs:documentation>
-                Redefinition by Server Side Image Map Module
-             </xs:documentation>
-                </xs:annotation>
-            </xs:attributeGroup>
-            <xs:attributeGroup ref="xhtml.input.events.attlist">
-                <xs:annotation>
-                    <xs:documentation>
-               Redefinition by Event Attribute Module
-             </xs:documentation>
-                </xs:annotation>
-            </xs:attributeGroup>
-        </xs:attributeGroup>
-        <xs:attributeGroup name="xhtml.label.attlist">
-            <xs:attributeGroup ref="xhtml.label.attlist">
-                <xs:annotation>
-                    <xs:documentation>
-                Original Label Attributes (in Forms Module)
-             </xs:documentation>
-                </xs:annotation>
-            </xs:attributeGroup>
-            <xs:attributeGroup ref="xhtml.label.events.attlist">
-                <xs:annotation>
-                    <xs:documentation>
-               Redefinition by Event Attribute Module
-             </xs:documentation>
-                </xs:annotation>
-            </xs:attributeGroup>
-        </xs:attributeGroup>
-        <xs:attributeGroup name="xhtml.select.attlist">
-            <xs:attributeGroup ref="xhtml.select.attlist">
-                <xs:annotation>
-                    <xs:documentation>
-                Original Select Attributes (in Forms Module)
-             </xs:documentation>
-                </xs:annotation>
-            </xs:attributeGroup>
-            <xs:attributeGroup ref="xhtml.select.events.attlist">
-                <xs:annotation>
-                    <xs:documentation>
-               Redefinition by Event Attribute Module
-             </xs:documentation>
-                </xs:annotation>
-            </xs:attributeGroup>
-        </xs:attributeGroup>
-        <xs:attributeGroup name="xhtml.textarea.attlist">
-            <xs:attributeGroup ref="xhtml.textarea.attlist">
-                <xs:annotation>
-                    <xs:documentation>
-                Original TextArea Attributes (in Forms Module)
-             </xs:documentation>
-                </xs:annotation>
-            </xs:attributeGroup>
-            <xs:attributeGroup ref="xhtml.textarea.events.attlist">
-                <xs:annotation>
-                    <xs:documentation>
-               Redefinition by Event Attribute Module
-             </xs:documentation>
-                </xs:annotation>
-            </xs:attributeGroup>
-        </xs:attributeGroup>
-        <xs:attributeGroup name="xhtml.button.attlist">
-            <xs:attributeGroup ref="xhtml.button.attlist">
-                <xs:annotation>
-                    <xs:documentation>
-                Original Button Attributes (in Forms Module)
-             </xs:documentation>
-                </xs:annotation>
-            </xs:attributeGroup>
-            <xs:attributeGroup ref="xhtml.button.events.attlist">
-                <xs:annotation>
-                    <xs:documentation>
-               Redefinition by Event Attribute Module
-             </xs:documentation>
-                </xs:annotation>
-            </xs:attributeGroup>
-        </xs:attributeGroup>
-    </xs:redefine>
-    <xs:include schemaLocation="http://www.w3.org/MarkUp/SCHEMA/xhtml-ruby-1.xsd">
-      <xs:annotation>
-      <xs:documentation>
-        Ruby module
-
-        Elements defined here:
-          * ruby, rbc, rtc, rb, rt, rp
-
-        Note that either Ruby or Basic Ruby should be used but not both
-      </xs:documentation>
-      <xs:documentation source="http://www.w3.org/TR/2001/REC-ruby-20010531/#complex"/>
-      </xs:annotation>
-    </xs:include>
-    <xs:include schemaLocation="http://www.w3.org/MarkUp/SCHEMA/xhtml-events-1.xsd">
-        <xs:annotation>
-            <xs:documentation>
-        XHTML Events Modules
-
-        Attributes defined here:
-          XHTML Event Types
-      </xs:documentation>
-            <xs:documentation source="http://www.w3.org/TR/xhtml-modularization/abstract_modules.html#s_intrinsiceventsmodule"/>
-        </xs:annotation>
-    </xs:include>
-    <xs:include schemaLocation="http://www.w3.org/MarkUp/SCHEMA/xhtml-target-1.xsd">
-        <xs:annotation>
-            <xs:documentation>
-        XHTML Target Attribute Module
-
-        Attributes defined here:
-          target
-      </xs:documentation>
-            <xs:documentation source="http://www.w3.org/TR/xhtml-modularization/abstract_modules.html#s_targetmodule"/>
-        </xs:annotation>
-    </xs:include>
-</xs:schema>
diff --git a/org.argeo.cms/src/org/argeo/cms/acr/schemas/xhtml11.xsd b/org.argeo.cms/src/org/argeo/cms/acr/schemas/xhtml11.xsd
deleted file mode 100644 (file)
index 3416999..0000000
+++ /dev/null
@@ -1,104 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<xs:schema
-    xmlns:xs="http://www.w3.org/2001/XMLSchema"
-    targetNamespace="http://www.w3.org/1999/xhtml"
-    xmlns:xh11d="http://www.w3.org/1999/xhtml/datatypes/"
-    xmlns="http://www.w3.org/1999/xhtml"
-    elementFormDefault="qualified" >
-    <xs:annotation>
-        <xs:documentation>
-      This is the XML Schema driver for XHTML 1.1.
-      Please use this namespace for XHTML elements:
-
-         "http://www.w3.org/1999/xhtml"
-
-      $Id: xhtml11.xsd,v 1.7 2009/02/03 15:14:49 ahby Exp $
-    </xs:documentation>
-        <xs:documentation source="xhtml-copyright-1.xsd"/>
-    </xs:annotation>
-    <xs:annotation>
-        <xs:documentation>
-      This is XHTML, a reformulation of HTML as a modular XML application
-      The Extensible HyperText Markup Language (XHTML)
-      Copyright &#169;1998-2007 World Wide Web Consortium
-      (Massachusetts Institute of Technology, European Research Consortium
-       for Informatics and Mathematics, Keio University).
-      All Rights Reserved.
-
-      Permission to use, copy, modify and distribute the XHTML Schema
-      modules and their accompanying xs:documentation for any purpose
-      and without fee is hereby granted in perpetuity, provided that the above
-      copyright notice and this paragraph appear in all copies.
-      The copyright holders make no representation about the suitability of
-      these XML Schema modules for any purpose.
-
-      They are provided "as is" without expressed or implied warranty.
-    </xs:documentation>
-    </xs:annotation>
-    <xs:annotation>
-        <xs:documentation>
-      This is the Schema Driver file for XHTML1.1
-      Document Type
-
-     This schema
-        + imports external schemas (xml.xsd)
-        + refedines (and include)s schema modules for XHTML1.1 Document Type.
-        + includes Schema for Named content model for the
-          XHTML1.1 Document Type
-
-        XHTML1.1 Document Type includes the following Modules
-           XHTML Core modules (Required for XHTML Family Conformance)
-            +  text
-            +  hypertext
-            +  lists
-            +  structure
-           Other XHTML modules
-            +  Edit
-            +  Bdo
-            +  Presentational
-            +  Link
-            +  Meta
-            +  Base
-            +  Scripting
-            +  Style
-            +  Image
-            +  Applet
-            +  Object
-            +  Param (Applet/Object modules require Param Module)
-            +  Tables
-            +  Forms
-            +  Client side image maps
-            +  Server side image maps
-            +  Ruby
-    </xs:documentation>
-    </xs:annotation>
-    <xs:import
-        namespace="http://www.w3.org/XML/1998/namespace"
-        schemaLocation="http://www.w3.org/2001/xml.xsd">
-        <xs:annotation>
-            <xs:documentation>
-         This import brings in the XML namespace attributes
-         The XML attributes are used by various modules.
-       </xs:documentation>
-        </xs:annotation>
-    </xs:import>
-    <xs:include
-        schemaLocation="xhtml11-model-1.xsd">
-        <xs:annotation>
-            <xs:documentation>
-        Document Model module for the XHTML1.1 Document Type.
-        This schema file defines all named models used by XHTML
-        Modularization Framework for XHTML1.1 Document Type
-      </xs:documentation>
-        </xs:annotation>
-    </xs:include>
-    <xs:include
-        schemaLocation="xhtml11-modules-1.xsd">
-        <xs:annotation>
-            <xs:documentation>
-        Schema that includes all modules (and redefinitions)
-        for XHTML1.1 Document Type.                
-           </xs:documentation>
-        </xs:annotation>
-    </xs:include>
-</xs:schema>
index 6e2c6c435df469d5256ab27f4b3472710e2187e7..dfb0a56a27a554691706907b22f014f22a63ff23 100644 (file)
@@ -8,12 +8,9 @@ import java.time.ZoneOffset;
 import java.time.ZonedDateTime;
 import java.util.ArrayList;
 import java.util.Arrays;
-import java.util.Collections;
 import java.util.Dictionary;
 import java.util.HashMap;
 import java.util.HashSet;
-import java.util.Hashtable;
-import java.util.LinkedHashMap;
 import java.util.List;
 import java.util.Map;
 import java.util.NavigableMap;
@@ -31,6 +28,7 @@ import org.argeo.api.cms.CmsLog;
 import org.argeo.cms.CmsUserManager;
 import org.argeo.cms.auth.CurrentUser;
 import org.argeo.cms.auth.UserAdminUtils;
+import org.argeo.osgi.useradmin.AggregatingUserAdmin;
 import org.argeo.osgi.useradmin.TokenUtils;
 import org.argeo.osgi.useradmin.UserDirectory;
 import org.argeo.util.directory.DirectoryConf;
@@ -64,8 +62,18 @@ public class CmsUserManagerImpl implements CmsUserManager {
 //     private Map<String, String> serviceProperties;
        private WorkTransaction userTransaction;
 
-       private Map<UserDirectory, Hashtable<String, Object>> userDirectories = Collections
-                       .synchronizedMap(new LinkedHashMap<>());
+//     private Map<UserDirectory, Hashtable<String, Object>> userDirectories = Collections
+//                     .synchronizedMap(new LinkedHashMap<>());
+
+       private Set<UserDirectory> userDirectories = new HashSet<>();
+
+       public void start() {
+               log.debug(() -> "CMS user manager available");
+       }
+
+       public void stop() {
+
+       }
 
        @Override
        public String getMyMail() {
@@ -230,7 +238,7 @@ public class CmsUserManagerImpl implements CmsUserManager {
 
        public Map<String, String> getKnownBaseDns(boolean onlyWritable) {
                Map<String, String> dns = new HashMap<String, String>();
-               for (UserDirectory userDirectory : userDirectories.keySet()) {
+               for (UserDirectory userDirectory : userDirectories) {
                        Boolean readOnly = userDirectory.isReadOnly();
                        String baseDn = userDirectory.getContext();
 
@@ -240,7 +248,7 @@ public class CmsUserManagerImpl implements CmsUserManager {
                                continue;
                        if (baseDn.equalsIgnoreCase(CmsConstants.TOKENS_BASEDN))
                                continue;
-                       dns.put(baseDn, DirectoryConf.propertiesAsUri(userDirectories.get(userDirectory)).toString());
+                       dns.put(baseDn, DirectoryConf.propertiesAsUri(userDirectory.getProperties()).toString());
 
                }
                return dns;
@@ -248,7 +256,7 @@ public class CmsUserManagerImpl implements CmsUserManager {
 
        public Set<UserDirectory> getUserDirectories() {
                TreeSet<UserDirectory> res = new TreeSet<>((o1, o2) -> o1.getContext().compareTo(o2.getContext()));
-               res.addAll(userDirectories.keySet());
+               res.addAll(userDirectories);
                return res;
        }
 
@@ -444,7 +452,7 @@ public class CmsUserManagerImpl implements CmsUserManager {
        public UserDirectory getDirectory(Role user) {
                String name = user.getName();
                NavigableMap<String, UserDirectory> possible = new TreeMap<>();
-               for (UserDirectory userDirectory : userDirectories.keySet()) {
+               for (UserDirectory userDirectory : userDirectories) {
                        if (name.endsWith(userDirectory.getContext())) {
                                possible.put(userDirectory.getContext(), userDirectory);
                        }
@@ -496,6 +504,13 @@ public class CmsUserManagerImpl implements CmsUserManager {
        /* DEPENDENCY INJECTION */
        public void setUserAdmin(UserAdmin userAdmin) {
                this.userAdmin = userAdmin;
+
+               if (userAdmin instanceof AggregatingUserAdmin) {
+                       userDirectories = ((AggregatingUserAdmin) userAdmin).getUserDirectories();
+               } else {
+                       throw new IllegalArgumentException("Only " + AggregatingUserAdmin.class.getName() + " is supported.");
+               }
+
 //             this.serviceProperties = serviceProperties;
        }
 
@@ -503,12 +518,12 @@ public class CmsUserManagerImpl implements CmsUserManager {
                this.userTransaction = userTransaction;
        }
 
-       public void addUserDirectory(UserDirectory userDirectory, Map<String, Object> properties) {
-               userDirectories.put(userDirectory, new Hashtable<>(properties));
-       }
-
-       public void removeUserDirectory(UserDirectory userDirectory, Map<String, Object> properties) {
-               userDirectories.remove(userDirectory);
-       }
+//     public void addUserDirectory(UserDirectory userDirectory, Map<String, Object> properties) {
+//             userDirectories.put(userDirectory, new Hashtable<>(properties));
+//     }
+//
+//     public void removeUserDirectory(UserDirectory userDirectory, Map<String, Object> properties) {
+//             userDirectories.remove(userDirectory);
+//     }
 
 }
index 205ab35de7b0cc0f95ea1f5eb0618f2dc47568b3..e5a5048893a987ca1fae567ea59f5aecbc127aaf 100644 (file)
@@ -36,6 +36,7 @@ import org.osgi.service.cm.ConfigurationAdmin;
 import org.osgi.service.cm.ConfigurationEvent;
 
 /** Manages the LDIF-based deployment configuration. */
+@Deprecated
 public class DeployConfig {
 
        private final CmsLog log = CmsLog.getLog(getClass());
index 5ba811c92941ad767e9b6ae626ddc4e6cd0dfe60..d01bc8554c68ea38af30a14913d97af7f5525bc9 100644 (file)
@@ -1,13 +1,8 @@
 package org.argeo.cms.internal.runtime;
 
-import java.io.IOException;
-import java.net.URL;
-import java.util.Dictionary;
-
 import org.argeo.api.cms.CmsDeployment;
 import org.argeo.api.cms.CmsLog;
 import org.argeo.api.cms.CmsState;
-import org.argeo.cms.internal.osgi.DeployConfig;
 import org.osgi.service.http.HttpService;
 
 /** Implementation of a CMS deployment. */
@@ -26,6 +21,8 @@ public class CmsDeploymentImpl implements CmsDeployment {
 //             if (deployConfig.hasDomain()) {
 //                     loadIpaJaasConfiguration();
 //             }
+
+               log.debug(() -> "CMS deployment available");
        }
 
 //     public void addFactoryDeployConfig(String factoryPid, Dictionary<String, Object> props) {
@@ -46,14 +43,14 @@ public class CmsDeploymentImpl implements CmsDeployment {
                return (httpExpected ? httpService != null : true);
        }
 
-       private void loadIpaJaasConfiguration() {
-               if (System.getProperty(KernelConstants.JAAS_CONFIG_PROP) == null) {
-                       String jaasConfig = KernelConstants.JAAS_CONFIG_IPA;
-                       URL url = getClass().getClassLoader().getResource(jaasConfig);
-                       KernelUtils.setJaasConfiguration(url);
-                       log.debug("Set IPA JAAS configuration.");
-               }
-       }
+//     private void loadIpaJaasConfiguration() {
+//             if (System.getProperty(KernelConstants.JAAS_CONFIG_PROP) == null) {
+//                     String jaasConfig = KernelConstants.JAAS_CONFIG_IPA;
+//                     URL url = getClass().getClassLoader().getResource(jaasConfig);
+//                     KernelUtils.setJaasConfiguration(url);
+//                     log.debug("Set IPA JAAS configuration.");
+//             }
+//     }
 
        public void stop() {
 //             if (deployConfig != null) {
@@ -67,6 +64,9 @@ public class CmsDeploymentImpl implements CmsDeployment {
 
        public void setCmsState(CmsState cmsState) {
                this.cmsState = cmsState;
+               String httpPort = this.cmsState.getDeployProperty("org.osgi.service.http.port");
+               String httpsPort = this.cmsState.getDeployProperty("org.osgi.service.http.port.secure");
+               httpExpected = httpPort != null || httpsPort != null;
        }
 
        public void setHttpService(HttpService httpService) {
index ae85a2fc836e73089eeb2d069ac56f0efdfd2994..b3ef895f145c3f0190176eb173ca1cc465c4a8fd 100644 (file)
@@ -1,17 +1,23 @@
 package org.argeo.cms.internal.runtime;
 
+import java.io.IOException;
+import java.io.InputStream;
 import java.net.InetAddress;
 import java.net.URL;
 import java.net.UnknownHostException;
+import java.nio.file.Files;
 import java.nio.file.Path;
+import java.util.TreeMap;
 import java.util.UUID;
 
 import javax.security.auth.login.Configuration;
 
+import org.argeo.api.cms.CmsConstants;
 import org.argeo.api.cms.CmsLog;
 import org.argeo.api.cms.CmsState;
 import org.argeo.api.uuid.UuidFactory;
 import org.argeo.cms.auth.ident.IdentClient;
+import org.argeo.util.directory.ldap.LdifParser;
 
 /**
  * Implementation of a {@link CmsState}, initialising the required services.
@@ -54,10 +60,14 @@ public class CmsStateImpl implements CmsState {
                                // (clean state) " : " "));
                                log.debug("## CMS starting... (" + uuid + ")");
 
+
 //             initI18n();
 //             initServices();
+                       if (!Files.exists(getDataPath(CmsConstants.NODE))) {// first init
+                               firstInit();
+                       }
 
-               } catch (RuntimeException e) {
+               } catch (RuntimeException | IOException e) {
                        log.error("## FATAL: CMS activator failed", e);
                }
        }
@@ -82,6 +92,12 @@ public class CmsStateImpl implements CmsState {
                log.info("## ARGEO CMS STOPPED after " + (duration / 60) + "h " + (duration % 60) + "min uptime ##");
        }
 
+       private void firstInit() throws IOException {
+               log.info("## FIRST INIT ##");
+               // FirstInit firstInit = new FirstInit();
+               InitUtils.prepareFirstInitInstanceArea();
+       }
+
        @Override
        public String getDeployProperty(String key) {
                return KernelUtils.getFrameworkProp(key);
@@ -89,7 +105,7 @@ public class CmsStateImpl implements CmsState {
 
        @Override
        public Path getDataPath(String relativePath) {
-               return  KernelUtils.getOsgiInstancePath(relativePath);
+               return KernelUtils.getOsgiInstancePath(relativePath);
        }
 
        @Override
index 18a880e31470f2738bb5af79dd3e696c3fca5190..e73d96f65ec7ab80c5abe7f14d13faa05c8028d5 100644 (file)
@@ -82,6 +82,7 @@ public class CmsUserAdmin extends AggregatingUserAdmin {
                        if (userDirectory.getRealm().isPresent())
                                loadIpaJaasConfiguration();
                }
+               log.debug(() -> "CMS user admin available");
        }
 
        public void stop() {
index 551062379a6047d9fbb733aee597719ca6b16d29..aa7d8f884dbc0584098bd346319c6ee45f3b5436 100644 (file)
@@ -3,9 +3,8 @@ package org.argeo.cms.internal.runtime;
 import java.io.IOException;
 import java.nio.file.Files;
 import java.nio.file.Path;
-import java.util.Map;
 
-import org.argeo.api.acr.spi.ContentProvider;
+import org.argeo.api.cms.CmsLog;
 import org.argeo.cms.CmsUserManager;
 import org.argeo.cms.acr.CmsContentRepository;
 import org.argeo.cms.acr.directory.DirectoryContentProvider;
@@ -14,10 +13,13 @@ import org.argeo.cms.acr.fs.FsContentProvider;
 public class DeployedContentRepository extends CmsContentRepository {
        private final static String ROOT_XML = "cr:root.xml";
 
+       private final static CmsLog log = CmsLog.getLog(DeployedContentRepository.class);
+
        private CmsUserManager userManager;
 
        @Override
        public void start() {
+               long begin = System.currentTimeMillis();
                try {
                        super.start();
                        Path rootXml = KernelUtils.getOsgiInstancePath(ROOT_XML);
@@ -40,6 +42,8 @@ public class DeployedContentRepository extends CmsContentRepository {
                } catch (IOException e) {
                        throw new IllegalStateException("Cannot start content repository", e);
                }
+               long duration = System.currentTimeMillis()-begin;
+               log.debug(() -> "CMS content repository available (initialisation took "+duration+" ms)");
        }
 
        @Override
index 916a413a917013b6ce3999376e7855493ca0b73b..c88ebb8bdb95eb308e42aba6edbc56c7ef56e836 100644 (file)
@@ -93,10 +93,10 @@ public class StaticCms {
 
                // User manager
                CmsUserManagerImpl userManager = new CmsUserManagerImpl();
-               for (UserDirectory userDirectory : userAdmin.getUserDirectories()) {
-                       // FIXME deal with properties
-                       userManager.addUserDirectory(userDirectory, new HashMap<>());
-               }
+//             for (UserDirectory userDirectory : userAdmin.getUserDirectories()) {
+//                     // FIXME deal with properties
+//                     userManager.addUserDirectory(userDirectory, new HashMap<>());
+//             }
                Component<CmsUserManagerImpl> userManagerC = new Component.Builder<>(userManager) //
                                .addType(CmsUserManager.class) //
                                .addDependency(userAdminC.getType(UserAdmin.class), userManager::setUserAdmin, null) //