[exo-jcr-commits] exo-jcr SVN: r1013 - in kernel/branches/config-branch: exo.kernel.container/src/main/java/org/exoplatform/container/configuration and 5 other directories.

do-not-reply at jboss.org do-not-reply at jboss.org
Fri Dec 11 15:44:15 EST 2009


Author: julien_viet
Date: 2009-12-11 15:44:15 -0500 (Fri, 11 Dec 2009)
New Revision: 1013

Added:
   kernel/branches/config-branch/exo.kernel.container/src/main/java/org/exoplatform/container/configuration/ProfileDOMFilter.java
   kernel/branches/config-branch/exo.kernel.container/src/main/resources/org/exoplatform/container/configuration/kernel-configuration_1_1.xsd
   kernel/branches/config-branch/exo.kernel.container/src/main/resources/xsd_1_1/
   kernel/branches/config-branch/exo.kernel.container/src/main/resources/xsd_1_1/sample-configuration-17.xml
Modified:
   kernel/branches/config-branch/exo.kernel.commons/src/main/java/org/exoplatform/commons/utils/Tools.java
   kernel/branches/config-branch/exo.kernel.container/src/main/java/org/exoplatform/container/configuration/ConfigurationUnmarshaller.java
   kernel/branches/config-branch/exo.kernel.container/src/main/java/org/exoplatform/container/configuration/NoKernelNamespaceSAXFilter.java
   kernel/branches/config-branch/exo.kernel.container/src/main/resources/xsd_1_0/sample-configuration-01.xml
   kernel/branches/config-branch/exo.kernel.container/src/main/resources/xsd_1_0/sample-configuration-02.xml
   kernel/branches/config-branch/exo.kernel.container/src/main/resources/xsd_1_0/sample-configuration-03.xml
   kernel/branches/config-branch/exo.kernel.container/src/main/resources/xsd_1_0/sample-configuration-04.xml
   kernel/branches/config-branch/exo.kernel.container/src/main/resources/xsd_1_0/sample-configuration-05.xml
   kernel/branches/config-branch/exo.kernel.container/src/main/resources/xsd_1_0/sample-configuration-06.xml
   kernel/branches/config-branch/exo.kernel.container/src/main/resources/xsd_1_0/sample-configuration-07.xml
   kernel/branches/config-branch/exo.kernel.container/src/main/resources/xsd_1_0/sample-configuration-08.xml
   kernel/branches/config-branch/exo.kernel.container/src/main/resources/xsd_1_0/sample-configuration-09.xml
   kernel/branches/config-branch/exo.kernel.container/src/main/resources/xsd_1_0/sample-configuration-10.xml
   kernel/branches/config-branch/exo.kernel.container/src/main/resources/xsd_1_0/sample-configuration-11.xml
   kernel/branches/config-branch/exo.kernel.container/src/main/resources/xsd_1_0/sample-configuration-12.xml
   kernel/branches/config-branch/exo.kernel.container/src/main/resources/xsd_1_0/sample-configuration-13.xml
   kernel/branches/config-branch/exo.kernel.container/src/main/resources/xsd_1_0/sample-configuration-14.xml
   kernel/branches/config-branch/exo.kernel.container/src/main/resources/xsd_1_0/sample-configuration-16.xml
   kernel/branches/config-branch/exo.kernel.container/src/test/resources/org/exoplatform/container/configuration/component-configuration.xml
   kernel/branches/config-branch/exo.kernel.container/src/test/resources/org/exoplatform/container/configuration/import-configuration.xml
   kernel/branches/config-branch/exo.kernel.container/src/test/resources/org/exoplatform/container/configuration/init-param-configuration.xml
Log:
- profile handling using a profile attribute
- added kernel 1.1 schema to handle profile attribute in the schema


Modified: kernel/branches/config-branch/exo.kernel.commons/src/main/java/org/exoplatform/commons/utils/Tools.java
===================================================================
--- kernel/branches/config-branch/exo.kernel.commons/src/main/java/org/exoplatform/commons/utils/Tools.java	2009-12-11 16:34:30 UTC (rev 1012)
+++ kernel/branches/config-branch/exo.kernel.commons/src/main/java/org/exoplatform/commons/utils/Tools.java	2009-12-11 20:44:15 UTC (rev 1013)
@@ -51,4 +51,17 @@
       return set;
    }
 
+   public static Set<String> parseCommaList(String s)
+   {
+      Set<String> set = new HashSet<String>();
+      for (String v : s.split(","))
+      {
+         v = v.trim();
+         if (v.length() > 0)
+         {
+            set.add(v);
+         }
+      }
+      return set;
+   }
 }

Modified: kernel/branches/config-branch/exo.kernel.container/src/main/java/org/exoplatform/container/configuration/ConfigurationUnmarshaller.java
===================================================================
--- kernel/branches/config-branch/exo.kernel.container/src/main/java/org/exoplatform/container/configuration/ConfigurationUnmarshaller.java	2009-12-11 16:34:30 UTC (rev 1012)
+++ kernel/branches/config-branch/exo.kernel.container/src/main/java/org/exoplatform/container/configuration/ConfigurationUnmarshaller.java	2009-12-11 20:44:15 UTC (rev 1013)
@@ -18,15 +18,14 @@
  */
 package org.exoplatform.container.configuration;
 
-import org.exoplatform.commons.utils.PropertyManager;
 import org.exoplatform.container.xml.Configuration;
 import org.exoplatform.services.log.ExoLogger;
 import org.exoplatform.services.log.Log;
 import org.jibx.runtime.BindingDirectory;
 import org.jibx.runtime.IBindingFactory;
 import org.jibx.runtime.IUnmarshallingContext;
+import org.w3c.dom.Document;
 import org.xml.sax.ErrorHandler;
-import org.xml.sax.InputSource;
 import org.xml.sax.SAXException;
 import org.xml.sax.SAXParseException;
 
@@ -35,14 +34,15 @@
 import java.io.StringWriter;
 import java.net.URL;
 import java.util.Collections;
-import java.util.HashSet;
 import java.util.Set;
 
 import javax.xml.XMLConstants;
-import javax.xml.parsers.SAXParser;
-import javax.xml.parsers.SAXParserFactory;
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
 import javax.xml.transform.OutputKeys;
 import javax.xml.transform.Transformer;
+import javax.xml.transform.dom.DOMSource;
+import javax.xml.transform.sax.SAXResult;
 import javax.xml.transform.sax.SAXTransformerFactory;
 import javax.xml.transform.sax.TransformerHandler;
 import javax.xml.transform.stream.StreamResult;
@@ -182,25 +182,32 @@
          log.info("The configuration file " + url + " was not found valid according to its XSD");
       }
 
-      // The buffer
+      // Perform
+      DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
+      factory.setNamespaceAware(true);
+      DocumentBuilder builder = factory.newDocumentBuilder();
+      Document doc = builder.parse(url.openStream());
+
+      // Filter DOM
+      ProfileDOMFilter filter = new ProfileDOMFilter(profiles);
+      filter.process(doc.getDocumentElement());
+
+      // SAX event stream -> String
       StringWriter buffer = new StringWriter();
-
-      // Create a sax transformer result that will serialize the output
       SAXTransformerFactory tf = (SAXTransformerFactory)SAXTransformerFactory.newInstance();
-      final TransformerHandler hd = tf.newTransformerHandler();
-      hd.setResult(new StreamResult(buffer));
+      TransformerHandler hd = tf.newTransformerHandler();
+      StreamResult result = new StreamResult(buffer);
+      hd.setResult(result);
       Transformer serializer = tf.newTransformer();
       serializer.setOutputProperty(OutputKeys.ENCODING, "UTF8");
       serializer.setOutputProperty(OutputKeys.INDENT, "yes");
 
-      // Perform
-      InputSource source = new InputSource(url.openStream());
-      SAXParserFactory spf = SAXParserFactory.newInstance();
-      SAXParser saxParser = spf.newSAXParser();
-      saxParser.getXMLReader().setFeature("http://xml.org/sax/features/namespaces", true);
-      saxParser.getXMLReader().setFeature("http://xml.org/sax/features/namespace-prefixes", true);
-      saxParser.parse(source, new NoKernelNamespaceSAXFilter(profiles, hd));
+      // Transform -> SAX event stream
+      SAXResult saxResult = new SAXResult(new NoKernelNamespaceSAXFilter(hd));
 
+      // DOM -> Transform
+      serializer.transform(new DOMSource(doc), saxResult);
+
       // Reuse the parsed document
       String document = buffer.toString();
 
@@ -212,5 +219,4 @@
       IUnmarshallingContext uctx = bfact.createUnmarshallingContext();
       return (Configuration)uctx.unmarshalDocument(new StringReader(document), null);
    }
-
 }

Modified: kernel/branches/config-branch/exo.kernel.container/src/main/java/org/exoplatform/container/configuration/NoKernelNamespaceSAXFilter.java
===================================================================
--- kernel/branches/config-branch/exo.kernel.container/src/main/java/org/exoplatform/container/configuration/NoKernelNamespaceSAXFilter.java	2009-12-11 16:34:30 UTC (rev 1012)
+++ kernel/branches/config-branch/exo.kernel.container/src/main/java/org/exoplatform/container/configuration/NoKernelNamespaceSAXFilter.java	2009-12-11 20:44:15 UTC (rev 1013)
@@ -44,24 +44,24 @@
    private static final Log log = ExoLogger.getExoLogger(NoKernelNamespaceSAXFilter.class);
 
    /** . */
-   private static final String KERNEL_URI = "http://www.exoplaform.org/xml/ns/kernel_1_0.xsd";
+   private static final String KERNEL_1_0_URI = "http://www.exoplaform.org/xml/ns/kernel_1_0.xsd";
 
    /** . */
-   private static final String XSI_URI = "http://www.w3.org/2001/XMLSchema-instance";
+   private static final String KERNEL_1_1_URI = "http://www.exoplaform.org/xml/ns/kernel_1_1.xsd";
 
    /** . */
-   private final Set<String> activeProfiles;
+   private static final String XSI_URI = "http://www.w3.org/2001/XMLSchema-instance";
 
    /** . */
    private ContentHandler contentHandler;
 
    /** . */
-   private final Set<String> blackListedPrefixes = new HashSet<String>();
+   private final Set<String> blackListedPrefixes;
 
-   NoKernelNamespaceSAXFilter(Set<String> activeProfiles, ContentHandler contentHandler)
+   NoKernelNamespaceSAXFilter(ContentHandler contentHandler)
    {
       this.contentHandler = contentHandler;
-      this.activeProfiles = activeProfiles;
+      this.blackListedPrefixes = new HashSet<String>();
    }
 
    public void setDocumentLocator(Locator locator)
@@ -81,176 +81,117 @@
 
    public void startPrefixMapping(String prefix, String uri) throws SAXException
    {
-      if (depth == 0)
+      if (KERNEL_1_0_URI.equals(uri) || KERNEL_1_1_URI.equals(uri) || XSI_URI.equals(uri))
       {
-         if (KERNEL_URI.equals(uri) || XSI_URI.equals(uri))
-         {
-            blackListedPrefixes.add(prefix);
-            log.debug("Black listing prefix " + prefix + " with uri " + uri);
-         }
-         else
-         {
-            contentHandler.startPrefixMapping(prefix, uri);
-            log.debug("Start prefix mapping " + prefix + " with uri " + uri);
-         }
+         blackListedPrefixes.add(prefix);
+         log.debug("Black listing prefix " + prefix + " with uri " + uri);
       }
+      else
+      {
+         contentHandler.startPrefixMapping(prefix, uri);
+         log.debug("Start prefix mapping " + prefix + " with uri " + uri);
+      }
    }
 
    public void endPrefixMapping(String prefix) throws SAXException
    {
-      if (depth == 0)
+      if (!blackListedPrefixes.remove(prefix))
       {
-         if (!blackListedPrefixes.remove(prefix))
-         {
-            log.debug("Ending prefix mapping " + prefix);
-            contentHandler.endPrefixMapping(prefix);
-         }
-         else
-         {
-            log.debug("Removed prefix mapping " + prefix + " from black list ");
-         }
+         log.debug("Ending prefix mapping " + prefix);
+         contentHandler.endPrefixMapping(prefix);
       }
+      else
+      {
+         log.debug("Removed prefix mapping " + prefix + " from black list ");
+      }
    }
 
    public void startElement(String uri, String localName, String qName, Attributes atts) throws SAXException
    {
-      if (depth == 0)
+      Set<String> profiles = null;
+      AttributesImpl noNSAtts = new AttributesImpl();
+      for (int i = 0;i < atts.getLength();i++)
       {
-         AttributesImpl noNSAtts = new AttributesImpl();
-         for (int i = 0;i < atts.getLength();i++)
+         String attQName = atts.getQName(i);
+         if ((attQName.equals("xmlns")) && blackListedPrefixes.contains(""))
          {
-            String attQName = atts.getQName(i);
-            if ((attQName.equals("xmlns")) && blackListedPrefixes.contains(""))
-            {
-               // Skip
-               log.debug("Skipping black listed xmlns attribute");
-            }
-            else if (attQName.startsWith("xmlns:") && blackListedPrefixes.contains(attQName.substring(6)))
-            {
-               // Skip
-               log.debug("Skipping black listed " + attQName + " attribute");
-            }
-            else
-            {
-               String attURI = atts.getURI(i);
-               String attLocalName = atts.getLocalName(i);
-               String attType = atts.getType(i);
-               String attValue = atts.getValue(i);
-
-               //
-               if (XSI_URI.equals(attURI))
-               {
-                  // Skip
-                  log.debug("Skipping XSI " + attQName + " attribute");
-                  continue;
-               }
-
-               //
-               noNSAtts.addAttribute(attURI, attLocalName, attQName, attType, attValue);
-            }
+            // Skip
+            log.debug("Skipping black listed xmlns attribute");
          }
-
-         //
-         if (KERNEL_URI.equals(uri))
+         else if (attQName.startsWith("xmlns:") && blackListedPrefixes.contains(attQName.substring(6)))
          {
-            if (!localName.equals(qName))
+            // Skip
+            log.debug("Skipping black listed " + attQName + " attribute");
+         }
+         else
+         {
+            String attURI = atts.getURI(i);
+            String attLocalName = atts.getLocalName(i);
+            String attType = atts.getType(i);
+            String attValue = atts.getValue(i);
+
+            //
+            if (XSI_URI.equals(attURI))
             {
-               String prefix = qName.substring(0, qName.indexOf(':'));
-               if (activeProfiles.contains(prefix))
-               {
-                  log.debug("Requalifying active profile " + qName + " start element to " + localName);
-                  qName = localName;
-                  uri = null;
-               }
-               else
-               {
-                  log.debug("Inhibitting element passive profile " + qName + " start element");
-                  depth++;
-               }
+               // Skip
+               log.debug("Skipping XSI " + attQName + " attribute");
+               continue;
             }
-            else
+            else if (KERNEL_1_0_URI.equals(attURI) || KERNEL_1_1_URI.equals(attURI))
             {
-               // Need to clear the URI
-               uri = null;
+               log.debug("Requalifying prefixed attribute " + attQName + " attribute to " + localName);
+               attURI = null;
+               attQName = localName;
             }
-         }
 
-         //
-         if (depth == 0)
-         {
-            log.debug("Propagatting " + qName + " start element");
-            contentHandler.startElement(uri, localName, qName, noNSAtts);
+            //
+            noNSAtts.addAttribute(attURI, attLocalName, attQName, attType, attValue);
          }
       }
-      else
+
+      //
+      if (KERNEL_1_0_URI.equals(uri) || KERNEL_1_1_URI.equals(uri))
       {
-         log.debug("Skipping " + qName + " start element");
-         depth++;
+         log.debug("Requalifying active profile " + qName + " start element to " + localName);
+         qName = localName;
+         uri = null;
       }
 
+      //
+      contentHandler.startElement(uri, localName, qName, noNSAtts);
    }
 
-   private int depth;
-
    public void endElement(String uri, String localName, String qName) throws SAXException
    {
-      if (depth == 0)
+      if (KERNEL_1_0_URI.equals(uri) || KERNEL_1_1_URI.equals(uri))
       {
-         if (KERNEL_URI.endsWith(uri))
-         {
-            log.debug("Requalifying " + qName + " end element");
-            qName = localName;
-            uri = null;
-         }
-
-         //
-         log.debug("Propagatting " + qName + " end element");
-         contentHandler.endElement(uri, localName, qName);
+         log.debug("Requalifying " + qName + " end element");
+         qName = localName;
+         uri = null;
       }
-      else
-      {
-         log.debug("Skipping " + qName + " end element");
-         depth--;
-      }
+
+      //
+      log.debug("Propagatting " + qName + " end element");
+      contentHandler.endElement(uri, localName, qName);
    }
 
    public void characters(char[] ch, int start, int length) throws SAXException
    {
-      if (depth == 0)
-      {
-         contentHandler.characters(ch, start, length);
-      }
-      else
-      {
-         log.debug("Skipping " + new String(ch, start, length) + " end element");
-      }
+      contentHandler.characters(ch, start, length);
    }
 
    public void ignorableWhitespace(char[] ch, int start, int length) throws SAXException
    {
-      if (depth == 0)
-      {
-         contentHandler.ignorableWhitespace(ch, start, length);
-      }
-      else
-      {
-         log.debug("Skipping " + new String(ch, start, length) + " white space");
-      }
+      contentHandler.ignorableWhitespace(ch, start, length);
    }
 
    public void processingInstruction(String target, String data) throws SAXException
    {
-      if (depth == 0)
-      {
-         contentHandler.processingInstruction(target, data);
-      }
+      contentHandler.processingInstruction(target, data);
    }
 
    public void skippedEntity(String name) throws SAXException
    {
-      if (depth == 0)
-      {
-         contentHandler.skippedEntity(name);
-      }
+      contentHandler.skippedEntity(name);
    }
 }

Added: kernel/branches/config-branch/exo.kernel.container/src/main/java/org/exoplatform/container/configuration/ProfileDOMFilter.java
===================================================================
--- kernel/branches/config-branch/exo.kernel.container/src/main/java/org/exoplatform/container/configuration/ProfileDOMFilter.java	                        (rev 0)
+++ kernel/branches/config-branch/exo.kernel.container/src/main/java/org/exoplatform/container/configuration/ProfileDOMFilter.java	2009-12-11 20:44:15 UTC (rev 1013)
@@ -0,0 +1,139 @@
+/*
+ * Copyright (C) 2003-2007 eXo Platform SAS.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Affero General Public License
+ * as published by the Free Software Foundation; either version 3
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, see<http://www.gnu.org/licenses/>.
+ */
+package org.exoplatform.container.configuration;
+
+import org.exoplatform.commons.utils.Tools;
+import org.w3c.dom.Attr;
+import org.w3c.dom.Element;
+import org.w3c.dom.NamedNodeMap;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+import java.util.Set;
+
+/**
+ * Filters a kernel DOM according to a list of active profiles.
+ *
+ * @author <a href="mailto:julien.viet at exoplatform.com">Julien Viet</a>
+ * @version $Revision$
+ */
+class ProfileDOMFilter
+{
+
+   /** . */
+   private static final String KERNEL_1_0_URI = "http://www.exoplaform.org/xml/ns/kernel_1_0.xsd";
+
+   /** . */
+   private static final String KERNEL_1_1_URI = "http://www.exoplaform.org/xml/ns/kernel_1_1.xsd";
+
+   /** . */
+   private static final String PROFILE_ATTRIBUTE = "profile";
+
+   /** . */
+   private static final Set<String> kernelURIs = Tools.set(KERNEL_1_0_URI, KERNEL_1_1_URI);
+
+   /** . */
+   private static final Set<String> kernelWithProfileURIs = Tools.set(KERNEL_1_1_URI);
+
+   /** . */
+   private final Set<String> activeProfiles;
+
+   public ProfileDOMFilter(Set<String> activeProfiles)
+   {
+      this.activeProfiles = activeProfiles;
+   }
+
+   public void process(Element elt)
+   {
+      if (kernelURIs.contains(elt.getNamespaceURI()))
+      {
+         // Check if element must be removed
+         NamedNodeMap attrs = elt.getAttributes();
+         if (attrs != null)
+         {
+            Set<String> profiles = null;
+            List<Attr> toRemove = null;
+            for (int i = 0;i < attrs.getLength();i++)
+            {
+               Attr attr = (Attr)attrs.item(i);
+               String attrURI = attr.getNamespaceURI();
+               if ((attrURI == null || kernelWithProfileURIs.contains(attrURI)) && PROFILE_ATTRIBUTE.equals(attr.getLocalName()))
+               {
+                  if (profiles == null)
+                  {
+                     profiles = Tools.parseCommaList(attr.getValue());
+                  }
+                  else
+                  {
+                     profiles.addAll(Tools.parseCommaList(attr.getValue()));
+                  }
+
+                  //
+                  if (toRemove == null)
+                  {
+                     toRemove = new ArrayList<Attr>();
+                  }
+                  toRemove.add(attr);
+               }
+            }
+
+            // Check if must we delete this node
+            if (profiles != null && Collections.disjoint(activeProfiles, profiles))
+            {
+               Node parent = elt.getParentNode();
+
+               // Remove it
+               parent.removeChild(elt);
+
+               // No more processing
+               return;
+            }
+
+            // Remove profile attributes
+            if (toRemove != null)
+            {
+               for (Attr attr : toRemove)
+               {
+                  elt.removeAttributeNode(attr);
+               }
+            }
+         }
+      }
+
+      // Make a copy as children may be removed and result
+      // in a concurrent modification
+      NodeList children = elt.getChildNodes();
+      ArrayList<Element> childElts = new ArrayList<Element>();
+      for (int i = 0;i < children.getLength();i++)
+      {
+         Node child = children.item(i);
+         if (child.getNodeType() == Node.ELEMENT_NODE)
+         {
+            childElts.add((Element)child);
+         }
+      }
+
+      // Process recursively
+      for (Element childElt : childElts)
+      {
+         process(childElt);
+      }
+   }
+}

Added: kernel/branches/config-branch/exo.kernel.container/src/main/resources/org/exoplatform/container/configuration/kernel-configuration_1_1.xsd
===================================================================
--- kernel/branches/config-branch/exo.kernel.container/src/main/resources/org/exoplatform/container/configuration/kernel-configuration_1_1.xsd	                        (rev 0)
+++ kernel/branches/config-branch/exo.kernel.container/src/main/resources/org/exoplatform/container/configuration/kernel-configuration_1_1.xsd	2009-12-11 20:44:15 UTC (rev 1013)
@@ -0,0 +1,225 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsd:schema
+     targetNamespace="http://www.exoplaform.org/xml/ns/kernel_1_1.xsd"
+     xmlns="http://www.exoplaform.org/xml/ns/kernel_1_1.xsd"
+     xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+     elementFormDefault="qualified"
+     attributeFormDefault="unqualified"
+     version="1.0">
+
+    <xsd:element name="configuration" type="configurationType"/>
+
+    <xsd:complexType abstract="true" name="profiledElementType">
+      <xsd:attribute name="profile" type="xsd:string"/>
+    </xsd:complexType>
+
+    <xsd:complexType abstract="true" name="baseObjectType">
+        <xsd:choice>
+            <xsd:element name="string" type="xsd:string"/>
+            <xsd:element name="int" type="xsd:int"/>
+            <xsd:element name="long" type="xsd:long"/>
+            <xsd:element name="boolean" type="xsd:boolean"/>
+            <xsd:element name="date" type="xsd:date"/>
+            <xsd:element name="double" type="xsd:double"/>
+            <xsd:element name="map" type="mapType"/>
+            <xsd:element name="collection" type="collectionType"/>
+            <xsd:element name="native-array" type="nativeArraytype"/>
+            <xsd:element name="object" type="objectType"/>
+        </xsd:choice>
+    </xsd:complexType>
+
+    <xsd:complexType name="valueType">
+        <xsd:complexContent>
+            <xsd:extension base="baseObjectType"/>
+        </xsd:complexContent>
+    </xsd:complexType>
+
+    <xsd:complexType name="entryType">
+        <xsd:sequence>
+            <xsd:element name="key" type="baseObjectType" minOccurs="1" maxOccurs="1"/>
+            <xsd:element name="value" type="baseObjectType" minOccurs="1" maxOccurs="1"/>
+        </xsd:sequence>
+    </xsd:complexType>
+
+    <xsd:complexType name="mapType">
+        <xsd:sequence>
+            <xsd:element name="type" type="xsd:string" minOccurs="1" maxOccurs="1"/>
+            <xsd:element name="entry" type="entryType" minOccurs="0" maxOccurs="unbounded"/>
+        </xsd:sequence>
+    </xsd:complexType>
+
+    <xsd:complexType name="collectionType">
+        <xsd:sequence>
+            <xsd:element name="value" type="valueType" minOccurs="0" maxOccurs="unbounded"/>
+        </xsd:sequence>
+        <xsd:attribute name="type" type="xsd:string"/>
+        <xsd:attribute name="item-type" type="xsd:string"/>
+    </xsd:complexType>
+
+    <xsd:complexType name="nativeArraytype">
+        <xsd:complexContent>
+            <xsd:extension base="baseObjectType">
+                <xsd:sequence>
+                    <xsd:element name="type" type="xsd:string" minOccurs="1" maxOccurs="1"/>
+                    <xsd:element name="array" type="xsd:string" minOccurs="1" maxOccurs="1"/>
+                </xsd:sequence>
+            </xsd:extension>
+        </xsd:complexContent>
+    </xsd:complexType>
+
+    <xsd:complexType name="fieldType">
+        <xsd:complexContent >
+            <xsd:extension base="baseObjectType">
+                <xsd:attribute name="name" type="xsd:string"/>
+            </xsd:extension>
+        </xsd:complexContent>
+    </xsd:complexType>
+
+    <xsd:complexType name="objectType">
+        <xsd:sequence>
+            <xsd:element name="field" type="fieldType" minOccurs="0" maxOccurs="unbounded"/>
+        </xsd:sequence>
+        <xsd:attribute name="type" type="xsd:string"/>
+    </xsd:complexType>
+
+    <xsd:complexType name="propertyType">
+        <xsd:attribute name="name" type="xsd:string"/>
+        <xsd:attribute name="value" type="xsd:string"/>
+    </xsd:complexType>
+
+    <xsd:complexType name="paramType" abstract="true">
+        <xsd:sequence>
+            <xsd:element name="name" type="xsd:string" minOccurs="1" maxOccurs="1"/>
+            <xsd:element name="description" type="xsd:string" minOccurs="0" maxOccurs="1"/>
+        </xsd:sequence>
+        <xsd:attribute name="profile" type="xsd:string"/>
+    </xsd:complexType>
+
+    <xsd:complexType name="valueParamType">
+       <xsd:complexContent>
+           <xsd:extension base="paramType">
+               <xsd:sequence>
+                   <xsd:element name="value" type="xsd:string" minOccurs="1" maxOccurs="1"/>
+               </xsd:sequence>
+           </xsd:extension>
+       </xsd:complexContent>
+    </xsd:complexType>
+
+    <xsd:complexType name="valuesParamType">
+        <xsd:complexContent>
+            <xsd:extension base="paramType">
+                <xsd:sequence>
+                    <xsd:element name="value" type="xsd:string" minOccurs="0" maxOccurs="unbounded"/>
+                </xsd:sequence>
+            </xsd:extension>
+        </xsd:complexContent>
+    </xsd:complexType>
+
+    <xsd:complexType name="propertiesParamType">
+        <xsd:complexContent>
+            <xsd:extension base="paramType">
+                <xsd:sequence>
+                    <xsd:element name="property" type="propertyType" minOccurs="0" maxOccurs="unbounded"/>
+                </xsd:sequence>
+            </xsd:extension>
+        </xsd:complexContent>
+    </xsd:complexType>
+
+    <xsd:complexType name="objectParamType">
+        <xsd:complexContent>
+            <xsd:extension base="paramType">
+                <xsd:sequence>
+                    <xsd:element name="object" type="objectType" minOccurs="1" maxOccurs="1"/>
+                </xsd:sequence>
+            </xsd:extension>
+        </xsd:complexContent>
+    </xsd:complexType>
+
+    <xsd:complexType name="initParamsType">
+        <xsd:choice minOccurs="0" maxOccurs="unbounded">
+            <xsd:element name="object-param" type="objectParamType"/>
+            <xsd:element name="properties-param" type="propertiesParamType"/>
+            <xsd:element name="value-param" type="valueParamType"/>
+            <xsd:element name="values-param" type="valuesParamType"/>
+        </xsd:choice>
+    </xsd:complexType>
+
+    <xsd:complexType name="componentPluginType">
+        <xsd:sequence>
+            <xsd:element name="name" type="xsd:string" minOccurs="1" maxOccurs="1"/>
+            <xsd:element name="set-method" type="xsd:string" minOccurs="1" maxOccurs="1"/>
+            <xsd:element name="type" type="xsd:string" minOccurs="1" maxOccurs="1"/>
+            <xsd:element name="description" type="xsd:string" minOccurs="0" maxOccurs="1"/>
+            <xsd:element name="priority" type="xsd:string" minOccurs="0" maxOccurs="1"/>
+            <xsd:element name="init-params" type="initParamsType" minOccurs="0" maxOccurs="1"/>
+        </xsd:sequence>
+    </xsd:complexType>
+
+    <xsd:complexType name="externalComponentPluginType">
+        <xsd:sequence>
+            <xsd:element name="target-component" type="xsd:string" minOccurs="1" maxOccurs="1"/>
+            <xsd:element name="component-plugin" type="componentPluginType" minOccurs="0" maxOccurs="unbounded"/>
+        </xsd:sequence>
+    </xsd:complexType>
+
+    <xsd:complexType name="containerLifecyclePluginType">
+        <xsd:sequence>
+            <xsd:element name="type" type="xsd:string" minOccurs="1" maxOccurs="1"/>
+            <xsd:element name="init-params" type="initParamsType" minOccurs="0" maxOccurs="1"/>
+        </xsd:sequence>
+    </xsd:complexType>
+
+    <xsd:complexType name="manageableComponentsType">
+        <xsd:sequence>
+            <xsd:element name="component-type" type="xsd:string" minOccurs="0" maxOccurs="unbounded"/>
+        </xsd:sequence>
+    </xsd:complexType>
+
+    <xsd:complexType name="componentLifecyclePluginType">
+        <xsd:sequence>
+            <xsd:element name="type" type="xsd:string" minOccurs="1" maxOccurs="1"/>
+            <xsd:element name="manageable-components" type="manageableComponentsType" minOccurs="1" maxOccurs="1"/>
+            <xsd:element name="init-params" type="initParamsType" minOccurs="0" maxOccurs="1"/>
+        </xsd:sequence>
+    </xsd:complexType>
+
+    <xsd:complexType name="componentType">
+        <xsd:sequence>
+            <xsd:element name="key" type="xsd:string" minOccurs="0" maxOccurs="1"/>
+            <xsd:element name="jmx-name" type="xsd:string" minOccurs="0" maxOccurs="1"/>
+            <xsd:element name="type" type="xsd:string" minOccurs="1" maxOccurs="1"/>
+            <xsd:element name="description" type="xsd:string" minOccurs="0" maxOccurs="1"/>
+            <xsd:element name="show-deploy-info" type="xsd:string" minOccurs="0" maxOccurs="1"/>
+            <xsd:element name="multi-instance" type="xsd:string" minOccurs="0" maxOccurs="1"/>
+            <xsd:element name="component-plugins" minOccurs="0" maxOccurs="1">
+                <xsd:complexType>
+                    <xsd:sequence>
+                        <xsd:element name="component-plugin" type="componentPluginType" minOccurs="0" maxOccurs="unbounded"/>
+                    </xsd:sequence>
+                </xsd:complexType>
+            </xsd:element>
+            <xsd:element name="init-params" type="initParamsType" minOccurs="0" maxOccurs="1"/>
+        </xsd:sequence>
+        <xsd:attribute name="profile" type="xsd:string"/>
+    </xsd:complexType>
+
+    <xsd:complexType name="configurationType">
+        <xsd:sequence>
+            <xsd:element name="container-lifecycle-plugin" type="containerLifecyclePluginType" minOccurs="0" maxOccurs="unbounded"/>
+            <xsd:element name="component-lifecycle-plugin" type="componentLifecyclePluginType" minOccurs="0" maxOccurs="unbounded"/>
+            <xsd:element name="component" type="componentType" minOccurs="0" maxOccurs="unbounded"/>
+            <xsd:element name="external-component-plugins" type="externalComponentPluginType" minOccurs="0" maxOccurs="unbounded"/>
+            <xsd:element name="import" type="importType" minOccurs="0" maxOccurs="unbounded"/>
+            <xsd:element name="remove-configuration" type="xsd:string" minOccurs="0" maxOccurs="unbounded"/>
+        </xsd:sequence>
+    </xsd:complexType>
+
+    <xsd:complexType name="importType">
+        <xsd:simpleContent>
+            <xsd:extension base="xsd:string">
+              <xsd:attribute name="profile" type="xsd:string"/>
+            </xsd:extension>
+        </xsd:simpleContent>
+    </xsd:complexType>
+
+</xsd:schema>
\ No newline at end of file

Modified: kernel/branches/config-branch/exo.kernel.container/src/main/resources/xsd_1_0/sample-configuration-01.xml
===================================================================
--- kernel/branches/config-branch/exo.kernel.container/src/main/resources/xsd_1_0/sample-configuration-01.xml	2009-12-11 16:34:30 UTC (rev 1012)
+++ kernel/branches/config-branch/exo.kernel.container/src/main/resources/xsd_1_0/sample-configuration-01.xml	2009-12-11 20:44:15 UTC (rev 1013)
@@ -20,9 +20,9 @@
 
 -->
 <configuration
-    xmlns="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
-    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-    xsi:schemaLocation="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd ../java/org/exoplatform/container/configuration/kernel-configuration_1_0.xsd">
+   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+   xsi:schemaLocation="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd http://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
+   xmlns="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd">
 
     <component>
       <key>org.exoplatform.portal.config.DataStorage</key>

Modified: kernel/branches/config-branch/exo.kernel.container/src/main/resources/xsd_1_0/sample-configuration-02.xml
===================================================================
--- kernel/branches/config-branch/exo.kernel.container/src/main/resources/xsd_1_0/sample-configuration-02.xml	2009-12-11 16:34:30 UTC (rev 1012)
+++ kernel/branches/config-branch/exo.kernel.container/src/main/resources/xsd_1_0/sample-configuration-02.xml	2009-12-11 20:44:15 UTC (rev 1013)
@@ -20,9 +20,9 @@
 
 -->
 <configuration
-    xmlns="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
-    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-    xsi:schemaLocation="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd ../java/org/exoplatform/container/configuration/kernel-configuration_1_0.xsd">
+   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+   xsi:schemaLocation="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd http://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
+   xmlns="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd">
 
     <component>
       <key>org.exoplatform.application.gadget.GadgetRegistryService</key>

Modified: kernel/branches/config-branch/exo.kernel.container/src/main/resources/xsd_1_0/sample-configuration-03.xml
===================================================================
--- kernel/branches/config-branch/exo.kernel.container/src/main/resources/xsd_1_0/sample-configuration-03.xml	2009-12-11 16:34:30 UTC (rev 1012)
+++ kernel/branches/config-branch/exo.kernel.container/src/main/resources/xsd_1_0/sample-configuration-03.xml	2009-12-11 20:44:15 UTC (rev 1013)
@@ -20,9 +20,9 @@
 
 -->
 <configuration
-    xmlns="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
-    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-    xsi:schemaLocation="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd ../java/org/exoplatform/container/configuration/kernel-configuration_1_0.xsd">
+   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+   xsi:schemaLocation="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd http://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
+   xmlns="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd">
 
     <external-component-plugins>
       <target-component>org.exoplatform.services.organization.OrganizationService</target-component>

Modified: kernel/branches/config-branch/exo.kernel.container/src/main/resources/xsd_1_0/sample-configuration-04.xml
===================================================================
--- kernel/branches/config-branch/exo.kernel.container/src/main/resources/xsd_1_0/sample-configuration-04.xml	2009-12-11 16:34:30 UTC (rev 1012)
+++ kernel/branches/config-branch/exo.kernel.container/src/main/resources/xsd_1_0/sample-configuration-04.xml	2009-12-11 20:44:15 UTC (rev 1013)
@@ -20,9 +20,9 @@
 
 -->
 <configuration
-    xmlns="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
-    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-    xsi:schemaLocation="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd ../java/org/exoplatform/container/configuration/kernel-configuration_1_0.xsd">
+   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+   xsi:schemaLocation="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd http://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
+   xmlns="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd">
 
     <component>
       <key>org.exoplatform.services.ldap.LDAPService</key>

Modified: kernel/branches/config-branch/exo.kernel.container/src/main/resources/xsd_1_0/sample-configuration-05.xml
===================================================================
--- kernel/branches/config-branch/exo.kernel.container/src/main/resources/xsd_1_0/sample-configuration-05.xml	2009-12-11 16:34:30 UTC (rev 1012)
+++ kernel/branches/config-branch/exo.kernel.container/src/main/resources/xsd_1_0/sample-configuration-05.xml	2009-12-11 20:44:15 UTC (rev 1013)
@@ -20,9 +20,9 @@
 
 -->
 <configuration
-    xmlns="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
-    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-    xsi:schemaLocation="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd ../java/org/exoplatform/container/configuration/kernel-configuration_1_0.xsd">
+   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+   xsi:schemaLocation="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd http://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
+   xmlns="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd">
 
     <component>
       <key>org.exoplatform.services.ldap.LDAPService</key>

Modified: kernel/branches/config-branch/exo.kernel.container/src/main/resources/xsd_1_0/sample-configuration-06.xml
===================================================================
--- kernel/branches/config-branch/exo.kernel.container/src/main/resources/xsd_1_0/sample-configuration-06.xml	2009-12-11 16:34:30 UTC (rev 1012)
+++ kernel/branches/config-branch/exo.kernel.container/src/main/resources/xsd_1_0/sample-configuration-06.xml	2009-12-11 20:44:15 UTC (rev 1013)
@@ -20,9 +20,9 @@
 
 -->
 <configuration
-    xmlns="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
-    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-    xsi:schemaLocation="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd ../java/org/exoplatform/container/configuration/kernel-configuration_1_0.xsd">
+   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+   xsi:schemaLocation="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd http://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
+   xmlns="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd">
 
     <component>
         <key>org.exoplatform.services.organization.OrganizationService</key>

Modified: kernel/branches/config-branch/exo.kernel.container/src/main/resources/xsd_1_0/sample-configuration-07.xml
===================================================================
--- kernel/branches/config-branch/exo.kernel.container/src/main/resources/xsd_1_0/sample-configuration-07.xml	2009-12-11 16:34:30 UTC (rev 1012)
+++ kernel/branches/config-branch/exo.kernel.container/src/main/resources/xsd_1_0/sample-configuration-07.xml	2009-12-11 20:44:15 UTC (rev 1013)
@@ -20,9 +20,9 @@
 
 -->
 <configuration
-    xmlns="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
-    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-    xsi:schemaLocation="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd ../java/org/exoplatform/container/configuration/kernel-configuration_1_0.xsd">
+   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+   xsi:schemaLocation="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd http://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
+   xmlns="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd">
 
     <component>
       <key>org.exoplatform.services.jcr.config.RepositoryServiceConfiguration</key>

Modified: kernel/branches/config-branch/exo.kernel.container/src/main/resources/xsd_1_0/sample-configuration-08.xml
===================================================================
--- kernel/branches/config-branch/exo.kernel.container/src/main/resources/xsd_1_0/sample-configuration-08.xml	2009-12-11 16:34:30 UTC (rev 1012)
+++ kernel/branches/config-branch/exo.kernel.container/src/main/resources/xsd_1_0/sample-configuration-08.xml	2009-12-11 20:44:15 UTC (rev 1013)
@@ -20,9 +20,9 @@
 
 -->
 <configuration
-    xmlns="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
-    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-    xsi:schemaLocation="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd ../java/org/exoplatform/container/configuration/kernel-configuration_1_0.xsd">
+   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+   xsi:schemaLocation="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd http://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
+   xmlns="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd">
 
     <component>
       <key>org.exoplatform.services.mail.MailService</key>

Modified: kernel/branches/config-branch/exo.kernel.container/src/main/resources/xsd_1_0/sample-configuration-09.xml
===================================================================
--- kernel/branches/config-branch/exo.kernel.container/src/main/resources/xsd_1_0/sample-configuration-09.xml	2009-12-11 16:34:30 UTC (rev 1012)
+++ kernel/branches/config-branch/exo.kernel.container/src/main/resources/xsd_1_0/sample-configuration-09.xml	2009-12-11 20:44:15 UTC (rev 1013)
@@ -20,9 +20,9 @@
 
 -->
 <configuration
-    xmlns="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
-    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-    xsi:schemaLocation="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd ../java/org/exoplatform/container/configuration/kernel-configuration_1_0.xsd">
+   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+   xsi:schemaLocation="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd http://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
+   xmlns="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd">
 
     <external-component-plugins>
       <target-component>org.exoplatform.services.jcr.ext.hierarchy.NodeHierarchyCreator</target-component>

Modified: kernel/branches/config-branch/exo.kernel.container/src/main/resources/xsd_1_0/sample-configuration-10.xml
===================================================================
--- kernel/branches/config-branch/exo.kernel.container/src/main/resources/xsd_1_0/sample-configuration-10.xml	2009-12-11 16:34:30 UTC (rev 1012)
+++ kernel/branches/config-branch/exo.kernel.container/src/main/resources/xsd_1_0/sample-configuration-10.xml	2009-12-11 20:44:15 UTC (rev 1013)
@@ -20,9 +20,9 @@
 
 -->
 <configuration
-    xmlns="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
-    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-    xsi:schemaLocation="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd ../java/org/exoplatform/container/configuration/kernel-configuration_1_0.xsd">
+   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+   xsi:schemaLocation="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd http://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
+   xmlns="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd">
 
     <component>
       <key>org.exoplatform.services.jcr.config.RepositoryServiceConfiguration</key>

Modified: kernel/branches/config-branch/exo.kernel.container/src/main/resources/xsd_1_0/sample-configuration-11.xml
===================================================================
--- kernel/branches/config-branch/exo.kernel.container/src/main/resources/xsd_1_0/sample-configuration-11.xml	2009-12-11 16:34:30 UTC (rev 1012)
+++ kernel/branches/config-branch/exo.kernel.container/src/main/resources/xsd_1_0/sample-configuration-11.xml	2009-12-11 20:44:15 UTC (rev 1013)
@@ -20,9 +20,9 @@
 
 -->
 <configuration
-    xmlns="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
-    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-    xsi:schemaLocation="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd ../java/org/exoplatform/container/configuration/kernel-configuration_1_0.xsd">
+   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+   xsi:schemaLocation="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd http://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
+   xmlns="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd">
 
     <component>
       <key>org.exoplatform.services.database.HibernateService</key>

Modified: kernel/branches/config-branch/exo.kernel.container/src/main/resources/xsd_1_0/sample-configuration-12.xml
===================================================================
--- kernel/branches/config-branch/exo.kernel.container/src/main/resources/xsd_1_0/sample-configuration-12.xml	2009-12-11 16:34:30 UTC (rev 1012)
+++ kernel/branches/config-branch/exo.kernel.container/src/main/resources/xsd_1_0/sample-configuration-12.xml	2009-12-11 20:44:15 UTC (rev 1013)
@@ -20,9 +20,9 @@
 
 -->
 <configuration
-    xmlns="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
-    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-    xsi:schemaLocation="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd ../java/org/exoplatform/container/configuration/kernel-configuration_1_0.xsd">
+   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+   xsi:schemaLocation="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd http://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
+   xmlns="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd">
 
     <component>
         <type>org.exoplatform.services.portletcontainer.PortletContainerConf</type>

Modified: kernel/branches/config-branch/exo.kernel.container/src/main/resources/xsd_1_0/sample-configuration-13.xml
===================================================================
--- kernel/branches/config-branch/exo.kernel.container/src/main/resources/xsd_1_0/sample-configuration-13.xml	2009-12-11 16:34:30 UTC (rev 1012)
+++ kernel/branches/config-branch/exo.kernel.container/src/main/resources/xsd_1_0/sample-configuration-13.xml	2009-12-11 20:44:15 UTC (rev 1013)
@@ -20,9 +20,9 @@
 
 -->
 <configuration
-    xmlns="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
-    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-    xsi:schemaLocation="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd ../java/org/exoplatform/container/configuration/kernel-configuration_1_0.xsd">
+   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+   xsi:schemaLocation="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd http://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
+   xmlns="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd">
 
     <import>war:/conf/common/common-configuration.xml</import>
     <import>war:/conf/common/logs-configuration.xml</import>

Modified: kernel/branches/config-branch/exo.kernel.container/src/main/resources/xsd_1_0/sample-configuration-14.xml
===================================================================
--- kernel/branches/config-branch/exo.kernel.container/src/main/resources/xsd_1_0/sample-configuration-14.xml	2009-12-11 16:34:30 UTC (rev 1012)
+++ kernel/branches/config-branch/exo.kernel.container/src/main/resources/xsd_1_0/sample-configuration-14.xml	2009-12-11 20:44:15 UTC (rev 1013)
@@ -20,9 +20,9 @@
 
 -->
 <configuration
-    xmlns="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
-    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-    xsi:schemaLocation="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd ../java/org/exoplatform/container/configuration/kernel-configuration_1_0.xsd">
+   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+   xsi:schemaLocation="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd http://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
+   xmlns="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd">
 
     <component>
         <key>org.exoplatform.services.security.SecurityService</key>

Modified: kernel/branches/config-branch/exo.kernel.container/src/main/resources/xsd_1_0/sample-configuration-16.xml
===================================================================
--- kernel/branches/config-branch/exo.kernel.container/src/main/resources/xsd_1_0/sample-configuration-16.xml	2009-12-11 16:34:30 UTC (rev 1012)
+++ kernel/branches/config-branch/exo.kernel.container/src/main/resources/xsd_1_0/sample-configuration-16.xml	2009-12-11 20:44:15 UTC (rev 1013)
@@ -20,9 +20,9 @@
 
 -->
 <configuration
-    xmlns="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
-    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-    xsi:schemaLocation="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd ../java/org/exoplatform/container/configuration/kernel-configuration_1_0.xsd">
+   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+   xsi:schemaLocation="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd http://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
+   xmlns="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd">
 
     <component>
     <key>org.exoplatform.services.naming.InitialContextInitializer</key>

Added: kernel/branches/config-branch/exo.kernel.container/src/main/resources/xsd_1_1/sample-configuration-17.xml
===================================================================
--- kernel/branches/config-branch/exo.kernel.container/src/main/resources/xsd_1_1/sample-configuration-17.xml	                        (rev 0)
+++ kernel/branches/config-branch/exo.kernel.container/src/main/resources/xsd_1_1/sample-configuration-17.xml	2009-12-11 20:44:15 UTC (rev 1013)
@@ -0,0 +1,95 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    Copyright (C) 2009 eXo Platform SAS.
+
+    This is free software; you can redistribute it and/or modify it
+    under the terms of the GNU Lesser General Public License as
+    published by the Free Software Foundation; either version 2.1 of
+    the License, or (at your option) any later version.
+
+    This software is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+    Lesser General Public License for more details.
+
+    You should have received a copy of the GNU Lesser General Public
+    License along with this software; if not, write to the Free
+    Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+    02110-1301 USA, or see the FSF site: http://www.fsf.org.
+
+-->
+<configuration
+   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+   xsi:schemaLocation="http://www.exoplaform.org/xml/ns/kernel_1_1.xsd http://www.exoplaform.org/xml/ns/kernel_1_1.xsd"
+   xmlns="http://www.exoplaform.org/xml/ns/kernel_1_1.xsd">
+
+  <component>
+    <key>org.exoplatform.services.naming.InitialContextInitializer</key>
+    <type>org.exoplatform.services.naming.InitialContextInitializer</type>
+  </component>
+
+  <component profile="a">
+    <key>org.exoplatform.services.naming.InitialContextInitializer</key>
+    <type>org.exoplatform.services.naming.InitialContextInitializer</type>
+  </component>
+
+  <component profile="a,b">
+    <key>org.exoplatform.services.naming.InitialContextInitializer</key>
+    <type>org.exoplatform.services.naming.InitialContextInitializer</type>
+  </component>
+
+  <component>
+    <key>org.exoplatform.services.naming.InitialContextInitializer</key>
+    <type>org.exoplatform.services.naming.InitialContextInitializer</type>
+    <init-params>
+      <object-param>
+        <name>object</name>
+        <object type="object"></object>
+      </object-param>
+      <object-param profile="a">
+        <name>object</name>
+        <object type="object"></object>
+      </object-param>
+      <object-param profile="a,b">
+        <name>object</name>
+        <object type="object"></object>
+      </object-param>
+      <properties-param>
+        <name>properties</name>
+      </properties-param>
+      <properties-param profile="a">
+        <name>properties</name>
+      </properties-param>
+      <properties-param profile="a,b">
+        <name>properties</name>
+      </properties-param>
+      <value-param>
+        <name>value</name>
+        <value>value</value>
+      </value-param>
+      <value-param profile="a">
+        <name>value</name>
+        <value>value</value>
+      </value-param>
+      <value-param profile="a,b">
+        <name>value</name>
+        <value>value</value>
+      </value-param>
+      <values-param>
+        <name>values</name>
+      </values-param>
+      <values-param profile="a">
+        <name>values</name>
+      </values-param>
+      <values-param profile="a,b">
+        <name>values</name>
+      </values-param>
+    </init-params>
+  </component>
+
+  <import>import_1</import>
+  <import profile="a">import_1</import>
+  <import profile="a,b">import_1</import>
+
+</configuration>
\ No newline at end of file

Modified: kernel/branches/config-branch/exo.kernel.container/src/test/resources/org/exoplatform/container/configuration/component-configuration.xml
===================================================================
--- kernel/branches/config-branch/exo.kernel.container/src/test/resources/org/exoplatform/container/configuration/component-configuration.xml	2009-12-11 16:34:30 UTC (rev 1012)
+++ kernel/branches/config-branch/exo.kernel.container/src/test/resources/org/exoplatform/container/configuration/component-configuration.xml	2009-12-11 20:44:15 UTC (rev 1013)
@@ -21,19 +21,17 @@
 -->
 <configuration
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-   xsi:schemaLocation="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd http://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
-   xmlns="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
-   xmlns:foo="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
-   xmlns:bar="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd">
+   xsi:schemaLocation="http://www.exoplaform.org/xml/ns/kernel_1_1.xsd http://www.exoplaform.org/xml/ns/kernel_1_1.xsd"
+   xmlns="http://www.exoplaform.org/xml/ns/kernel_1_1.xsd">
 
-  <bar:component>
+  <component profile="bar">
     <key>Component</key>
     <type>ComponentImpl</type>
-  </bar:component>
+  </component>
 
-  <foo:component>
+  <component profile="foo">
     <key>Component</key>
     <type>FooComponent</type>
-  </foo:component>
+  </component>
 
 </configuration>
\ No newline at end of file

Modified: kernel/branches/config-branch/exo.kernel.container/src/test/resources/org/exoplatform/container/configuration/import-configuration.xml
===================================================================
--- kernel/branches/config-branch/exo.kernel.container/src/test/resources/org/exoplatform/container/configuration/import-configuration.xml	2009-12-11 16:34:30 UTC (rev 1012)
+++ kernel/branches/config-branch/exo.kernel.container/src/test/resources/org/exoplatform/container/configuration/import-configuration.xml	2009-12-11 20:44:15 UTC (rev 1013)
@@ -21,13 +21,11 @@
 -->
 <configuration
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-   xsi:schemaLocation="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd http://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
-   xmlns="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
-   xmlns:foo="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
-   xmlns:bar="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd">
+   xsi:schemaLocation="http://www.exoplaform.org/xml/ns/kernel_1_1.xsd http://www.exoplaform.org/xml/ns/kernel_1_1.xsd"
+   xmlns="http://www.exoplaform.org/xml/ns/kernel_1_1.xsd">
 
   <import>empty</import>
-  <foo:import>foo</foo:import>
-  <bar:import>bar</bar:import>
+  <import profile="foo">foo</import>
+  <import profile="bar">bar</import>
 
 </configuration>
\ No newline at end of file

Modified: kernel/branches/config-branch/exo.kernel.container/src/test/resources/org/exoplatform/container/configuration/init-param-configuration.xml
===================================================================
--- kernel/branches/config-branch/exo.kernel.container/src/test/resources/org/exoplatform/container/configuration/init-param-configuration.xml	2009-12-11 16:34:30 UTC (rev 1012)
+++ kernel/branches/config-branch/exo.kernel.container/src/test/resources/org/exoplatform/container/configuration/init-param-configuration.xml	2009-12-11 20:44:15 UTC (rev 1013)
@@ -21,10 +21,8 @@
 -->
 <configuration
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-   xsi:schemaLocation="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd http://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
-   xmlns="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
-   xmlns:foo="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
-   xmlns:bar="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd">
+   xsi:schemaLocation="http://www.exoplaform.org/xml/ns/kernel_1_1.xsd http://www.exoplaform.org/xml/ns/kernel_1_1.xsd"
+   xmlns="http://www.exoplaform.org/xml/ns/kernel_1_1.xsd">
 
   <component>
     <key>Component</key>
@@ -34,14 +32,14 @@
         <name>param</name>
         <value>empty</value>
       </value-param>
-      <foo:value-param>
+      <value-param profile="foo">
         <name>param</name>
         <value>foo</value>
-      </foo:value-param>
-      <bar:value-param>
+      </value-param>
+      <value-param profile="bar">
         <name>param</name>
         <value>bar</value>
-      </bar:value-param>
+      </value-param>
     </init-params>
   </component>
 



More information about the exo-jcr-commits mailing list