[gatein-commits] gatein SVN: r7495 - in components/pc/trunk: portlet/src/main/java/org/gatein/pc/portlet/impl/deployment and 13 other directories.

do-not-reply at jboss.org do-not-reply at jboss.org
Fri Sep 23 04:35:39 EDT 2011


Author: julien_viet
Date: 2011-09-23 04:35:39 -0400 (Fri, 23 Sep 2011)
New Revision: 7495

Added:
   components/pc/trunk/portlet/src/main/java/org/gatein/pc/portlet/impl/deployment/xml/
   components/pc/trunk/portlet/src/main/java/org/gatein/pc/portlet/impl/deployment/xml/XSD.java
   components/pc/trunk/portlet/src/main/resources/org/
   components/pc/trunk/portlet/src/main/resources/org/gatein/
   components/pc/trunk/portlet/src/main/resources/org/gatein/pc/
   components/pc/trunk/portlet/src/main/resources/org/gatein/pc/portlet/
   components/pc/trunk/portlet/src/main/resources/org/gatein/pc/portlet/impl/
   components/pc/trunk/portlet/src/main/resources/org/gatein/pc/portlet/impl/deployment/
   components/pc/trunk/portlet/src/main/resources/org/gatein/pc/portlet/impl/deployment/xml/
   components/pc/trunk/portlet/src/main/resources/org/gatein/pc/portlet/impl/deployment/xml/XMLSchema.dtd
   components/pc/trunk/portlet/src/main/resources/org/gatein/pc/portlet/impl/deployment/xml/datatypes.dtd
   components/pc/trunk/portlet/src/main/resources/org/gatein/pc/portlet/impl/deployment/xml/portlet-app_1_0.xsd
   components/pc/trunk/portlet/src/main/resources/org/gatein/pc/portlet/impl/deployment/xml/portlet-app_2_0.xsd
   components/pc/trunk/portlet/src/main/resources/org/gatein/pc/portlet/impl/deployment/xml/xml.xsd
   components/pc/trunk/portlet/src/test/resources/metadata/portlet/portlet1-invalid.xml
   components/pc/trunk/portlet/src/test/resources/metadata/portlet/portlet2-invalid.xml
Modified:
   components/pc/trunk/pom.xml
   components/pc/trunk/portlet/src/main/java/org/gatein/pc/portlet/impl/deployment/PortletApplicationDeployer.java
   components/pc/trunk/portlet/src/main/java/org/gatein/pc/portlet/impl/deployment/staxnav/PortletApplicationMetaDataBuilder.java
   components/pc/trunk/portlet/src/test/java/org/gatein/pc/portlet/deployment/AbstractMetaDataTestCase.java
   components/pc/trunk/portlet/src/test/java/org/gatein/pc/portlet/deployment/ContainerRuntimeOptionTestCase.java
   components/pc/trunk/portlet/src/test/java/org/gatein/pc/portlet/deployment/CustomPortletModeTestEverythingTestCase.java
   components/pc/trunk/portlet/src/test/java/org/gatein/pc/portlet/deployment/CustomWindowStateTestEverythingTestCase.java
   components/pc/trunk/portlet/src/test/java/org/gatein/pc/portlet/deployment/EventTestEverythingTestCase.java
   components/pc/trunk/portlet/src/test/java/org/gatein/pc/portlet/deployment/FilterTestEverythingTestCase.java
   components/pc/trunk/portlet/src/test/java/org/gatein/pc/portlet/deployment/GeneralMetaDataTestCase.java
   components/pc/trunk/portlet/src/test/java/org/gatein/pc/portlet/deployment/ListenerTestCase.java
   components/pc/trunk/portlet/src/test/java/org/gatein/pc/portlet/deployment/PortletTestEverythingTestCase.java
   components/pc/trunk/portlet/src/test/java/org/gatein/pc/portlet/deployment/RenderParameterTestEverythingTestCase.java
   components/pc/trunk/portlet/src/test/java/org/gatein/pc/portlet/deployment/SecurityConstraintTestEverythingTestCase.java
   components/pc/trunk/portlet/src/test/java/org/gatein/pc/portlet/deployment/UserAttributeTestEverythingTestCase.java
   components/pc/trunk/portlet/src/test/resources/metadata/general/portlet-app_1_0.xml
Log:
GTNPC-72 : Portlet Descriptor XML Schema Validation


Modified: components/pc/trunk/pom.xml
===================================================================
--- components/pc/trunk/pom.xml	2011-09-23 05:21:23 UTC (rev 7494)
+++ components/pc/trunk/pom.xml	2011-09-23 08:35:39 UTC (rev 7495)
@@ -238,7 +238,7 @@
          <dependency>
             <groupId>org.staxnav</groupId>
             <artifactId>staxnav.core</artifactId>
-            <version>0.9.5</version>
+            <version>0.9.6</version>
          </dependency>
 
          <dependency>

Modified: components/pc/trunk/portlet/src/main/java/org/gatein/pc/portlet/impl/deployment/PortletApplicationDeployer.java
===================================================================
--- components/pc/trunk/portlet/src/main/java/org/gatein/pc/portlet/impl/deployment/PortletApplicationDeployer.java	2011-09-23 05:21:23 UTC (rev 7494)
+++ components/pc/trunk/portlet/src/main/java/org/gatein/pc/portlet/impl/deployment/PortletApplicationDeployer.java	2011-09-23 08:35:39 UTC (rev 7495)
@@ -50,6 +50,7 @@
 import org.staxnav.ValueType;
 
 import java.io.InputStream;
+import java.net.MalformedURLException;
 import java.net.URL;
 import java.util.Collection;
 import java.util.HashMap;
@@ -253,23 +254,24 @@
                in = IOTools.safeBufferedWrapper(url.openStream());
 
                //
-               ValueType vt = null;
-
-               //
                PortletApplicationMetaDataBuilder builder = new PortletApplicationMetaDataBuilder();
 
                //
                return builder.build(in);
             }
+            catch (Exception e)
+            {
+               log.error("Cannot read portlet.xml " + url, e);
+            }
             finally
             {
                IOTools.safeClose(in);
             }
          }
       }
-      catch (Exception e)
+      catch (MalformedURLException e)
       {
-         log.error("Cannot read portlet.xml", e);
+         log.error("Could not read portlet deployment descriptor for application " + webApp.getContextPath());
       }
       return null;
    }

Modified: components/pc/trunk/portlet/src/main/java/org/gatein/pc/portlet/impl/deployment/staxnav/PortletApplicationMetaDataBuilder.java
===================================================================
--- components/pc/trunk/portlet/src/main/java/org/gatein/pc/portlet/impl/deployment/staxnav/PortletApplicationMetaDataBuilder.java	2011-09-23 05:21:23 UTC (rev 7494)
+++ components/pc/trunk/portlet/src/main/java/org/gatein/pc/portlet/impl/deployment/staxnav/PortletApplicationMetaDataBuilder.java	2011-09-23 08:35:39 UTC (rev 7495)
@@ -21,11 +21,15 @@
 
 import org.gatein.common.i18n.LocaleFormat;
 import org.gatein.common.i18n.LocalizedString;
+import org.gatein.common.io.IOTools;
+import org.gatein.common.logging.Logger;
+import org.gatein.common.logging.LoggerFactory;
 import org.gatein.common.util.ConversionException;
 import org.gatein.pc.api.LifeCyclePhase;
 import org.gatein.pc.api.Mode;
 import org.gatein.pc.api.TransportGuarantee;
 import org.gatein.pc.api.WindowState;
+import org.gatein.pc.portlet.impl.deployment.xml.XSD;
 import org.gatein.pc.portlet.impl.metadata.CustomPortletModeMetaData;
 import org.gatein.pc.portlet.impl.metadata.CustomWindowStateMetaData;
 import org.gatein.pc.portlet.impl.metadata.ListenerMetaData;
@@ -60,6 +64,9 @@
 import javax.xml.namespace.QName;
 import javax.xml.stream.XMLInputFactory;
 import javax.xml.stream.XMLStreamReader;
+import javax.xml.transform.stax.StAXSource;
+import javax.xml.transform.stream.StreamSource;
+import java.io.ByteArrayInputStream;
 import java.io.InputStream;
 import java.net.URI;
 import java.util.ArrayList;
@@ -79,12 +86,28 @@
 public class PortletApplicationMetaDataBuilder
 {
 
+   /** . */
+   private static final Logger log = LoggerFactory.getLogger(PortletApplicationMetaDataBuilder.class);
+
+   /** . */
+   private static final QName XML_LANG = new QName("http://www.w3.org/XML/1998/namespace", "lang");
+
+   /** . */
+   private static final String PORTLET_1_0 = "http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd";
+
+   /** . */
+   private static final String PORTLET_2_0 = "http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd";
+
+   /** . */
    private static final EnumSet<Element> NAME_OR_QNAME = EnumSet.of(Element.name, Element.qname);
 
+   /** . */
    private static final ValueType<PortletCacheScopeEnum> PORTLET_CACHE_SCOPE = ValueType.get(PortletCacheScopeEnum.class);
 
+   /** . */
    private static final ValueType<TransportGuarantee> TRANSPORT_GUARANTEE = ValueType.get(TransportGuarantee.class);
 
+   /** . */
    private static final ValueType<LifeCyclePhase> LIFE_CYCLE = new ValueType<LifeCyclePhase>()
    {
       @Override
@@ -101,117 +124,88 @@
       }
    };
 
-   private static final QName XML_LANG = new QName("http://www.w3.org/XML/1998/namespace", "lang");
+   /** . */
+   private boolean schemaValidation;
 
-   private static final String PORTLET_1_0 = "http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd";
-   private static final String PORTLET_2_0 = "http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd";
+   /** . */
+   private XMLInputFactory inputFactory;
 
-   private LocalizedString readLocalizedString(StaxNavigator<Element> nav, Element element) throws ConversionException
+   public PortletApplicationMetaDataBuilder()
    {
-      Map<Locale, String> descriptions = new LinkedHashMap<Locale, String>();
-      while (nav.next(element))
-      {
-         String lang = nav.getAttribute(XML_LANG);
-         String description = nav.getContent();
-         Locale locale = LocaleFormat.DEFAULT.getLocale(lang == null ? DEFAULT_LOCALE : lang);
-         descriptions.put(locale, description);
-      }
-      if (descriptions.size() > 0)
-      {
-         return new LocalizedString(descriptions, new Locale(DEFAULT_LOCALE));
-      }
-      else
-      {
-         return null;
-      }
+      this(XMLInputFactory.newInstance(), false);
    }
 
-   private QName readQName(StaxNavigator<Element> nav)
+   public PortletApplicationMetaDataBuilder(XMLInputFactory inputFactory, boolean schemaValidation) throws NullPointerException
    {
-      String val = nav.getContent();
-      int pos = val.indexOf(':');
-      if (pos == -1)
+      if (inputFactory == null)
       {
-         return new QName(val);
+         throw new NullPointerException("No null xml input factory allowed");
       }
-      else
-      {
-         String prefix = val.substring(0, pos);
-         String localPart = val.substring(pos + 1);
-         String uri = nav.getNamespaceByPrefix(prefix);
-         if (uri == null)
-         {
-            throw new UnsupportedOperationException("todo");
-         }
-         else
-         {
-            return new QName(uri, localPart, prefix);
-         }
-      }
+
+      //
+      this.inputFactory = inputFactory;
+      this.schemaValidation = schemaValidation;
    }
 
-   private Iterable<InitParamMetaData> readInitParams(StaxNavigator<Element> nav) throws ConversionException
+   public boolean getSchemaValidation()
    {
-      List<InitParamMetaData> list = Collections.emptyList();
-      while (nav.next(Element.init_param))
-      {
-         InitParamMetaData initParamMD = new InitParamMetaData();
-         initParamMD.setId(nav.getAttribute("id"));
-         initParamMD.setDescription(readLocalizedString(nav, Element.description));
-         initParamMD.setName(getContent(nav, Element.name));
-         initParamMD.setValue(getContent(nav, Element.value));
-         if (list.isEmpty())
-         {
-            list = new ArrayList<InitParamMetaData>();
-         }
-         list.add(initParamMD);
-      }
-      return list;
+      return schemaValidation;
    }
 
-   private String getContent(StaxNavigator<Element> nav, Element element)
+   public void setSchemaValidation(boolean schemaValidation)
    {
-      if (nav.next(element))
-      {
-         return nav.getContent();
-      }
-      else
-      {
-         throw new StaxNavException(nav.getLocation(), "Was expecting elemnt " + element + " to be present");
-      }
+      this.schemaValidation = schemaValidation;
    }
 
    public PortletApplication20MetaData build(InputStream is) throws Exception
    {
 
+      // We will need to read the input stream twice
+      byte[] bytes = null;
+      if (schemaValidation)
+      {
+         bytes = IOTools.getBytes(is);
+         is = new ByteArrayInputStream(bytes);
+      }
+
       PortletApplication20MetaData md = new PortletApplication20MetaData();
 
-      XMLInputFactory factory = XMLInputFactory.newInstance();
-      factory.setProperty("javax.xml.stream.isCoalescing", true);
-      XMLStreamReader stream = factory.createXMLStreamReader(is);
+      //
+      inputFactory.setProperty("javax.xml.stream.isCoalescing", true);
+      XMLStreamReader stream = inputFactory.createXMLStreamReader(is);
       StaxNavigator<Element> nav = StaxNavigatorFactory.create(new Naming.Enumerated.Simple<Element>(Element.class, null), stream);
-      
+
+      // We want to trim content (mandated by the spec)
       nav.setTrimContent(true);
 
-      // For now we do it this way
-      // but it's not correct
-      String defaultNS = nav.getNamespaceByPrefix("");
+      // Get the root element qname
+      QName qname = nav.getQName();
+      String rootNS = qname.getNamespaceURI();
+
+      // Determine the correct version to parse
       int version;
-      if (PORTLET_1_0.equals(defaultNS))
+      if (PORTLET_1_0.equals(rootNS))
       {
          md.setVersion("1.0");
          version = 1;
       }
-      else if (PORTLET_2_0.equals(defaultNS))
+      else if (PORTLET_2_0.equals(rootNS))
       {
          md.setVersion("2.0");
          version = 2;
       }
       else
       {
-         throw new UnsupportedOperationException();
+         throw new StaxNavException("Illegal portlet xml namespace " + rootNS);
       }
 
+      // Perform schema validation if required
+      if (schemaValidation)
+      {
+         XSD xsd = version == 1 ? XSD.PORTLET_1_0 : XSD.PORTLET_2_0;
+         xsd.validate(new StreamSource(new ByteArrayInputStream(bytes)));
+      }
+
       //
       assert Element.portlet_app == nav.getName();
 
@@ -574,4 +568,79 @@
       //
       return md;
    }
+
+   private LocalizedString readLocalizedString(StaxNavigator<Element> nav, Element element) throws ConversionException
+   {
+      Map<Locale, String> descriptions = new LinkedHashMap<Locale, String>();
+      while (nav.next(element))
+      {
+         String lang = nav.getAttribute(XML_LANG);
+         String description = nav.getContent();
+         Locale locale = LocaleFormat.DEFAULT.getLocale(lang == null ? DEFAULT_LOCALE : lang);
+         descriptions.put(locale, description);
+      }
+      if (descriptions.size() > 0)
+      {
+         return new LocalizedString(descriptions, new Locale(DEFAULT_LOCALE));
+      }
+      else
+      {
+         return null;
+      }
+   }
+
+   private QName readQName(StaxNavigator<Element> nav)
+   {
+      String val = nav.getContent();
+      int pos = val.indexOf(':');
+      if (pos == -1)
+      {
+         return new QName(val);
+      }
+      else
+      {
+         String prefix = val.substring(0, pos);
+         String localPart = val.substring(pos + 1);
+         String uri = nav.getNamespaceByPrefix(prefix);
+         if (uri == null)
+         {
+            throw new UnsupportedOperationException("todo");
+         }
+         else
+         {
+            return new QName(uri, localPart, prefix);
+         }
+      }
+   }
+
+   private Iterable<InitParamMetaData> readInitParams(StaxNavigator<Element> nav) throws ConversionException
+   {
+      List<InitParamMetaData> list = Collections.emptyList();
+      while (nav.next(Element.init_param))
+      {
+         InitParamMetaData initParamMD = new InitParamMetaData();
+         initParamMD.setId(nav.getAttribute("id"));
+         initParamMD.setDescription(readLocalizedString(nav, Element.description));
+         initParamMD.setName(getContent(nav, Element.name));
+         initParamMD.setValue(getContent(nav, Element.value));
+         if (list.isEmpty())
+         {
+            list = new ArrayList<InitParamMetaData>();
+         }
+         list.add(initParamMD);
+      }
+      return list;
+   }
+
+   private String getContent(StaxNavigator<Element> nav, Element element)
+   {
+      if (nav.next(element))
+      {
+         return nav.getContent();
+      }
+      else
+      {
+         throw new StaxNavException(nav.getLocation(), "Was expecting elemnt " + element + " to be present");
+      }
+   }
 }

Added: components/pc/trunk/portlet/src/main/java/org/gatein/pc/portlet/impl/deployment/xml/XSD.java
===================================================================
--- components/pc/trunk/portlet/src/main/java/org/gatein/pc/portlet/impl/deployment/xml/XSD.java	                        (rev 0)
+++ components/pc/trunk/portlet/src/main/java/org/gatein/pc/portlet/impl/deployment/xml/XSD.java	2011-09-23 08:35:39 UTC (rev 7495)
@@ -0,0 +1,150 @@
+/*
+ * Copyright (C) 2010 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.
+ */
+
+package org.gatein.pc.portlet.impl.deployment.xml;
+
+import org.gatein.common.logging.Logger;
+import org.gatein.common.logging.LoggerFactory;
+import org.w3c.dom.bootstrap.DOMImplementationRegistry;
+import org.w3c.dom.ls.DOMImplementationLS;
+import org.w3c.dom.ls.LSInput;
+import org.w3c.dom.ls.LSParser;
+import org.w3c.dom.ls.LSResourceResolver;
+import org.xml.sax.SAXException;
+
+import javax.xml.XMLConstants;
+import javax.xml.transform.Source;
+import javax.xml.validation.Schema;
+import javax.xml.validation.SchemaFactory;
+import javax.xml.validation.Validator;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.Reader;
+import java.net.URL;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.concurrent.Callable;
+import java.util.concurrent.ExecutionException;
+import java.util.concurrent.Executor;
+import java.util.concurrent.FutureTask;
+
+/**
+ * @author <a href="mailto:julien.viet at exoplatform.com">Julien Viet</a>
+ * @version $Revision$
+ */
+public class XSD
+{
+
+   /** . */
+   private static final Logger log = LoggerFactory.getLogger(XSD.class);
+
+   private final static Map<String, String> a = new HashMap<String, String>();
+
+   static
+   {
+      a.put("http://www.w3.org/2001/xml.xsd", "xml.xsd");
+      a.put("XMLSchema.dtd", "XMLSchema.dtd");
+      a.put("datatypes.dtd", "datatypes.dtd");
+   }
+
+   /** . */
+   public static final XSD PORTLET_1_0 = new XSD(XSD.class.getResource("portlet-app_1_0.xsd")).fetch();
+
+   /** . */
+   public static final XSD PORTLET_2_0 = new XSD(XSD.class.getResource("portlet-app_2_0.xsd")).fetch();
+
+   /** . */
+   private final FutureTask<Schema> schema;
+
+   public XSD(final URL url)
+   {
+      this.schema = new FutureTask<Schema>(new Callable<Schema>()
+      {
+         public Schema call() throws Exception
+         {
+            SchemaFactory factory =  SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI);
+            factory.setResourceResolver(new LSResourceResolver()
+            {
+               public LSInput resolveResource(String type, String namespaceURI, String publicId, String systemId, String baseURI)
+               {
+                  String resolvedName = a.get(systemId);
+                  if (resolvedName != null)
+                  {
+                     try
+                     {
+                        InputStream in = XSD.class.getResourceAsStream(resolvedName);
+                        System.out.println("Resolved systemId=" + systemId);
+                        DOMImplementationRegistry registry = DOMImplementationRegistry.newInstance();
+                        DOMImplementationLS ls = (DOMImplementationLS)registry.getDOMImplementation("LS");
+                        LSInput input = ls.createLSInput();
+                        input.setByteStream(in);
+                        return input;
+                     }
+                     catch (Exception e)
+                     {
+                        log.error("Could not obtain xml.xsd", e);
+                     }
+                  }
+                  return null;
+               }
+            });
+            return factory.newSchema(url);
+         }
+      });
+   }
+
+   public XSD fetch()
+   {
+      new Thread()
+      {
+         public void run()
+         {
+            schema.run();
+         }
+      }.start();
+      return this;
+   }
+
+   public XSD fetch(Executor executor)
+   {
+      executor.execute(schema);
+      return this;
+   }
+
+   public Validator getValidator()
+   {
+      try
+      {
+         return schema.get().newValidator();
+      }
+      catch (InterruptedException e)
+      {
+         throw new AssertionError(e);
+      }
+      catch (ExecutionException e)
+      {
+         throw new AssertionError(e.getCause());
+      }
+   }
+
+   public void validate(Source source) throws SAXException, IOException
+   {
+      getValidator().validate(source);
+   }
+}

Added: components/pc/trunk/portlet/src/main/resources/org/gatein/pc/portlet/impl/deployment/xml/XMLSchema.dtd
===================================================================
--- components/pc/trunk/portlet/src/main/resources/org/gatein/pc/portlet/impl/deployment/xml/XMLSchema.dtd	                        (rev 0)
+++ components/pc/trunk/portlet/src/main/resources/org/gatein/pc/portlet/impl/deployment/xml/XMLSchema.dtd	2011-09-23 08:35:39 UTC (rev 7495)
@@ -0,0 +1,402 @@
+<!-- DTD for XML Schemas: Part 1: Structures
+     Public Identifier: "-//W3C//DTD XMLSCHEMA 200102//EN"
+     Official Location: http://www.w3.org/2001/XMLSchema.dtd -->
+<!-- $Id: XMLSchema.dtd,v 1.31 2001/10/24 15:50:16 ht Exp $ -->
+<!-- Note this DTD is NOT normative, or even definitive. -->           <!--d-->
+<!-- prose copy in the structures REC is the definitive version -->    <!--d-->
+<!-- (which shouldn't differ from this one except for this -->         <!--d-->
+<!-- comment and entity expansions, but just in case) -->              <!--d-->
+<!-- With the exception of cases with multiple namespace
+     prefixes for the XML Schema namespace, any XML document which is
+     not valid per this DTD given redefinitions in its internal subset of the
+     'p' and 's' parameter entities below appropriate to its namespace
+     declaration of the XML Schema namespace is almost certainly not
+     a valid schema. -->
+
+<!-- The simpleType element and its constituent parts
+     are defined in XML Schema: Part 2: Datatypes -->
+<!ENTITY % xs-datatypes PUBLIC 'datatypes' 'datatypes.dtd' >
+
+<!ENTITY % p 'xs:'> <!-- can be overriden in the internal subset of a
+                         schema document to establish a different
+                         namespace prefix -->
+<!ENTITY % s ':xs'> <!-- if %p is defined (e.g. as foo:) then you must
+                         also define %s as the suffix for the appropriate
+                         namespace declaration (e.g. :foo) -->
+<!ENTITY % nds 'xmlns%s;'>
+
+<!-- Define all the element names, with optional prefix -->
+<!ENTITY % schema "%p;schema">
+<!ENTITY % complexType "%p;complexType">
+<!ENTITY % complexContent "%p;complexContent">
+<!ENTITY % simpleContent "%p;simpleContent">
+<!ENTITY % extension "%p;extension">
+<!ENTITY % element "%p;element">
+<!ENTITY % unique "%p;unique">
+<!ENTITY % key "%p;key">
+<!ENTITY % keyref "%p;keyref">
+<!ENTITY % selector "%p;selector">
+<!ENTITY % field "%p;field">
+<!ENTITY % group "%p;group">
+<!ENTITY % all "%p;all">
+<!ENTITY % choice "%p;choice">
+<!ENTITY % sequence "%p;sequence">
+<!ENTITY % any "%p;any">
+<!ENTITY % anyAttribute "%p;anyAttribute">
+<!ENTITY % attribute "%p;attribute">
+<!ENTITY % attributeGroup "%p;attributeGroup">
+<!ENTITY % include "%p;include">
+<!ENTITY % import "%p;import">
+<!ENTITY % redefine "%p;redefine">
+<!ENTITY % notation "%p;notation">
+
+<!-- annotation elements -->
+<!ENTITY % annotation "%p;annotation">
+<!ENTITY % appinfo "%p;appinfo">
+<!ENTITY % documentation "%p;documentation">
+
+<!-- Customisation entities for the ATTLIST of each element type.
+     Define one of these if your schema takes advantage of the
+     anyAttribute='##other' in the schema for schemas -->
+
+<!ENTITY % schemaAttrs ''>
+<!ENTITY % complexTypeAttrs ''>
+<!ENTITY % complexContentAttrs ''>
+<!ENTITY % simpleContentAttrs ''>
+<!ENTITY % extensionAttrs ''>
+<!ENTITY % elementAttrs ''>
+<!ENTITY % groupAttrs ''>
+<!ENTITY % allAttrs ''>
+<!ENTITY % choiceAttrs ''>
+<!ENTITY % sequenceAttrs ''>
+<!ENTITY % anyAttrs ''>
+<!ENTITY % anyAttributeAttrs ''>
+<!ENTITY % attributeAttrs ''>
+<!ENTITY % attributeGroupAttrs ''>
+<!ENTITY % uniqueAttrs ''>
+<!ENTITY % keyAttrs ''>
+<!ENTITY % keyrefAttrs ''>
+<!ENTITY % selectorAttrs ''>
+<!ENTITY % fieldAttrs ''>
+<!ENTITY % includeAttrs ''>
+<!ENTITY % importAttrs ''>
+<!ENTITY % redefineAttrs ''>
+<!ENTITY % notationAttrs ''>
+<!ENTITY % annotationAttrs ''>
+<!ENTITY % appinfoAttrs ''>
+<!ENTITY % documentationAttrs ''>
+
+<!ENTITY % complexDerivationSet "CDATA">
+      <!-- #all or space-separated list drawn from derivationChoice -->
+<!ENTITY % blockSet "CDATA">
+      <!-- #all or space-separated list drawn from
+                      derivationChoice + 'substitution' -->
+
+<!ENTITY % mgs '%all; | %choice; | %sequence;'>
+<!ENTITY % cs '%choice; | %sequence;'>
+<!ENTITY % formValues '(qualified|unqualified)'>
+
+
+<!ENTITY % attrDecls    '((%attribute;| %attributeGroup;)*,(%anyAttribute;)?)'>
+
+<!ENTITY % particleAndAttrs '((%mgs; | %group;)?, %attrDecls;)'>
+
+<!-- This is used in part2 -->
+<!ENTITY % restriction1 '((%mgs; | %group;)?)'>
+
+%xs-datatypes;
+
+<!-- the duplication below is to produce an unambiguous content model
+     which allows annotation everywhere -->
+<!ELEMENT %schema; ((%include; | %import; | %redefine; | %annotation;)*,
+                    ((%simpleType; | %complexType;
+                      | %element; | %attribute;
+                      | %attributeGroup; | %group;
+                      | %notation; ),
+                     (%annotation;)*)* )>
+<!ATTLIST %schema;
+   targetNamespace      %URIref;               #IMPLIED
+   version              CDATA                  #IMPLIED
+   %nds;                %URIref;               #FIXED 'http://www.w3.org/2001/XMLSchema'
+   xmlns                CDATA                  #IMPLIED
+   finalDefault         %complexDerivationSet; ''
+   blockDefault         %blockSet;             ''
+   id                   ID                     #IMPLIED
+   elementFormDefault   %formValues;           'unqualified'
+   attributeFormDefault %formValues;           'unqualified'
+   xml:lang             CDATA                  #IMPLIED
+   %schemaAttrs;>
+<!-- Note the xmlns declaration is NOT in the Schema for Schemas,
+     because at the Infoset level where schemas operate,
+     xmlns(:prefix) is NOT an attribute! -->
+<!-- The declaration of xmlns is a convenience for schema authors -->
+ 
+<!-- The id attribute here and below is for use in external references
+     from non-schemas using simple fragment identifiers.
+     It is NOT used for schema-to-schema reference, internal or
+     external. -->
+
+<!-- a type is a named content type specification which allows attribute
+     declarations-->
+<!-- -->
+
+<!ELEMENT %complexType; ((%annotation;)?,
+                         (%simpleContent;|%complexContent;|
+                          %particleAndAttrs;))>
+
+<!ATTLIST %complexType;
+          name      %NCName;                        #IMPLIED
+          id        ID                              #IMPLIED
+          abstract  %boolean;                       #IMPLIED
+          final     %complexDerivationSet;          #IMPLIED
+          block     %complexDerivationSet;          #IMPLIED
+          mixed (true|false) 'false'
+          %complexTypeAttrs;>
+
+<!-- particleAndAttrs is shorthand for a root type -->
+<!-- mixed is disallowed if simpleContent, overriden if complexContent
+     has one too. -->
+
+<!-- If anyAttribute appears in one or more referenced attributeGroups
+     and/or explicitly, the intersection of the permissions is used -->
+
+<!ELEMENT %complexContent; ((%annotation;)?, (%restriction;|%extension;))>
+<!ATTLIST %complexContent;
+          mixed (true|false) #IMPLIED
+          id    ID           #IMPLIED
+          %complexContentAttrs;>
+
+<!-- restriction should use the branch defined above, not the simple
+     one from part2; extension should use the full model  -->
+
+<!ELEMENT %simpleContent; ((%annotation;)?, (%restriction;|%extension;))>
+<!ATTLIST %simpleContent;
+          id    ID           #IMPLIED
+          %simpleContentAttrs;>
+
+<!-- restriction should use the simple branch from part2, not the 
+     one defined above; extension should have no particle  -->
+
+<!ELEMENT %extension; ((%annotation;)?, (%particleAndAttrs;))>
+<!ATTLIST %extension;
+          base  %QName;      #REQUIRED
+          id    ID           #IMPLIED
+          %extensionAttrs;>
+
+<!-- an element is declared by either:
+ a name and a type (either nested or referenced via the type attribute)
+ or a ref to an existing element declaration -->
+
+<!ELEMENT %element; ((%annotation;)?, (%complexType;| %simpleType;)?,
+                     (%unique; | %key; | %keyref;)*)>
+<!-- simpleType or complexType only if no type|ref attribute -->
+<!-- ref not allowed at top level -->
+<!ATTLIST %element;
+            name               %NCName;               #IMPLIED
+            id                 ID                     #IMPLIED
+            ref                %QName;                #IMPLIED
+            type               %QName;                #IMPLIED
+            minOccurs          %nonNegativeInteger;   #IMPLIED
+            maxOccurs          CDATA                  #IMPLIED
+            nillable           %boolean;              #IMPLIED
+            substitutionGroup  %QName;                #IMPLIED
+            abstract           %boolean;              #IMPLIED
+            final              %complexDerivationSet; #IMPLIED
+            block              %blockSet;             #IMPLIED
+            default            CDATA                  #IMPLIED
+            fixed              CDATA                  #IMPLIED
+            form               %formValues;           #IMPLIED
+            %elementAttrs;>
+<!-- type and ref are mutually exclusive.
+     name and ref are mutually exclusive, one is required -->
+<!-- In the absence of type AND ref, type defaults to type of
+     substitutionGroup, if any, else the ur-type, i.e. unconstrained -->
+<!-- default and fixed are mutually exclusive -->
+
+<!ELEMENT %group; ((%annotation;)?,(%mgs;)?)>
+<!ATTLIST %group; 
+          name        %NCName;               #IMPLIED
+          ref         %QName;                #IMPLIED
+          minOccurs   %nonNegativeInteger;   #IMPLIED
+          maxOccurs   CDATA                  #IMPLIED
+          id          ID                     #IMPLIED
+          %groupAttrs;>
+
+<!ELEMENT %all; ((%annotation;)?, (%element;)*)>
+<!ATTLIST %all;
+          minOccurs   (1)                    #IMPLIED
+          maxOccurs   (1)                    #IMPLIED
+          id          ID                     #IMPLIED
+          %allAttrs;>
+
+<!ELEMENT %choice; ((%annotation;)?, (%element;| %group;| %cs; | %any;)*)>
+<!ATTLIST %choice;
+          minOccurs   %nonNegativeInteger;   #IMPLIED
+          maxOccurs   CDATA                  #IMPLIED
+          id          ID                     #IMPLIED
+          %choiceAttrs;>
+
+<!ELEMENT %sequence; ((%annotation;)?, (%element;| %group;| %cs; | %any;)*)>
+<!ATTLIST %sequence;
+          minOccurs   %nonNegativeInteger;   #IMPLIED
+          maxOccurs   CDATA                  #IMPLIED
+          id          ID                     #IMPLIED
+          %sequenceAttrs;>
+
+<!-- an anonymous grouping in a model, or
+     a top-level named group definition, or a reference to same -->
+
+<!-- Note that if order is 'all', group is not allowed inside.
+     If order is 'all' THIS group must be alone (or referenced alone) at
+     the top level of a content model -->
+<!-- If order is 'all', minOccurs==maxOccurs==1 on element/any inside -->
+<!-- Should allow minOccurs=0 inside order='all' . . . -->
+
+<!ELEMENT %any; (%annotation;)?>
+<!ATTLIST %any;
+            namespace       CDATA                  '##any'
+            processContents (skip|lax|strict)      'strict'
+            minOccurs       %nonNegativeInteger;   '1'
+            maxOccurs       CDATA                  '1'
+            id              ID                     #IMPLIED
+            %anyAttrs;>
+
+<!-- namespace is interpreted as follows:
+                  ##any      - - any non-conflicting WFXML at all
+
+                  ##other    - - any non-conflicting WFXML from namespace other
+                                  than targetNamespace
+
+                  ##local    - - any unqualified non-conflicting WFXML/attribute
+                  one or     - - any non-conflicting WFXML from
+                  more URI        the listed namespaces
+                  references
+
+                  ##targetNamespace ##local may appear in the above list,
+                    with the obvious meaning -->
+
+<!ELEMENT %anyAttribute; (%annotation;)?>
+<!ATTLIST %anyAttribute;
+            namespace       CDATA              '##any'
+            processContents (skip|lax|strict)  'strict'
+            id              ID                 #IMPLIED
+            %anyAttributeAttrs;>
+<!-- namespace is interpreted as for 'any' above -->
+
+<!-- simpleType only if no type|ref attribute -->
+<!-- ref not allowed at top level, name iff at top level -->
+<!ELEMENT %attribute; ((%annotation;)?, (%simpleType;)?)>
+<!ATTLIST %attribute;
+          name      %NCName;      #IMPLIED
+          id        ID            #IMPLIED
+          ref       %QName;       #IMPLIED
+          type      %QName;       #IMPLIED
+          use       (prohibited|optional|required) #IMPLIED
+          default   CDATA         #IMPLIED
+          fixed     CDATA         #IMPLIED
+          form      %formValues;  #IMPLIED
+          %attributeAttrs;>
+<!-- type and ref are mutually exclusive.
+     name and ref are mutually exclusive, one is required -->
+<!-- default for use is optional when nested, none otherwise -->
+<!-- default and fixed are mutually exclusive -->
+<!-- type attr and simpleType content are mutually exclusive -->
+
+<!-- an attributeGroup is a named collection of attribute decls, or a
+     reference thereto -->
+<!ELEMENT %attributeGroup; ((%annotation;)?,
+                       (%attribute; | %attributeGroup;)*,
+                       (%anyAttribute;)?) >
+<!ATTLIST %attributeGroup;
+                 name       %NCName;       #IMPLIED
+                 id         ID             #IMPLIED
+                 ref        %QName;        #IMPLIED
+                 %attributeGroupAttrs;>
+
+<!-- ref iff no content, no name.  ref iff not top level -->
+
+<!-- better reference mechanisms -->
+<!ELEMENT %unique; ((%annotation;)?, %selector;, (%field;)+)>
+<!ATTLIST %unique;
+          name     %NCName;       #REQUIRED
+	  id       ID             #IMPLIED
+	  %uniqueAttrs;>
+
+<!ELEMENT %key;    ((%annotation;)?, %selector;, (%field;)+)>
+<!ATTLIST %key;
+          name     %NCName;       #REQUIRED
+	  id       ID             #IMPLIED
+	  %keyAttrs;>
+
+<!ELEMENT %keyref; ((%annotation;)?, %selector;, (%field;)+)>
+<!ATTLIST %keyref;
+          name     %NCName;       #REQUIRED
+	  refer    %QName;        #REQUIRED
+	  id       ID             #IMPLIED
+	  %keyrefAttrs;>
+
+<!ELEMENT %selector; ((%annotation;)?)>
+<!ATTLIST %selector;
+          xpath %XPathExpr; #REQUIRED
+          id    ID          #IMPLIED
+          %selectorAttrs;>
+<!ELEMENT %field; ((%annotation;)?)>
+<!ATTLIST %field;
+          xpath %XPathExpr; #REQUIRED
+          id    ID          #IMPLIED
+          %fieldAttrs;>
+
+<!-- Schema combination mechanisms -->
+<!ELEMENT %include; (%annotation;)?>
+<!ATTLIST %include;
+          schemaLocation %URIref; #REQUIRED
+          id             ID       #IMPLIED
+          %includeAttrs;>
+
+<!ELEMENT %import; (%annotation;)?>
+<!ATTLIST %import;
+          namespace      %URIref; #IMPLIED
+          schemaLocation %URIref; #IMPLIED
+          id             ID       #IMPLIED
+          %importAttrs;>
+
+<!ELEMENT %redefine; (%annotation; | %simpleType; | %complexType; |
+                      %attributeGroup; | %group;)*>
+<!ATTLIST %redefine;
+          schemaLocation %URIref; #REQUIRED
+          id             ID       #IMPLIED
+          %redefineAttrs;>
+
+<!ELEMENT %notation; (%annotation;)?>
+<!ATTLIST %notation;
+	  name        %NCName;    #REQUIRED
+	  id          ID          #IMPLIED
+	  public      CDATA       #REQUIRED
+	  system      %URIref;    #IMPLIED
+	  %notationAttrs;>
+
+<!-- Annotation is either application information or documentation -->
+<!-- By having these here they are available for datatypes as well
+     as all the structures elements -->
+
+<!ELEMENT %annotation; (%appinfo; | %documentation;)*>
+<!ATTLIST %annotation; %annotationAttrs;>
+
+<!-- User must define annotation elements in internal subset for this
+     to work -->
+<!ELEMENT %appinfo; ANY>   <!-- too restrictive -->
+<!ATTLIST %appinfo;
+          source     %URIref;      #IMPLIED
+          id         ID         #IMPLIED
+          %appinfoAttrs;>
+<!ELEMENT %documentation; ANY>   <!-- too restrictive -->
+<!ATTLIST %documentation;
+          source     %URIref;   #IMPLIED
+          id         ID         #IMPLIED
+          xml:lang   CDATA      #IMPLIED
+          %documentationAttrs;>
+
+<!NOTATION XMLSchemaStructures PUBLIC
+           'structures' 'http://www.w3.org/2001/XMLSchema.xsd' >
+<!NOTATION XML PUBLIC
+           'REC-xml-1998-0210' 'http://www.w3.org/TR/1998/REC-xml-19980210' >

Added: components/pc/trunk/portlet/src/main/resources/org/gatein/pc/portlet/impl/deployment/xml/datatypes.dtd
===================================================================
--- components/pc/trunk/portlet/src/main/resources/org/gatein/pc/portlet/impl/deployment/xml/datatypes.dtd	                        (rev 0)
+++ components/pc/trunk/portlet/src/main/resources/org/gatein/pc/portlet/impl/deployment/xml/datatypes.dtd	2011-09-23 08:35:39 UTC (rev 7495)
@@ -0,0 +1,203 @@
+<!--
+        DTD for XML Schemas: Part 2: Datatypes
+        $Id: datatypes.dtd,v 1.23 2001/03/16 17:36:30 ht Exp $
+        Note this DTD is NOT normative, or even definitive. - - the
+        prose copy in the datatypes REC is the definitive version
+        (which shouldn't differ from this one except for this comment
+        and entity expansions, but just in case)
+  -->
+
+<!--
+        This DTD cannot be used on its own, it is intended
+        only for incorporation in XMLSchema.dtd, q.v.
+  -->
+
+<!-- Define all the element names, with optional prefix -->
+<!ENTITY % simpleType "%p;simpleType">
+<!ENTITY % restriction "%p;restriction">
+<!ENTITY % list "%p;list">
+<!ENTITY % union "%p;union">
+<!ENTITY % maxExclusive "%p;maxExclusive">
+<!ENTITY % minExclusive "%p;minExclusive">
+<!ENTITY % maxInclusive "%p;maxInclusive">
+<!ENTITY % minInclusive "%p;minInclusive">
+<!ENTITY % totalDigits "%p;totalDigits">
+<!ENTITY % fractionDigits "%p;fractionDigits">
+<!ENTITY % length "%p;length">
+<!ENTITY % minLength "%p;minLength">
+<!ENTITY % maxLength "%p;maxLength">
+<!ENTITY % enumeration "%p;enumeration">
+<!ENTITY % whiteSpace "%p;whiteSpace">
+<!ENTITY % pattern "%p;pattern">
+
+<!--
+        Customisation entities for the ATTLIST of each element
+        type. Define one of these if your schema takes advantage
+        of the anyAttribute='##other' in the schema for schemas
+  -->
+
+<!ENTITY % simpleTypeAttrs "">
+<!ENTITY % restrictionAttrs "">
+<!ENTITY % listAttrs "">
+<!ENTITY % unionAttrs "">
+<!ENTITY % maxExclusiveAttrs "">
+<!ENTITY % minExclusiveAttrs "">
+<!ENTITY % maxInclusiveAttrs "">
+<!ENTITY % minInclusiveAttrs "">
+<!ENTITY % totalDigitsAttrs "">
+<!ENTITY % fractionDigitsAttrs "">
+<!ENTITY % lengthAttrs "">
+<!ENTITY % minLengthAttrs "">
+<!ENTITY % maxLengthAttrs "">
+<!ENTITY % enumerationAttrs "">
+<!ENTITY % whiteSpaceAttrs "">
+<!ENTITY % patternAttrs "">
+
+<!-- Define some entities for informative use as attribute
+        types -->
+<!ENTITY % URIref "CDATA">
+<!ENTITY % XPathExpr "CDATA">
+<!ENTITY % QName "NMTOKEN">
+<!ENTITY % QNames "NMTOKENS">
+<!ENTITY % NCName "NMTOKEN">
+<!ENTITY % nonNegativeInteger "NMTOKEN">
+<!ENTITY % boolean "(true|false)">
+<!ENTITY % simpleDerivationSet "CDATA">
+<!--
+        #all or space-separated list drawn from derivationChoice
+  -->
+
+<!--
+        Note that the use of 'facet' below is less restrictive
+        than is really intended:  There should in fact be no
+        more than one of each of minInclusive, minExclusive,
+        maxInclusive, maxExclusive, totalDigits, fractionDigits,
+        length, maxLength, minLength within datatype,
+        and the min- and max- variants of Inclusive and Exclusive
+        are mutually exclusive. On the other hand,  pattern and
+        enumeration may repeat.
+  -->
+<!ENTITY % minBound "(%minInclusive; | %minExclusive;)">
+<!ENTITY % maxBound "(%maxInclusive; | %maxExclusive;)">
+<!ENTITY % bounds "%minBound; | %maxBound;">
+<!ENTITY % numeric "%totalDigits; | %fractionDigits;">
+<!ENTITY % ordered "%bounds; | %numeric;">
+<!ENTITY % unordered
+   "%pattern; | %enumeration; | %whiteSpace; | %length; |
+   %maxLength; | %minLength;">
+<!ENTITY % facet "%ordered; | %unordered;">
+<!ENTITY % facetAttr 
+        "value CDATA #REQUIRED
+        id ID #IMPLIED">
+<!ENTITY % fixedAttr "fixed %boolean; #IMPLIED">
+<!ENTITY % facetModel "(%annotation;)?">
+<!ELEMENT %simpleType;
+        ((%annotation;)?, (%restriction; | %list; | %union;))>
+<!ATTLIST %simpleType;
+    name      %NCName; #IMPLIED
+    final     %simpleDerivationSet; #IMPLIED
+    id        ID       #IMPLIED
+    %simpleTypeAttrs;>
+<!-- name is required at top level -->
+<!ELEMENT %restriction; ((%annotation;)?,
+                         (%restriction1; |
+                          ((%simpleType;)?,(%facet;)*)),
+                         (%attrDecls;))>
+<!ATTLIST %restriction;
+    base      %QName;                  #IMPLIED
+    id        ID       #IMPLIED
+    %restrictionAttrs;>
+<!--
+        base and simpleType child are mutually exclusive,
+        one is required.
+
+        restriction is shared between simpleType and
+        simpleContent and complexContent (in XMLSchema.xsd).
+        restriction1 is for the latter cases, when this
+        is restricting a complex type, as is attrDecls.
+  -->
+<!ELEMENT %list; ((%annotation;)?,(%simpleType;)?)>
+<!ATTLIST %list;
+    itemType      %QName;             #IMPLIED
+    id        ID       #IMPLIED
+    %listAttrs;>
+<!--
+        itemType and simpleType child are mutually exclusive,
+        one is required
+  -->
+<!ELEMENT %union; ((%annotation;)?,(%simpleType;)*)>
+<!ATTLIST %union;
+    id            ID       #IMPLIED
+    memberTypes   %QNames;            #IMPLIED
+    %unionAttrs;>
+<!--
+        At least one item in memberTypes or one simpleType
+        child is required
+  -->
+
+<!ELEMENT %maxExclusive; %facetModel;>
+<!ATTLIST %maxExclusive;
+        %facetAttr;
+        %fixedAttr;
+        %maxExclusiveAttrs;>
+<!ELEMENT %minExclusive; %facetModel;>
+<!ATTLIST %minExclusive;
+        %facetAttr;
+        %fixedAttr;
+        %minExclusiveAttrs;>
+
+<!ELEMENT %maxInclusive; %facetModel;>
+<!ATTLIST %maxInclusive;
+        %facetAttr;
+        %fixedAttr;
+        %maxInclusiveAttrs;>
+<!ELEMENT %minInclusive; %facetModel;>
+<!ATTLIST %minInclusive;
+        %facetAttr;
+        %fixedAttr;
+        %minInclusiveAttrs;>
+
+<!ELEMENT %totalDigits; %facetModel;>
+<!ATTLIST %totalDigits;
+        %facetAttr;
+        %fixedAttr;
+        %totalDigitsAttrs;>
+<!ELEMENT %fractionDigits; %facetModel;>
+<!ATTLIST %fractionDigits;
+        %facetAttr;
+        %fixedAttr;
+        %fractionDigitsAttrs;>
+
+<!ELEMENT %length; %facetModel;>
+<!ATTLIST %length;
+        %facetAttr;
+        %fixedAttr;
+        %lengthAttrs;>
+<!ELEMENT %minLength; %facetModel;>
+<!ATTLIST %minLength;
+        %facetAttr;
+        %fixedAttr;
+        %minLengthAttrs;>
+<!ELEMENT %maxLength; %facetModel;>
+<!ATTLIST %maxLength;
+        %facetAttr;
+        %fixedAttr;
+        %maxLengthAttrs;>
+
+<!-- This one can be repeated -->
+<!ELEMENT %enumeration; %facetModel;>
+<!ATTLIST %enumeration;
+        %facetAttr;
+        %enumerationAttrs;>
+
+<!ELEMENT %whiteSpace; %facetModel;>
+<!ATTLIST %whiteSpace;
+        %facetAttr;
+        %fixedAttr;
+        %whiteSpaceAttrs;>
+
+<!-- This one can be repeated -->
+<!ELEMENT %pattern; %facetModel;>
+<!ATTLIST %pattern;
+        %facetAttr;
+        %patternAttrs;>

Added: components/pc/trunk/portlet/src/main/resources/org/gatein/pc/portlet/impl/deployment/xml/portlet-app_1_0.xsd
===================================================================
--- components/pc/trunk/portlet/src/main/resources/org/gatein/pc/portlet/impl/deployment/xml/portlet-app_1_0.xsd	                        (rev 0)
+++ components/pc/trunk/portlet/src/main/resources/org/gatein/pc/portlet/impl/deployment/xml/portlet-app_1_0.xsd	2011-09-23 08:35:39 UTC (rev 7495)
@@ -0,0 +1,682 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<schema
+	targetNamespace="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd"
+	xmlns="http://www.w3.org/2001/XMLSchema"
+	xmlns:portlet="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd"
+	xmlns:xs="http://www.w3.org/2001/XMLSchema"
+	elementFormDefault="qualified" attributeFormDefault="unqualified"
+	version="1.0" xml:lang="en">
+	<annotation>
+		<documentation>
+			This is the XML Schema for the Portlet 1.0 deployment
+			descriptor.
+		</documentation>
+	</annotation>
+	<annotation>
+		<documentation>
+			The following conventions apply to all J2EE deployment
+			descriptor elements unless indicated otherwise. - In
+			elements that specify a pathname to a file within the same
+			JAR file, relative filenames (i.e., those not starting with
+			"/") are considered relative to the root of the JAR file's
+			namespace. Absolute filenames (i.e., those starting with
+			"/") also specify names in the root of the JAR file's
+			namespace. In general, relative names are preferred. The
+			exception is .war files where absolute names are preferred
+			for consistency with the Servlet API.
+		</documentation>
+	</annotation>
+	<!-- *********************************************************** -->
+	<import namespace="http://www.w3.org/XML/1998/namespace"
+		schemaLocation="http://www.w3.org/2001/xml.xsd" />
+	<element name="portlet-app" type="portlet:portlet-appType">
+		<annotation>
+			<documentation>
+				The portlet-app element is the root of the deployment
+				descriptor for a portlet application. This element has a
+				required attribute version to specify to which version
+				of the schema the deployment descriptor conforms.
+			</documentation>
+		</annotation>
+		<unique name="portlet-name-uniqueness">
+			<annotation>
+				<documentation>
+					The portlet element contains the name of a portlet.
+					This name must be unique within the portlet
+					application.
+				</documentation>
+			</annotation>
+			<selector xpath="portlet:portlet" />
+			<field xpath="portlet:portlet-name" />
+		</unique>
+		<unique name="custom-portlet-mode-uniqueness">
+			<annotation>
+				<documentation>
+					The custom-portlet-mode element contains the
+					portlet-mode. This portlet mode must be unique
+					within the portlet application.
+				</documentation>
+			</annotation>
+			<selector xpath="portlet:custom-portlet-mode" />
+			<field xpath="portlet:portlet-mode" />
+		</unique>
+		<unique name="custom-window-state-uniqueness">
+			<annotation>
+				<documentation>
+					The custom-window-state element contains the
+					window-state. This window state must be unique
+					within the portlet application.
+				</documentation>
+			</annotation>
+			<selector xpath="portlet:custom-window-state" />
+			<field xpath="portlet:window-state" />
+		</unique>
+		<unique name="user-attribute-name-uniqueness">
+			<annotation>
+				<documentation>
+					The user-attribute element contains the name the
+					attribute. This name must be unique within the
+					portlet application.
+				</documentation>
+			</annotation>
+			<selector xpath="portlet:user-attribute" />
+			<field xpath="portlet:name" />
+		</unique>
+	</element>
+	<complexType name="portlet-appType">
+		<sequence>
+			<element name="portlet" type="portlet:portletType"
+				minOccurs="0" maxOccurs="unbounded">
+				<unique name="init-param-name-uniqueness">
+					<annotation>
+						<documentation>
+							The init-param element contains the name the
+							attribute. This name must be unique within
+							the portlet.
+						</documentation>
+					</annotation>
+					<selector xpath="portlet:init-param" />
+					<field xpath="portlet:name" />
+				</unique>
+				<unique name="supports-mime-type-uniqueness">
+					<annotation>
+						<documentation>
+							The supports element contains the supported
+							mime-type. This mime type must be unique
+							within the portlet.
+						</documentation>
+					</annotation>
+					<selector xpath="portlet:supports" />
+					<field xpath="mime-type" />
+				</unique>
+				<unique name="preference-name-uniqueness">
+					<annotation>
+						<documentation>
+							The preference element contains the name the
+							preference. This name must be unique within
+							the portlet.
+						</documentation>
+					</annotation>
+					<selector
+						xpath="portlet:portlet-preferences/portlet:preference" />
+					<field xpath="portlet:name" />
+				</unique>
+				<unique name="security-role-ref-name-uniqueness">
+					<annotation>
+						<documentation>
+							The security-role-ref element contains the
+							role-name. This role name must be unique
+							within the portlet.
+						</documentation>
+					</annotation>
+					<selector xpath="portlet:security-role-ref" />
+					<field xpath="portlet:role-name" />
+				</unique>
+			</element>
+			<element name="custom-portlet-mode"
+				type="portlet:custom-portlet-modeType" minOccurs="0"
+				maxOccurs="unbounded" />
+			<element name="custom-window-state"
+				type="portlet:custom-window-stateType" minOccurs="0"
+				maxOccurs="unbounded" />
+			<element name="user-attribute"
+				type="portlet:user-attributeType" minOccurs="0"
+				maxOccurs="unbounded" />
+			<element name="security-constraint"
+				type="portlet:security-constraintType" minOccurs="0"
+				maxOccurs="unbounded" />
+		</sequence>
+		<attribute name="version" type="string" use="required" />
+		<attribute name="id" type="string" use="optional" />
+	</complexType>
+	<complexType name="custom-portlet-modeType">
+		<annotation>
+			<documentation>
+				A custom portlet mode that one or more portlets in this
+				portlet application supports. Used in: portlet-app
+			</documentation>
+		</annotation>
+		<sequence>
+			<element name="description" type="portlet:descriptionType"
+				minOccurs="0" maxOccurs="unbounded" />
+			<element name="portlet-mode"
+				type="portlet:portlet-modeType" />
+		</sequence>
+		<attribute name="id" type="string" use="optional" />
+	</complexType>
+	<complexType name="custom-window-stateType">
+		<annotation>
+			<documentation>
+				A custom window state that one or more portlets in this
+				portlet application supports. Used in: portlet-app
+			</documentation>
+		</annotation>
+		<sequence>
+			<element name="description" type="portlet:descriptionType"
+				minOccurs="0" maxOccurs="unbounded" />
+			<element name="window-state"
+				type="portlet:window-stateType" />
+		</sequence>
+		<attribute name="id" type="string" use="optional" />
+	</complexType>
+	<complexType name="expiration-cacheType">
+		<annotation>
+			<documentation>
+				Expriation-cache defines expiration-based caching for
+				this portlet. The parameter indicates the time in
+				seconds after which the portlet output expires. -1
+				indicates that the output never expires. Used in:
+				portlet
+			</documentation>
+		</annotation>
+		<simpleContent>
+			<extension base="int" />
+		</simpleContent>
+	</complexType>
+	<complexType name="init-paramType">
+		<annotation>
+			<documentation>
+				The init-param element contains a name/value pair as an
+				initialization param of the portlet Used in:portlet
+			</documentation>
+		</annotation>
+		<sequence>
+			<element name="description" type="portlet:descriptionType"
+				minOccurs="0" maxOccurs="unbounded" />
+			<element name="name" type="portlet:nameType" />
+			<element name="value" type="portlet:valueType" />
+		</sequence>
+		<attribute name="id" type="string" use="optional" />
+	</complexType>
+	<complexType name="keywordsType">
+		<annotation>
+			<documentation>
+				Locale specific keywords associated with this portlet.
+				The kewords are separated by commas. Used in:
+				portlet-info
+			</documentation>
+		</annotation>
+		<simpleContent>
+			<extension base="string" />
+		</simpleContent>
+	</complexType>
+	<complexType name="mime-typeType">
+		<annotation>
+			<documentation>
+				MIME type name, e.g. "text/html". The MIME type may also
+				contain the wildcard character '*', like "text/*" or
+				"*/*". Used in: supports
+			</documentation>
+		</annotation>
+		<simpleContent>
+			<extension base="string" />
+		</simpleContent>
+	</complexType>
+	<complexType name="nameType">
+		<annotation>
+			<documentation>
+				The name element contains the name of a parameter. Used
+				in: init-param, ...
+			</documentation>
+		</annotation>
+		<simpleContent>
+			<extension base="string" />
+		</simpleContent>
+	</complexType>
+	<complexType name="portletType">
+		<annotation>
+			<documentation>
+				The portlet element contains the declarative data of a
+				portlet. Used in: portlet-app
+			</documentation>
+		</annotation>
+		<sequence>
+			<element name="description" type="portlet:descriptionType"
+				minOccurs="0" maxOccurs="unbounded" />
+			<element name="portlet-name"
+				type="portlet:portlet-nameType" />
+			<element name="display-name" type="portlet:display-nameType"
+				minOccurs="0" maxOccurs="unbounded" />
+			<element name="portlet-class"
+				type="portlet:portlet-classType" />
+			<element name="init-param" type="portlet:init-paramType"
+				minOccurs="0" maxOccurs="unbounded" />
+			<element name="expiration-cache"
+				type="portlet:expiration-cacheType" minOccurs="0" />
+			<element name="supports" type="portlet:supportsType"
+				maxOccurs="unbounded" />
+			<element name="supported-locale"
+				type="portlet:supported-localeType" minOccurs="0"
+				maxOccurs="unbounded" />
+			<choice>
+				<sequence>
+					<element name="resource-bundle"
+						type="portlet:resource-bundleType" />
+					<element name="portlet-info"
+						type="portlet:portlet-infoType" minOccurs="0" />
+				</sequence>
+				<element name="portlet-info"
+					type="portlet:portlet-infoType" />
+			</choice>
+			<element name="portlet-preferences"
+				type="portlet:portlet-preferencesType" minOccurs="0" />
+			<element name="security-role-ref"
+				type="portlet:security-role-refType" minOccurs="0"
+				maxOccurs="unbounded" />
+		</sequence>
+		<attribute name="id" type="string" use="optional" />
+	</complexType>
+	<simpleType name="portlet-classType">
+		<annotation>
+			<documentation>
+				The portlet-class element contains the fully qualified
+				class name of the portlet. Used in: portlet
+			</documentation>
+		</annotation>
+		<restriction base="portlet:fully-qualified-classType" />
+	</simpleType>
+	<complexType name="portlet-collectionType">
+		<annotation>
+			<documentation>
+				The portlet-collectionType is used to identify a subset
+				of portlets within a portlet application to which a
+				security constraint applies. Used in:
+				security-constraint
+			</documentation>
+		</annotation>
+		<sequence>
+			<element name="portlet-name" type="portlet:portlet-nameType"
+				maxOccurs="unbounded" />
+		</sequence>
+	</complexType>
+	<complexType name="portlet-infoType">
+		<sequence>
+			<element name="title" type="portlet:titleType" />
+			<element name="short-title" type="portlet:short-titleType"
+				minOccurs="0" />
+			<element name="keywords" type="portlet:keywordsType"
+				minOccurs="0" />
+		</sequence>
+		<attribute name="id" type="string" use="optional" />
+	</complexType>
+	<complexType name="portlet-modeType">
+		<annotation>
+			<documentation>
+				Portlet modes. The specification pre-defines the
+				following values as valid portlet mode constants:
+				"edit", "help", "view". Portlet mode names are not case
+				sensitive. Used in: custom-portlet-mode, supports
+			</documentation>
+		</annotation>
+		<simpleContent>
+			<extension base="string" />
+		</simpleContent>
+	</complexType>
+	<complexType name="portlet-nameType">
+		<annotation>
+			<documentation>
+				The portlet-name element contains the canonical name of
+				the portlet. Each portlet name is unique within the
+				portlet application. Used in: portlet, portlet-mapping
+			</documentation>
+		</annotation>
+		<simpleContent>
+			<extension base="string" />
+		</simpleContent>
+	</complexType>
+	<complexType name="portlet-preferencesType">
+		<annotation>
+			<documentation>
+				Portlet persistent preference store. Used in: portlet
+			</documentation>
+		</annotation>
+		<sequence>
+			<element name="preference" type="portlet:preferenceType"
+				minOccurs="0" maxOccurs="unbounded" />
+			<element name="preferences-validator"
+				type="portlet:preferences-validatorType" minOccurs="0" />
+		</sequence>
+		<attribute name="id" type="string" use="optional" />
+	</complexType>
+	<complexType name="preferenceType">
+		<annotation>
+			<documentation>
+				Persistent preference values that may be used for
+				customization and personalization by the portlet. Used
+				in: portlet-preferences
+			</documentation>
+		</annotation>
+		<sequence>
+			<element name="name" type="portlet:nameType" />
+			<element name="value" type="portlet:valueType" minOccurs="0"
+				maxOccurs="unbounded" />
+			<element name="read-only" type="portlet:read-onlyType"
+				minOccurs="0" />
+		</sequence>
+		<attribute name="id" type="string" use="optional" />
+	</complexType>
+	<simpleType name="preferences-validatorType">
+		<annotation>
+			<documentation>
+				The class specified under preferences-validator
+				implements the PreferencesValidator interface to
+				validate the preferences settings. Used in:
+				portlet-preferences
+			</documentation>
+		</annotation>
+		<restriction base="portlet:fully-qualified-classType" />
+	</simpleType>
+	<simpleType name="read-onlyType">
+		<annotation>
+			<documentation>
+				read-only indicates that a setting cannot be changed in
+				any of the standard portlet modes ("view","edit" or
+				"help"). Per default all preferences are modifiable.
+				Valid values are: - true for read-only - false for
+				modifiable Used in: preferences
+			</documentation>
+		</annotation>
+		<restriction base="portlet:string">
+			<enumeration value="true" />
+			<enumeration value="false" />
+		</restriction>
+	</simpleType>
+	<complexType name="resource-bundleType">
+		<annotation>
+			<documentation>
+				Filename of the resource bundle containing the language
+				specific portlet informations in different languages.
+				Used in: portlet-info
+			</documentation>
+		</annotation>
+		<simpleContent>
+			<extension base="string" />
+		</simpleContent>
+	</complexType>
+	<complexType name="role-linkType">
+		<annotation>
+			<documentation>
+				The role-link element is a reference to a defined
+				security role. The role-link element must contain the
+				name of one of the security roles defined in the
+				security-role elements. Used in: security-role-ref
+			</documentation>
+		</annotation>
+		<simpleContent>
+			<extension base="string" />
+		</simpleContent>
+	</complexType>
+	<complexType name="security-constraintType">
+		<annotation>
+			<documentation>
+				The security-constraintType is used to associate
+				intended security constraints with one or more portlets.
+				Used in: portlet-app
+			</documentation>
+		</annotation>
+		<sequence>
+			<element name="display-name" type="portlet:display-nameType"
+				minOccurs="0" maxOccurs="unbounded" />
+			<element name="portlet-collection"
+				type="portlet:portlet-collectionType" />
+			<element name="user-data-constraint"
+				type="portlet:user-data-constraintType" />
+		</sequence>
+		<attribute name="id" type="string" use="optional" />
+	</complexType>
+	<complexType name="security-role-refType">
+		<annotation>
+			<documentation>
+				The security-role-ref element contains the declaration
+				of a security role reference in the code of the web
+				application. The declaration consists of an optional
+				description, the security role name used in the code,
+				and an optional link to a security role. If the security
+				role is not specified, the Deployer must choose an
+				appropriate security role. The value of the role name
+				element must be the String used as the parameter to the
+				EJBContext.isCallerInRole(String roleName) method or the
+				HttpServletRequest.isUserInRole(String role) method.
+				Used in: portlet
+			</documentation>
+		</annotation>
+		<sequence>
+			<element name="description" type="portlet:descriptionType"
+				minOccurs="0" maxOccurs="unbounded" />
+			<element name="role-name" type="portlet:role-nameType" />
+			<element name="role-link" type="portlet:role-linkType"
+				minOccurs="0" />
+		</sequence>
+		<attribute name="id" type="string" use="optional" />
+	</complexType>
+	<complexType name="short-titleType">
+		<annotation>
+			<documentation>
+				Locale specific short version of the static title. Used
+				in: portlet-info
+			</documentation>
+		</annotation>
+		<simpleContent>
+			<extension base="string" />
+		</simpleContent>
+	</complexType>
+	<complexType name="supportsType">
+		<annotation>
+			<documentation>
+				Supports indicates the portlet modes a portlet supports
+				for a specific content type. All portlets must support
+				the view mode. Used in: portlet
+			</documentation>
+		</annotation>
+		<sequence>
+			<element name="mime-type" type="portlet:mime-typeType" />
+			<element name="portlet-mode" type="portlet:portlet-modeType"
+				minOccurs="0" maxOccurs="unbounded" />
+		</sequence>
+		<attribute name="id" type="string" use="optional" />
+	</complexType>
+	<complexType name="supported-localeType">
+		<annotation>
+			<documentation>
+				Indicated the locales the portlet supports. Used in:
+				portlet
+			</documentation>
+		</annotation>
+		<simpleContent>
+			<extension base="string" />
+		</simpleContent>
+	</complexType>
+	<complexType name="titleType">
+		<annotation>
+			<documentation>
+				Locale specific static title for this portlet. Used in:
+				portlet-info
+			</documentation>
+		</annotation>
+		<simpleContent>
+			<extension base="string" />
+		</simpleContent>
+	</complexType>
+	<simpleType name="transport-guaranteeType">
+		<annotation>
+			<documentation>
+				The transport-guaranteeType specifies that the
+				communication between client and portlet should be NONE,
+				INTEGRAL, or CONFIDENTIAL. NONE means that the portlet
+				does not require any transport guarantees. A value of
+				INTEGRAL means that the portlet requires that the data
+				sent between the client and portlet be sent in such a
+				way that it can't be changed in transit. CONFIDENTIAL
+				means that the portlet requires that the data be
+				transmitted in a fashion that prevents other entities
+				from observing the contents of the transmission. In most
+				cases, the presence of the INTEGRAL or CONFIDENTIAL flag
+				will indicate that the use of SSL is required. Used in:
+				user-data-constraint
+			</documentation>
+		</annotation>
+		<restriction base="portlet:string">
+			<enumeration value="NONE" />
+			<enumeration value="INTEGRAL" />
+			<enumeration value="CONFIDENTIAL" />
+		</restriction>
+	</simpleType>
+	<complexType name="user-attributeType">
+		<annotation>
+			<documentation>
+				User attribute defines a user specific attribute that
+				the portlet application needs. The portlet within this
+				application can access this attribute via the request
+				parameter USER_INFO map. Used in: portlet-app
+			</documentation>
+		</annotation>
+		<sequence>
+			<element name="description" type="portlet:descriptionType"
+				minOccurs="0" maxOccurs="unbounded" />
+			<element name="name" type="portlet:nameType" />
+		</sequence>
+		<attribute name="id" type="string" use="optional" />
+	</complexType>
+	<complexType name="user-data-constraintType">
+		<annotation>
+			<documentation>
+				The user-data-constraintType is used to indicate how
+				data communicated between the client and portlet should
+				be protected. Used in: security-constraint
+			</documentation>
+		</annotation>
+		<sequence>
+			<element name="description" type="portlet:descriptionType"
+				minOccurs="0" maxOccurs="unbounded" />
+			<element name="transport-guarantee"
+				type="portlet:transport-guaranteeType" />
+		</sequence>
+		<attribute name="id" type="string" use="optional" />
+	</complexType>
+	<complexType name="valueType">
+		<annotation>
+			<documentation>
+				The value element contains the value of a parameter.
+				Used in: init-param
+			</documentation>
+		</annotation>
+		<simpleContent>
+			<extension base="string" />
+		</simpleContent>
+	</complexType>
+	<complexType name="window-stateType">
+		<annotation>
+			<documentation>
+				Portlet window state. Window state names are not case
+				sensitive. Used in: custom-window-state
+			</documentation>
+		</annotation>
+		<simpleContent>
+			<extension base="string" />
+		</simpleContent>
+	</complexType>
+	<!--- everything below is copied from j2ee_1_4.xsd -->
+	<complexType name="descriptionType">
+		<annotation>
+			<documentation>
+				The description element is used to provide text
+				describing the parent element. The description element
+				should include any information that the portlet
+				application war file producer wants to provide to the
+				consumer of the portlet application war file (i.e., to
+				the Deployer). Typically, the tools used by the portlet
+				application war file consumer will display the
+				description when processing the parent element that
+				contains the description. It has an optional attribute
+				xml:lang to indicate which language is used in the
+				description according to RFC 1766
+				(http://www.ietf.org/rfc/rfc1766.txt). The default value
+				of this attribute is English(“en”). Used in: init-param,
+				portlet, portlet-app, security-role
+			</documentation>
+		</annotation>
+		<simpleContent>
+			<extension base="string">
+				<attribute ref="xml:lang" />
+			</extension>
+		</simpleContent>
+	</complexType>
+	<complexType name="display-nameType">
+		<annotation>
+			<documentation>
+				The display-name type contains a short name that is
+				intended to be displayed by tools. It is used by
+				display-name elements. The display name need not be
+				unique. Example: ...
+				<display-name xml:lang="en">
+					Employee Self Service
+				</display-name>
+
+				It has an optional attribute xml:lang to indicate which
+				language is used in the description according to RFC
+				1766 (http://www.ietf.org/rfc/rfc1766.txt). The default
+				value of this attribute is English(“en”).
+			</documentation>
+		</annotation>
+		<simpleContent>
+			<extension base="portlet:string">
+				<attribute ref="xml:lang" />
+			</extension>
+		</simpleContent>
+	</complexType>
+	<simpleType name="fully-qualified-classType">
+		<annotation>
+			<documentation>
+				The elements that use this type designate the name of a
+				Java class or interface.
+			</documentation>
+		</annotation>
+		<restriction base="portlet:string" />
+	</simpleType>
+	<simpleType name="role-nameType">
+		<annotation>
+			<documentation>
+				The role-nameType designates the name of a security
+				role.
+
+				The name must conform to the lexical rules for an
+				NMTOKEN.
+			</documentation>
+		</annotation>
+		<restriction base="NMTOKEN" />
+	</simpleType>
+	<simpleType name="string">
+		<annotation>
+			<documentation>
+				This is a special string datatype that is defined by
+				J2EE as a base type for defining collapsed strings. When
+				schemas require trailing/leading space elimination as
+				well as collapsing the existing whitespace, this base
+				type may be used.
+			</documentation>
+		</annotation>
+		<restriction base="string">
+			<whiteSpace value="collapse" />
+		</restriction>
+	</simpleType>
+</schema>

Added: components/pc/trunk/portlet/src/main/resources/org/gatein/pc/portlet/impl/deployment/xml/portlet-app_2_0.xsd
===================================================================
--- components/pc/trunk/portlet/src/main/resources/org/gatein/pc/portlet/impl/deployment/xml/portlet-app_2_0.xsd	                        (rev 0)
+++ components/pc/trunk/portlet/src/main/resources/org/gatein/pc/portlet/impl/deployment/xml/portlet-app_2_0.xsd	2011-09-23 08:35:39 UTC (rev 7495)
@@ -0,0 +1,830 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:portlet="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd" elementFormDefault="qualified" attributeFormDefault="unqualified" version="2.0" xml:lang="en">
+	<annotation>
+		<documentation>
+		This is the XML Schema for the Portlet 2.0 deployment descriptor.
+		</documentation>
+	</annotation>
+	<annotation>
+		<documentation>
+		The following conventions apply to all J2EE
+		deployment descriptor elements unless indicated otherwise.
+		- In elements that specify a pathname to a file within the
+		  same JAR file, relative filenames (i.e., those not
+		  starting with "/") are considered relative to the root of
+		  the JAR file's namespace.  Absolute filenames (i.e., those
+		  starting with "/") also specify names in the root of the
+		  JAR file's namespace.  In general, relative names are
+		  preferred.  The exception is .war files where absolute
+		  names are preferred for consistency with the Servlet API.
+		</documentation>
+	</annotation>
+	<!-- *********************************************************** -->
+	<import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="http://www.w3.org/2001/xml.xsd"/>
+	<element name="portlet-app" type="portlet:portlet-appType">
+		<annotation>
+			<documentation>
+			The portlet-app element is the root of the deployment descriptor
+			for a portlet application. This element has a required attribute version
+			to specify to which version of the schema the deployment descriptor
+			conforms. In order to be a valid JSR 286 portlet application the version
+			must have the value "2.0".
+			</documentation>
+		</annotation>
+		<unique name="portlet-name-uniqueness">
+			<annotation>
+				<documentation>
+				The portlet element contains the name of a portlet.
+				This name must be unique within the portlet application.
+				 </documentation>
+			</annotation>
+			<selector xpath="portlet:portlet"/>
+			<field xpath="portlet:portlet-name"/>
+		</unique>
+		<unique name="custom-portlet-mode-uniqueness">
+			<annotation>
+				<documentation>
+				The custom-portlet-mode element contains the portlet-mode.
+				This portlet mode must be unique within the portlet application.
+				</documentation>
+			</annotation>
+			<selector xpath="portlet:custom-portlet-mode"/>
+			<field xpath="portlet:portlet-mode"/>
+		</unique>
+		<unique name="custom-window-state-uniqueness">
+			<annotation>
+				<documentation>
+				The custom-window-state element contains the window-state.
+				This window state must be unique within the portlet application.
+				</documentation>
+			</annotation>
+			<selector xpath="portlet:custom-window-state"/>
+			<field xpath="portlet:window-state"/>
+		</unique>
+		<unique name="user-attribute-name-uniqueness">
+			<annotation>
+				<documentation>
+				The user-attribute element contains the name the attribute.
+				This name must be unique within the portlet application.
+				</documentation>
+			</annotation>
+			<selector xpath="portlet:user-attribute"/>
+			<field xpath="portlet:name"/>
+		</unique>
+		<unique name="filter-name-uniqueness">
+			<annotation>
+				<documentation>
+				The filter element contains the name of a filter.
+				The name must be unique within the portlet application.
+				</documentation>
+			</annotation>
+			<selector xpath="portlet:filter"/>
+			<field xpath="portlet:filter-name"/>
+		</unique>
+	</element>
+	<complexType name="portlet-appType">
+		<sequence>
+			<element name="portlet" type="portlet:portletType" minOccurs="0" maxOccurs="unbounded">
+				<unique name="init-param-name-uniqueness">
+					<annotation>
+						<documentation>
+						The init-param element contains the name the attribute.
+						This name must be unique within the portlet.
+						</documentation>
+					</annotation>
+					<selector xpath="portlet:init-param"/>
+					<field xpath="portlet:name"/>
+				</unique>
+				<unique name="supports-mime-type-uniqueness">
+					<annotation>
+						<documentation>
+						The supports element contains the supported mime-type.
+						This mime type must be unique within the portlet.
+						</documentation>
+					</annotation>
+					<selector xpath="portlet:supports"/>
+					<field xpath="mime-type"/>
+				</unique>
+				<unique name="preference-name-uniqueness">
+					<annotation>
+						<documentation>
+						The preference element contains the name the preference.
+						This name must be unique within the portlet.
+						</documentation>
+					</annotation>
+					<selector xpath="portlet:portlet-preferences/portlet:preference"/>
+					<field xpath="portlet:name"/>
+				</unique>
+				<unique name="security-role-ref-name-uniqueness">
+					<annotation>
+						<documentation>
+						The security-role-ref element contains the role-name.
+						This role name must be unique within the portlet.
+						</documentation>
+					</annotation>
+					<selector xpath="portlet:security-role-ref"/>
+					<field xpath="portlet:role-name"/>
+				</unique>
+			</element>
+			<element name="custom-portlet-mode" type="portlet:custom-portlet-modeType" minOccurs="0" maxOccurs="unbounded"/>
+			<element name="custom-window-state" type="portlet:custom-window-stateType" minOccurs="0" maxOccurs="unbounded"/>
+			<element name="user-attribute" type="portlet:user-attributeType" minOccurs="0" maxOccurs="unbounded"/>
+			<element name="security-constraint" type="portlet:security-constraintType" minOccurs="0" maxOccurs="unbounded"/>
+			<element name="resource-bundle" type="portlet:resource-bundleType" minOccurs="0"/>
+			<element name="filter" type="portlet:filterType" minOccurs="0" maxOccurs="unbounded"/>
+			<element name="filter-mapping" type="portlet:filter-mappingType" minOccurs="0" maxOccurs="unbounded"/>
+			<element name="default-namespace" type="xs:anyURI" minOccurs="0"/>
+			<element name="event-definition" type="portlet:event-definitionType" minOccurs="0" maxOccurs="unbounded"/>
+			<element name="public-render-parameter" type="portlet:public-render-parameterType" minOccurs="0" maxOccurs="unbounded"/>
+			<element name="listener" type="portlet:listenerType" minOccurs="0" maxOccurs="unbounded"/>
+			<element name="container-runtime-option" type="portlet:container-runtime-optionType" minOccurs="0" maxOccurs="unbounded"/>
+		</sequence>
+		<attribute name="version" type="portlet:string" use="required"/>
+		<attribute name="id" type="portlet:string" use="optional"/>
+	</complexType>
+	<complexType name="cache-scopeType">
+		<annotation>
+			<documentation>
+			Caching scope, allowed values are "private" indicating that the content should not be shared
+			across users and "public" indicating that the content may be shared across users.
+			The default value if not present is "private".
+			Used in: portlet
+			</documentation>
+		</annotation>
+		<simpleContent>
+			<extension base="portlet:string"/>
+		</simpleContent>
+	</complexType>
+	<complexType name="custom-portlet-modeType">
+		<annotation>
+			<documentation>
+			A custom portlet mode that one or more portlets in 
+			this portlet application supports.
+			If the portal does not need to provide some management functionality
+			for this portlet mode, the portal-managed element needs to be set
+			to "false", otherwise to "true". Default is "true".
+			Used in: portlet-app
+			</documentation>
+		</annotation>
+		<sequence>
+			<element name="description" type="portlet:descriptionType" minOccurs="0" maxOccurs="unbounded"/>
+			<element name="portlet-mode" type="portlet:portlet-modeType"/>
+			<element name="portal-managed" type="portlet:portal-managedType" minOccurs="0"/>
+		</sequence>
+		<attribute name="id" type="portlet:string" use="optional"/>
+	</complexType>
+	<complexType name="custom-window-stateType">
+		<annotation>
+			<documentation>
+			A custom window state that one or more portlets in this 
+			portlet application supports.
+			Used in: portlet-app
+			</documentation>
+		</annotation>
+		<sequence>
+			<element name="description" type="portlet:descriptionType" minOccurs="0" maxOccurs="unbounded"/>
+			<element name="window-state" type="portlet:window-stateType"/>
+		</sequence>
+		<attribute name="id" type="portlet:string" use="optional"/>
+	</complexType>
+	<complexType name="expiration-cacheType">
+		<annotation>
+			<documentation>
+			Expiration-time defines the time in seconds after which the portlet output expires. 
+			-1 indicates that the output never expires.
+			Used in: portlet
+			</documentation>
+		</annotation>
+		<simpleContent>
+			<extension base="int"/>
+		</simpleContent>
+	</complexType>
+	<complexType name="init-paramType">
+		<annotation>
+			<documentation>
+			The init-param element contains a name/value pair as an 
+			initialization param of the portlet
+			Used in:portlet
+			</documentation>
+		</annotation>
+		<sequence>
+			<element name="description" type="portlet:descriptionType" minOccurs="0" maxOccurs="unbounded"/>
+			<element name="name" type="portlet:nameType"/>
+			<element name="value" type="portlet:valueType"/>
+		</sequence>
+		<attribute name="id" type="portlet:string" use="optional"/>
+	</complexType>
+	<complexType name="keywordsType">
+		<annotation>
+			<documentation>
+			Locale specific keywords associated with this portlet.
+			The kewords are separated by commas.
+			Used in: portlet-info
+			</documentation>
+		</annotation>
+		<simpleContent>
+			<extension base="portlet:string"/>
+		</simpleContent>
+	</complexType>
+	<complexType name="mime-typeType">
+		<annotation>
+			<documentation>
+			MIME type name, e.g. "text/html".
+			The MIME type may also contain the wildcard
+			character '*', like "text/*" or "*/*".
+			Used in: supports
+			</documentation>
+		</annotation>
+		<simpleContent>
+			<extension base="portlet:string"/>
+		</simpleContent>
+	</complexType>
+	<complexType name="nameType">
+		<annotation>
+			<documentation>
+			The name element contains the name of a parameter. 
+			Used in: init-param, ...
+			</documentation>
+		</annotation>
+		<simpleContent>
+			<extension base="portlet:string"/>
+		</simpleContent>
+	</complexType>
+	<complexType name="portletType">
+		<annotation>
+			<documentation>
+			The portlet element contains the declarative data of a portlet. 
+			Used in: portlet-app
+			</documentation>
+		</annotation>
+		<sequence>
+			<element name="description" type="portlet:descriptionType" minOccurs="0" maxOccurs="unbounded"/>
+			<element name="portlet-name" type="portlet:portlet-nameType"/>
+			<element name="display-name" type="portlet:display-nameType" minOccurs="0" maxOccurs="unbounded"/>
+			<element name="portlet-class" type="portlet:portlet-classType"/>
+			<element name="init-param" type="portlet:init-paramType" minOccurs="0" maxOccurs="unbounded"/>
+			<element name="expiration-cache" type="portlet:expiration-cacheType" minOccurs="0"/>
+			<element name="cache-scope" type="portlet:cache-scopeType" minOccurs="0"/>
+			<element name="supports" type="portlet:supportsType" maxOccurs="unbounded"/>
+			<element name="supported-locale" type="portlet:supported-localeType" minOccurs="0" maxOccurs="unbounded"/>
+			<element name="resource-bundle" type="portlet:resource-bundleType" minOccurs="0"/>
+			<element name="portlet-info" type="portlet:portlet-infoType" minOccurs="0"/>
+			<element name="portlet-preferences" type="portlet:portlet-preferencesType" minOccurs="0"/>
+			<element name="security-role-ref" type="portlet:security-role-refType" minOccurs="0" maxOccurs="unbounded"/>
+			<element name="supported-processing-event" type="portlet:event-definition-referenceType" minOccurs="0" maxOccurs="unbounded"/>
+			<element name="supported-publishing-event" type="portlet:event-definition-referenceType" minOccurs="0" maxOccurs="unbounded"/>
+			<element name="supported-public-render-parameter" type="portlet:string" minOccurs="0" maxOccurs="unbounded"/>
+			<element name="container-runtime-option" type="portlet:container-runtime-optionType" minOccurs="0" maxOccurs="unbounded"/>
+		</sequence>
+		<attribute name="id" type="portlet:string" use="optional"/>
+	</complexType>
+	<simpleType name="portlet-classType">
+		<annotation>
+			<documentation>
+			 The portlet-class element contains the fully
+			 qualified class name of the portlet.
+			Used in: portlet
+			</documentation>
+		</annotation>
+		<restriction base="portlet:fully-qualified-classType"/>
+	</simpleType>
+	<complexType name="container-runtime-optionType">
+		<annotation>
+			<documentation>
+			 The container-runtime-option element contains settings
+			 for the portlet container that the portlet expects to be honored
+			 at runtime. These settings may re-define default portlet container
+			 behavior, like the javax.portlet.escapeXml setting that disables
+			 XML encoding of URLs produced by the portlet tag library as
+			 default.
+			 Names with the javax.portlet prefix are reserved for the Java
+			 Portlet Specification.
+			Used in: portlet-app, portlet
+			</documentation>
+		</annotation>
+		<sequence>
+			<element name="name" type="portlet:nameType"/>
+			<element name="value" type="portlet:valueType" minOccurs="0" maxOccurs="unbounded"/>
+		</sequence>
+	</complexType>
+	<complexType name="filter-mappingType">
+		<annotation>
+			<documentation>
+			Declaration of the filter mappings in this portlet
+			application is done by using filter-mappingType.
+			The container uses the filter-mapping
+			declarations to decide which filters to apply to a request,
+			and in what order. To determine which filters to
+			apply it matches filter-mapping declarations on the
+			portlet-name and the lifecyle phase defined in the
+			filter element. The order in which filters are invoked 
+			is the order in which filter-mapping declarations 
+			that match appear in the list of filter-mapping elements.
+			Used in: portlet-app
+			</documentation>
+		</annotation>
+		<sequence>
+			<element name="filter-name" type="portlet:filter-nameType"/>
+			<element name="portlet-name" type="portlet:portlet-nameType" maxOccurs="unbounded"/>
+		</sequence>
+	</complexType>
+	<complexType name="filterType">
+		<annotation>
+			<documentation>
+				The filter element specifies a filter that can transform the 
+				content of portlet requests and portlet responses. 
+				Filters can access the initialization parameters declared in 
+				the deployment descriptor at runtime via the FilterConfig 
+				interface.
+				A filter can be restricted to one or more lifecycle phases
+				of the portlet. Valid entries for lifecycle are:
+				ACTION_PHASE, EVENT_PHASE, RENDER_PHASE,
+				RESOURCE_PHASE
+				Used in: portlet-app
+				</documentation>
+		</annotation>
+		<sequence>
+			<element name="description" type="portlet:descriptionType" minOccurs="0" maxOccurs="unbounded"/>
+			<element name="display-name" type="portlet:display-nameType" minOccurs="0" maxOccurs="unbounded"/>
+			<element name="filter-name" type="portlet:filter-nameType"/>
+			<element name="filter-class" type="portlet:fully-qualified-classType"/>
+			<element name="lifecycle" type="portlet:string" maxOccurs="unbounded"/>
+			<element name="init-param" type="portlet:init-paramType" minOccurs="0" maxOccurs="unbounded"/>
+		</sequence>
+	</complexType>
+	<complexType name="portlet-collectionType">
+		<annotation>
+			<documentation>
+			The portlet-collectionType is used to identify a subset
+			of portlets within a portlet application to which a 
+			security constraint applies.
+			Used in: security-constraint
+			</documentation>
+		</annotation>
+		<sequence>
+			<element name="portlet-name" type="portlet:portlet-nameType" maxOccurs="unbounded"/>
+		</sequence>
+	</complexType>
+	<complexType name="event-definitionType">
+		<annotation>
+			<documentation>
+			The event-definitionType is used to declare events the portlet can either
+			receive or emit.
+			The name must be unique and must be the one the 
+			portlet is using in its code for referencing this event.
+			Used in: portlet-app
+			</documentation>
+		</annotation>
+		<sequence>
+			<element name="description" type="portlet:descriptionType" minOccurs="0" maxOccurs="unbounded"/>
+			<choice>
+				<element name="qname" type="xs:QName"/>
+				<element name="name" type="xs:NCName"/>
+			</choice>
+			<element name="alias" type="xs:QName" minOccurs="0" maxOccurs="unbounded"/>
+			<element name="value-type" type="portlet:fully-qualified-classType" minOccurs="0"/>
+		</sequence>
+		<attribute name="id" type="portlet:string" use="optional"/>
+	</complexType>
+	<complexType name="event-definition-referenceType">
+		<annotation>
+			<documentation>
+			The event-definition-referenceType is used to reference events 
+			declared with the event-definition element at application level.
+			Used in: portlet
+			</documentation>
+		</annotation>
+		<choice>
+			<element name="qname" type="xs:QName"/>
+			<element name="name" type="xs:NCName"/>
+		</choice>
+		<attribute name="id" type="portlet:string" use="optional"/>
+	</complexType>
+	<complexType name="listenerType">
+		<annotation>
+			<documentation>
+			The listenerType is used to declare listeners for this portlet application.
+			Used in: portlet-app
+			</documentation>
+		</annotation>
+		<sequence>
+			<element name="description" type="portlet:descriptionType" minOccurs="0" maxOccurs="unbounded"/>
+			<element name="display-name" type="portlet:display-nameType" minOccurs="0" maxOccurs="unbounded"/>
+			<element name="listener-class" type="portlet:fully-qualified-classType"/>
+		</sequence>
+		<attribute name="id" type="portlet:string" use="optional"/>
+	</complexType>
+	<complexType name="portlet-infoType">
+		<sequence>
+			<element name="title" type="portlet:titleType" minOccurs="0"/>
+			<element name="short-title" type="portlet:short-titleType" minOccurs="0"/>
+			<element name="keywords" type="portlet:keywordsType" minOccurs="0"/>
+		</sequence>
+		<attribute name="id" type="portlet:string" use="optional"/>
+	</complexType>
+	<simpleType name="portal-managedType">
+		<annotation>
+			<documentation>
+			portal-managed indicates if a custom portlet mode
+			needs to be managed by the portal or not.
+			Per default all custom portlet modes are portal managed.
+			Valid values are: 
+			- true for portal-managed
+			- false for not portal managed
+			Used in: custom-portlet-modes
+			</documentation>
+		</annotation>
+		<restriction base="portlet:string">
+			<enumeration value="true"/>
+			<enumeration value="false"/>
+		</restriction>
+	</simpleType>
+	<complexType name="portlet-modeType">
+		<annotation>
+			<documentation>
+			Portlet modes. The specification pre-defines the following values 
+			as valid portlet mode constants: 
+			"edit", "help", "view".
+			Portlet mode names are not case sensitive.
+			Used in: custom-portlet-mode, supports
+			</documentation>
+		</annotation>
+		<simpleContent>
+			<extension base="portlet:string"/>
+		</simpleContent>
+	</complexType>
+	<complexType name="portlet-nameType">
+		<annotation>
+			<documentation>
+			The portlet-name element contains the canonical name of the 
+			portlet. Each portlet name is unique within the portlet 
+			application.
+			Used in: portlet, filter-mapping
+			</documentation>
+		</annotation>
+		<simpleContent>
+			<extension base="portlet:string"/>
+		</simpleContent>
+	</complexType>
+	<complexType name="portlet-preferencesType">
+		<annotation>
+			<documentation>
+			Portlet persistent preference store.
+			Used in: portlet
+			</documentation>
+		</annotation>
+		<sequence>
+			<element name="preference" type="portlet:preferenceType" minOccurs="0" maxOccurs="unbounded"/>
+			<element name="preferences-validator" type="portlet:preferences-validatorType" minOccurs="0"/>
+		</sequence>
+		<attribute name="id" type="portlet:string" use="optional"/>
+	</complexType>
+	<complexType name="preferenceType">
+		<annotation>
+			<documentation>
+			Persistent preference values that may be used for customization 
+			and personalization by the portlet.
+			Used in: portlet-preferences
+			</documentation>
+		</annotation>
+		<sequence>
+			<element name="name" type="portlet:nameType"/>
+			<element name="value" type="portlet:valueType" minOccurs="0" maxOccurs="unbounded"/>
+			<element name="read-only" type="portlet:read-onlyType" minOccurs="0"/>
+		</sequence>
+		<attribute name="id" type="portlet:string" use="optional"/>
+	</complexType>
+	<simpleType name="preferences-validatorType">
+		<annotation>
+			<documentation>
+			The class specified under preferences-validator implements
+			the PreferencesValidator interface to validate the 
+			preferences settings.
+			Used in: portlet-preferences
+			</documentation>
+		</annotation>
+		<restriction base="portlet:fully-qualified-classType"/>
+	</simpleType>
+	<simpleType name="read-onlyType">
+		<annotation>
+			<documentation>
+			read-only indicates that a setting cannot
+			be changed in any of the standard portlet modes 
+			("view","edit" or "help").
+			Per default all preferences are modifiable.
+			Valid values are: 
+			- true for read-only
+			- false for modifiable
+			Used in: preferences
+			</documentation>
+		</annotation>
+		<restriction base="portlet:string">
+			<enumeration value="true"/>
+			<enumeration value="false"/>
+		</restriction>
+	</simpleType>
+	<complexType name="resource-bundleType">
+		<annotation>
+			<documentation>
+			Name of the resource bundle containing the language specific 
+			portlet informations in different languages (Filename without
+			the language specific part (e.g. _en) and the ending (.properties).
+			Used in: portlet-info
+			</documentation>
+		</annotation>
+		<simpleContent>
+			<extension base="portlet:string"/>
+		</simpleContent>
+	</complexType>
+	<complexType name="role-linkType">
+		<annotation>
+			<documentation>
+			The role-link element is a reference to a defined security role. 
+			The role-link element must contain the name of one of the 
+			security roles defined in the security-role elements.
+			Used in: security-role-ref
+			</documentation>
+		</annotation>
+		<simpleContent>
+			<extension base="portlet:string"/>
+		</simpleContent>
+	</complexType>
+	<complexType name="security-constraintType">
+		<annotation>
+			<documentation>
+			The security-constraintType is used to associate
+			intended security constraints with one or more portlets.
+			Used in: portlet-app
+			</documentation>
+		</annotation>
+		<sequence>
+			<element name="display-name" type="portlet:display-nameType" minOccurs="0" maxOccurs="unbounded"/>
+			<element name="portlet-collection" type="portlet:portlet-collectionType"/>
+			<element name="user-data-constraint" type="portlet:user-data-constraintType"/>
+		</sequence>
+		<attribute name="id" type="portlet:string" use="optional"/>
+	</complexType>
+	<complexType name="security-role-refType">
+		<annotation>
+			<documentation>
+			The security-role-ref element contains the declaration of a 
+			security role reference in the code of the web application. The 
+			declaration consists of an optional description, the security 
+			role name used in the code, and an optional link to a security 
+			role. If the security role is not specified, the Deployer must 
+			choose an appropriate security role.
+			The value of the role name element must be the String used 
+			as the parameter to the 
+			EJBContext.isCallerInRole(String roleName) method
+			or the HttpServletRequest.isUserInRole(String role) method.
+			Used in: portlet
+			</documentation>
+		</annotation>
+		<sequence>
+			<element name="description" type="portlet:descriptionType" minOccurs="0" maxOccurs="unbounded"/>
+			<element name="role-name" type="portlet:role-nameType"/>
+			<element name="role-link" type="portlet:role-linkType" minOccurs="0"/>
+		</sequence>
+		<attribute name="id" type="portlet:string" use="optional"/>
+	</complexType>
+	<complexType name="public-render-parameterType">
+		<annotation>
+			<documentation>
+			The public-render-parameters defines a render parameter that is allowed to be public
+			and thus be shared with other portlets.
+			The identifier must be used for referencing this public render parameter in the portlet code.
+			Used in: portlet-app
+			</documentation>
+		</annotation>
+		<sequence>
+			<element name="description" type="portlet:descriptionType" minOccurs="0" maxOccurs="unbounded"/>
+			<element name="identifier" type="portlet:string"/>
+			<choice>
+				<element name="qname" type="xs:QName"/>
+				<element name="name" type="xs:NCName"/>
+			</choice>
+			<element name="alias" type="xs:QName" minOccurs="0" maxOccurs="unbounded"/>
+		</sequence>
+		<attribute name="id" type="portlet:string" use="optional"/>
+	</complexType>
+	<complexType name="short-titleType">
+		<annotation>
+			<documentation>
+			Locale specific short version of the static title.
+			Used in: portlet-info
+			</documentation>
+		</annotation>
+		<simpleContent>
+			<extension base="portlet:string"/>
+		</simpleContent>
+	</complexType>
+	<complexType name="supportsType">
+		<annotation>
+			<documentation>
+			Supports indicates the portlet modes a 
+			portlet supports for a specific content type. All portlets must 
+			support the view mode. 
+			Used in: portlet
+			</documentation>
+		</annotation>
+		<sequence>
+			<element name="mime-type" type="portlet:mime-typeType"/>
+			<element name="portlet-mode" type="portlet:portlet-modeType" minOccurs="0" maxOccurs="unbounded"/>
+			<element name="window-state" type="portlet:window-stateType" minOccurs="0" maxOccurs="unbounded"/>
+		</sequence>
+		<attribute name="id" type="portlet:string" use="optional"/>
+	</complexType>
+	<complexType name="supported-localeType">
+		<annotation>
+			<documentation>
+			Indicated the locales the portlet supports.
+			Used in: portlet
+			</documentation>
+		</annotation>
+		<simpleContent>
+			<extension base="portlet:string"/>
+		</simpleContent>
+	</complexType>
+	<complexType name="titleType">
+		<annotation>
+			<documentation>
+			Locale specific static title for this portlet.
+			Used in: portlet-info
+			</documentation>
+		</annotation>
+		<simpleContent>
+			<extension base="portlet:string"/>
+		</simpleContent>
+	</complexType>
+	<simpleType name="transport-guaranteeType">
+		<annotation>
+			<documentation>
+			The transport-guaranteeType specifies that 
+			the communication between client and portlet should 
+			be NONE, INTEGRAL, or CONFIDENTIAL. 
+			NONE means that the portlet does not
+			require any transport guarantees. A value of 
+			INTEGRAL means that the portlet requires that the 
+			data sent between the client and portlet be sent in 
+			such a way that it can't be changed in transit. 
+			CONFIDENTIAL means that the portlet requires 
+			that the data be transmitted in a fashion that
+			prevents other entities from observing the contents 
+			of the transmission. 
+			In most cases, the presence of the INTEGRAL or
+			CONFIDENTIAL flag will indicate that the use 
+			of SSL is required.
+ 			Used in: user-data-constraint
+			</documentation>
+		</annotation>
+		<restriction base="portlet:string">
+			<enumeration value="NONE"/>
+			<enumeration value="INTEGRAL"/>
+			<enumeration value="CONFIDENTIAL"/>
+		</restriction>
+	</simpleType>
+	<complexType name="user-attributeType">
+		<annotation>
+			<documentation>
+			User attribute defines a user specific attribute that the
+			portlet application needs. The portlet within this application 
+			can access this attribute via the request parameter USER_INFO
+			map.
+			Used in: portlet-app
+			</documentation>
+		</annotation>
+		<sequence>
+			<element name="description" type="portlet:descriptionType" minOccurs="0" maxOccurs="unbounded"/>
+			<element name="name" type="portlet:nameType"/>
+		</sequence>
+		<attribute name="id" type="portlet:string" use="optional"/>
+	</complexType>
+	<complexType name="user-data-constraintType">
+		<annotation>
+			<documentation>
+			The user-data-constraintType is used to indicate how
+			data communicated between the client and portlet should be
+			protected.
+			Used in: security-constraint
+			</documentation>
+		</annotation>
+		<sequence>
+			<element name="description" type="portlet:descriptionType" minOccurs="0" maxOccurs="unbounded"/>
+			<element name="transport-guarantee" type="portlet:transport-guaranteeType"/>
+		</sequence>
+		<attribute name="id" type="portlet:string" use="optional"/>
+	</complexType>
+	<complexType name="valueType">
+		<annotation>
+			<documentation>
+			The value element contains the value of a parameter.
+			Used in: init-param
+			</documentation>
+		</annotation>
+		<simpleContent>
+			<extension base="portlet:string"/>
+		</simpleContent>
+	</complexType>
+	<complexType name="window-stateType">
+		<annotation>
+			<documentation>
+			Portlet window state. Window state names are not case sensitive.
+			Used in: custom-window-state
+			</documentation>
+		</annotation>
+		<simpleContent>
+			<extension base="portlet:string"/>
+		</simpleContent>
+	</complexType>
+	<!--- everything below is copied from j2ee_1_4.xsd -->
+	<complexType name="descriptionType">
+		<annotation>
+			<documentation>
+			The description element is used to provide text describing the 
+			parent element. The description element should include any 
+			information that the portlet application war file producer wants
+			to provide to the consumer of the portlet application war file 
+			(i.e., to the Deployer). Typically, the tools used by the 
+			portlet application war file consumer will display the 
+			description when processing the parent element that contains the 
+			description. It has an optional attribute xml:lang to indicate 
+			which language is used in the description according to 
+			RFC 1766 (http://www.ietf.org/rfc/rfc1766.txt). The default
+			value of this attribute is English(“en”).
+			Used in: init-param, portlet, portlet-app, security-role
+			</documentation>
+		</annotation>
+		<simpleContent>
+			<extension base="portlet:string">
+				<attribute ref="xml:lang"/>
+			</extension>
+		</simpleContent>
+	</complexType>
+	<complexType name="display-nameType">
+		<annotation>
+			<documentation>
+			The display-name type contains a short name that is intended
+			to be displayed by tools. It is used by display-name
+			elements.  The display name need not be unique.
+			Example:
+				...
+  			<display-name xml:lang="en">Employee Self Service</display-name>
+
+			It has an optional attribute xml:lang to indicate 
+			which language is used in the description according to 
+			RFC 1766 (http://www.ietf.org/rfc/rfc1766.txt). The default
+			value of this attribute is English(“en”).
+			</documentation>
+		</annotation>
+		<simpleContent>
+			<extension base="portlet:string">
+				<attribute ref="xml:lang"/>
+			</extension>
+		</simpleContent>
+	</complexType>
+	<simpleType name="fully-qualified-classType">
+		<annotation>
+			<documentation>
+			The elements that use this type designate the name of a
+			Java class or interface.
+			</documentation>
+		</annotation>
+		<restriction base="portlet:string"/>
+	</simpleType>
+	<simpleType name="role-nameType">
+		<annotation>
+			<documentation>
+			The role-nameType designates the name of a security role.
+
+			The name must conform to the lexical rules for an NMTOKEN.
+			</documentation>
+		</annotation>
+		<restriction base="NMTOKEN"/>
+	</simpleType>
+	<simpleType name="string">
+		<annotation>
+			<documentation>
+			This is a special string datatype that is defined by JavaEE 
+			as a base type for defining collapsed strings. When 
+			schemas require trailing/leading space elimination as 
+			well as collapsing the existing whitespace, this base 
+			type may be used.
+			</documentation>
+		</annotation>
+		<restriction base="string">
+			<whiteSpace value="collapse"/>
+		</restriction>
+	</simpleType>
+	<simpleType name="filter-nameType">
+		<annotation>
+			<documentation>
+			The logical name of the filter is declare
+			by using filter-nameType. This name is used to map the
+			filter.  Each filter name is unique within the portlet
+			application.
+			Used in: filter, filter-mapping
+			</documentation>
+		</annotation>
+		<restriction base="portlet:string"/>
+	</simpleType>
+</schema>

Added: components/pc/trunk/portlet/src/main/resources/org/gatein/pc/portlet/impl/deployment/xml/xml.xsd
===================================================================
--- components/pc/trunk/portlet/src/main/resources/org/gatein/pc/portlet/impl/deployment/xml/xml.xsd	                        (rev 0)
+++ components/pc/trunk/portlet/src/main/resources/org/gatein/pc/portlet/impl/deployment/xml/xml.xsd	2011-09-23 08:35:39 UTC (rev 7495)
@@ -0,0 +1,117 @@
+<?xml version='1.0'?>
+<!DOCTYPE xs:schema PUBLIC "-//W3C//DTD XMLSCHEMA 200102//EN" "XMLSchema.dtd" >
+<xs:schema targetNamespace="http://www.w3.org/XML/1998/namespace" xmlns:xs="http://www.w3.org/2001/XMLSchema" xml:lang="en">
+
+ <xs:annotation>
+  <xs:documentation>
+   See http://www.w3.org/XML/1998/namespace.html and
+   http://www.w3.org/TR/REC-xml for information about this namespace.
+
+    This schema document describes the XML namespace, in a form
+    suitable for import by other schema documents.  
+
+    Note that local names in this namespace are intended to be defined
+    only by the World Wide Web Consortium or its subgroups.  The
+    following names are currently defined in this namespace and should
+    not be used with conflicting semantics by any Working Group,
+    specification, or document instance:
+
+    base (as an attribute name): denotes an attribute whose value
+         provides a URI to be used as the base for interpreting any
+         relative URIs in the scope of the element on which it
+         appears; its value is inherited.  This name is reserved
+         by virtue of its definition in the XML Base specification.
+
+    lang (as an attribute name): denotes an attribute whose value
+         is a language code for the natural language of the content of
+         any element; its value is inherited.  This name is reserved
+         by virtue of its definition in the XML specification.
+  
+    space (as an attribute name): denotes an attribute whose
+         value is a keyword indicating what whitespace processing
+         discipline is intended for the content of the element; its
+         value is inherited.  This name is reserved by virtue of its
+         definition in the XML specification.
+
+    Father (in any context at all): denotes Jon Bosak, the chair of 
+         the original XML Working Group.  This name is reserved by 
+         the following decision of the W3C XML Plenary and 
+         XML Coordination groups:
+
+             In appreciation for his vision, leadership and dedication
+             the W3C XML Plenary on this 10th day of February, 2000
+             reserves for Jon Bosak in perpetuity the XML name
+             xml:Father
+  </xs:documentation>
+ </xs:annotation>
+
+ <xs:annotation>
+  <xs:documentation>This schema defines attributes and an attribute group
+        suitable for use by
+        schemas wishing to allow xml:base, xml:lang or xml:space attributes
+        on elements they define.
+
+        To enable this, such a schema must import this schema
+        for the XML namespace, e.g. as follows:
+        &lt;schema . . .>
+         . . .
+         &lt;import namespace="http://www.w3.org/XML/1998/namespace"
+                    schemaLocation="http://www.w3.org/2001/03/xml.xsd"/>
+
+        Subsequently, qualified reference to any of the attributes
+        or the group defined below will have the desired effect, e.g.
+
+        &lt;type . . .>
+         . . .
+         &lt;attributeGroup ref="xml:specialAttrs"/>
+ 
+         will define a type which will schema-validate an instance
+         element with any of those attributes</xs:documentation>
+ </xs:annotation>
+
+ <xs:annotation>
+  <xs:documentation>In keeping with the XML Schema WG's standard versioning
+   policy, this schema document will persist at
+   http://www.w3.org/2001/03/xml.xsd.
+   At the date of issue it can also be found at
+   http://www.w3.org/2001/xml.xsd.
+   The schema document at that URI may however change in the future,
+   in order to remain compatible with the latest version of XML Schema
+   itself.  In other words, if the XML Schema namespace changes, the version
+   of this document at
+   http://www.w3.org/2001/xml.xsd will change
+   accordingly; the version at
+   http://www.w3.org/2001/03/xml.xsd will not change.
+  </xs:documentation>
+ </xs:annotation>
+
+ <xs:attribute name="lang" type="xs:language">
+  <xs:annotation>
+   <xs:documentation>In due course, we should install the relevant ISO 2- and 3-letter
+         codes as the enumerated possible values . . .</xs:documentation>
+  </xs:annotation>
+ </xs:attribute>
+
+ <xs:attribute name="space" default="preserve">
+  <xs:simpleType>
+   <xs:restriction base="xs:NCName">
+    <xs:enumeration value="default"/>
+    <xs:enumeration value="preserve"/>
+   </xs:restriction>
+  </xs:simpleType>
+ </xs:attribute>
+
+ <xs:attribute name="base" type="xs:anyURI">
+  <xs:annotation>
+   <xs:documentation>See http://www.w3.org/TR/xmlbase/ for
+                     information about this attribute.</xs:documentation>
+  </xs:annotation>
+ </xs:attribute>
+
+ <xs:attributeGroup name="specialAttrs">
+  <xs:attribute ref="xml:base"/>
+  <xs:attribute ref="xml:lang"/>
+  <xs:attribute ref="xml:space"/>
+ </xs:attributeGroup>
+
+</xs:schema>

Modified: components/pc/trunk/portlet/src/test/java/org/gatein/pc/portlet/deployment/AbstractMetaDataTestCase.java
===================================================================
--- components/pc/trunk/portlet/src/test/java/org/gatein/pc/portlet/deployment/AbstractMetaDataTestCase.java	2011-09-23 05:21:23 UTC (rev 7494)
+++ components/pc/trunk/portlet/src/test/java/org/gatein/pc/portlet/deployment/AbstractMetaDataTestCase.java	2011-09-23 08:35:39 UTC (rev 7495)
@@ -40,22 +40,17 @@
 public abstract class AbstractMetaDataTestCase extends TestCase
 {
 
-   /** Test parameter for using xml binding annotation. */
-   public static final String ANNOTATION_BINDING = "annotation";
-
-   /** Annotation or ObjectModelFactory parsing. */
-   private String parser = ANNOTATION_BINDING;
-
-   protected PortletApplication20MetaData _unmarshall10(String file) throws SAXException, IOException
+   protected PortletApplication20MetaData unmarshall(String file) throws SAXException, IOException
    {
-      return _unmarshall10(file, false);
+      return unmarshall(file, false);
    }
 
-   protected PortletApplication20MetaData _unmarshall10(String file, boolean fail) throws SAXException, IOException
+   protected PortletApplication20MetaData unmarshall(String file, boolean fail) throws SAXException, IOException
    {
       try
       {
          PortletApplicationMetaDataBuilder builder = new PortletApplicationMetaDataBuilder();
+         builder.setSchemaValidation(true);
          String path = getPath(file);
          URL url = new URL(path);
          InputStream in = url.openStream();

Modified: components/pc/trunk/portlet/src/test/java/org/gatein/pc/portlet/deployment/ContainerRuntimeOptionTestCase.java
===================================================================
--- components/pc/trunk/portlet/src/test/java/org/gatein/pc/portlet/deployment/ContainerRuntimeOptionTestCase.java	2011-09-23 05:21:23 UTC (rev 7494)
+++ components/pc/trunk/portlet/src/test/java/org/gatein/pc/portlet/deployment/ContainerRuntimeOptionTestCase.java	2011-09-23 08:35:39 UTC (rev 7495)
@@ -36,7 +36,7 @@
 
    public void test021() throws Exception
    {
-      PortletApplication20MetaData md = _unmarshall10("metadata/runtimeoption/portlet.xml");
+      PortletApplication20MetaData md = unmarshall("metadata/runtimeoption/portlet.xml");
       PortletMetaData portlet = md.getPortlet("portlet-name");
       assertNotNull(portlet);
       Map<String, ContainerRuntimeMetaData> m = portlet.getContainerRuntimeOptions();

Modified: components/pc/trunk/portlet/src/test/java/org/gatein/pc/portlet/deployment/CustomPortletModeTestEverythingTestCase.java
===================================================================
--- components/pc/trunk/portlet/src/test/java/org/gatein/pc/portlet/deployment/CustomPortletModeTestEverythingTestCase.java	2011-09-23 05:21:23 UTC (rev 7494)
+++ components/pc/trunk/portlet/src/test/java/org/gatein/pc/portlet/deployment/CustomPortletModeTestEverythingTestCase.java	2011-09-23 08:35:39 UTC (rev 7495)
@@ -42,7 +42,7 @@
       {
          String xmlFile = "metadata/customPortletMode/portlet1.xml";
 
-         PortletApplication10MetaData md = _unmarshall10(xmlFile);
+         PortletApplication10MetaData md = unmarshall(xmlFile);
          assertNotNull(md);
          assertTrue(md instanceof PortletApplication10MetaData);
          assertEquals("1.0", md.getVersion());
@@ -70,7 +70,7 @@
 
          String xmlFile = "metadata/customPortletMode/portlet2.xml";
 
-         PortletApplication20MetaData md = _unmarshall10(xmlFile);
+         PortletApplication20MetaData md = unmarshall(xmlFile);
          assertNotNull(md);
          assertTrue(md instanceof PortletApplication20MetaData);
          assertEquals("2.0", md.getVersion());
@@ -107,6 +107,6 @@
    public void test03() throws Exception
    {
       String xmlFile = "metadata/customPortletMode/portlet1-fail.xml";
-      _unmarshall10(xmlFile, true);
+      unmarshall(xmlFile, true);
    }
 }

Modified: components/pc/trunk/portlet/src/test/java/org/gatein/pc/portlet/deployment/CustomWindowStateTestEverythingTestCase.java
===================================================================
--- components/pc/trunk/portlet/src/test/java/org/gatein/pc/portlet/deployment/CustomWindowStateTestEverythingTestCase.java	2011-09-23 05:21:23 UTC (rev 7494)
+++ components/pc/trunk/portlet/src/test/java/org/gatein/pc/portlet/deployment/CustomWindowStateTestEverythingTestCase.java	2011-09-23 08:35:39 UTC (rev 7495)
@@ -41,7 +41,7 @@
 
          String xmlFile = "metadata/customWindowState/portlet1.xml";
 
-         PortletApplication10MetaData md = _unmarshall10(xmlFile);
+         PortletApplication10MetaData md = unmarshall(xmlFile);
          assertNotNull(md);
          assertTrue(md instanceof PortletApplication10MetaData);
          assertEquals("1.0", md.getVersion());
@@ -71,7 +71,7 @@
 
          String xmlFile = "metadata/customWindowState/portlet2.xml";
 
-         PortletApplication20MetaData md = _unmarshall10(xmlFile);
+         PortletApplication20MetaData md = unmarshall(xmlFile);
          assertNotNull(md);
          assertTrue(md instanceof PortletApplication20MetaData);
          assertEquals("2.0", md.getVersion());

Modified: components/pc/trunk/portlet/src/test/java/org/gatein/pc/portlet/deployment/EventTestEverythingTestCase.java
===================================================================
--- components/pc/trunk/portlet/src/test/java/org/gatein/pc/portlet/deployment/EventTestEverythingTestCase.java	2011-09-23 05:21:23 UTC (rev 7494)
+++ components/pc/trunk/portlet/src/test/java/org/gatein/pc/portlet/deployment/EventTestEverythingTestCase.java	2011-09-23 08:35:39 UTC (rev 7495)
@@ -46,7 +46,7 @@
 
          String xmlFile = "metadata/event/portlet-event1.xml";
 
-         _unmarshall10(xmlFile);
+         unmarshall(xmlFile);
          fail();
       }
       catch (Exception e)
@@ -62,7 +62,7 @@
 
          String xmlFile = "metadata/event/portlet-event2.xml";
 
-         PortletApplication20MetaData md = _unmarshall10(xmlFile);
+         PortletApplication20MetaData md = unmarshall(xmlFile);
          assertNotNull(md);
          assertTrue(md instanceof PortletApplication20MetaData);
          assertEquals("2.0", md.getVersion());
@@ -124,6 +124,6 @@
    {
       // "Should fail: name and qname defined!"
       String xmlFile = "metadata/event/portlet-event2-fail.xml";
-      _unmarshall10(xmlFile, true);
+      unmarshall(xmlFile, true);
    }
 }

Modified: components/pc/trunk/portlet/src/test/java/org/gatein/pc/portlet/deployment/FilterTestEverythingTestCase.java
===================================================================
--- components/pc/trunk/portlet/src/test/java/org/gatein/pc/portlet/deployment/FilterTestEverythingTestCase.java	2011-09-23 05:21:23 UTC (rev 7494)
+++ components/pc/trunk/portlet/src/test/java/org/gatein/pc/portlet/deployment/FilterTestEverythingTestCase.java	2011-09-23 08:35:39 UTC (rev 7495)
@@ -38,7 +38,7 @@
 
    public void test01() throws Exception
    {
-      _unmarshall10("metadata/filter/portlet-filter1.xml", true);
+      unmarshall("metadata/filter/portlet-filter1.xml", true);
    }
 
    public void test02()
@@ -47,7 +47,7 @@
       {
          String xmlFile = "metadata/filter/portlet-filter2.xml";
 
-         PortletApplication20MetaData md = _unmarshall10(xmlFile);
+         PortletApplication20MetaData md = unmarshall(xmlFile);
          assertNotNull(md);
          assertTrue(md instanceof PortletApplication20MetaData);
 

Modified: components/pc/trunk/portlet/src/test/java/org/gatein/pc/portlet/deployment/GeneralMetaDataTestCase.java
===================================================================
--- components/pc/trunk/portlet/src/test/java/org/gatein/pc/portlet/deployment/GeneralMetaDataTestCase.java	2011-09-23 05:21:23 UTC (rev 7494)
+++ components/pc/trunk/portlet/src/test/java/org/gatein/pc/portlet/deployment/GeneralMetaDataTestCase.java	2011-09-23 08:35:39 UTC (rev 7495)
@@ -41,7 +41,7 @@
    {
       try
       {
-         PortletApplication10MetaData md = _unmarshall10("metadata/general/portlet1.xml");
+         PortletApplication10MetaData md = unmarshall("metadata/general/portlet1.xml");
          assertNotNull(md);
          assertTrue(md instanceof PortletApplication10MetaData);
          assertEquals("1.0", md.getVersion());
@@ -56,7 +56,7 @@
    {
       try
       {
-         PortletApplication20MetaData md = _unmarshall10("metadata/general/portlet2.xml");
+         PortletApplication20MetaData md = unmarshall("metadata/general/portlet2.xml");
          assertNotNull(md);
          assertTrue(md instanceof PortletApplication20MetaData);
          assertEquals("2.0", md.getVersion());
@@ -71,7 +71,7 @@
    {
       try
       {
-         PortletApplication20MetaData md = _unmarshall10("metadata/general/portlet2-jsr286.xml");
+         PortletApplication20MetaData md = unmarshall("metadata/general/portlet2-jsr286.xml");
          assertEquals("2.0", md.getVersion());
          assertTrue(md instanceof PortletApplication20MetaData);
 
@@ -111,7 +111,7 @@
    {
       try
       {
-         PortletApplication10MetaData md = _unmarshall10("metadata/general/portlet-app_1_0.xml");
+         PortletApplication10MetaData md = unmarshall("metadata/general/portlet-app_1_0.xml");
 
          assertNotNull(md);
          assertTrue(md instanceof PortletApplication10MetaData);
@@ -129,7 +129,7 @@
    {
       try
       {
-         PortletApplication20MetaData md = _unmarshall10("metadata/general/portlet-app_2_0.xml");
+         PortletApplication20MetaData md = unmarshall("metadata/general/portlet-app_2_0.xml");
          assertEquals("2.0", md.getVersion());
          assertTrue(md instanceof PortletApplication20MetaData);
       }

Modified: components/pc/trunk/portlet/src/test/java/org/gatein/pc/portlet/deployment/ListenerTestCase.java
===================================================================
--- components/pc/trunk/portlet/src/test/java/org/gatein/pc/portlet/deployment/ListenerTestCase.java	2011-09-23 05:21:23 UTC (rev 7494)
+++ components/pc/trunk/portlet/src/test/java/org/gatein/pc/portlet/deployment/ListenerTestCase.java	2011-09-23 08:35:39 UTC (rev 7495)
@@ -35,7 +35,7 @@
    {
       try
       {
-         PortletApplication20MetaData md = _unmarshall10("metadata/listener/portlet2.xml");
+         PortletApplication20MetaData md = unmarshall("metadata/listener/portlet2.xml");
          List<ListenerMetaData> listeners = md.getListeners();
          assertNotNull(listeners);
          assertEquals(1, listeners.size());

Modified: components/pc/trunk/portlet/src/test/java/org/gatein/pc/portlet/deployment/PortletTestEverythingTestCase.java
===================================================================
--- components/pc/trunk/portlet/src/test/java/org/gatein/pc/portlet/deployment/PortletTestEverythingTestCase.java	2011-09-23 05:21:23 UTC (rev 7494)
+++ components/pc/trunk/portlet/src/test/java/org/gatein/pc/portlet/deployment/PortletTestEverythingTestCase.java	2011-09-23 08:35:39 UTC (rev 7495)
@@ -52,7 +52,7 @@
       {
          String xmlFile = "metadata/portlet/portlet1.xml";
 
-         PortletApplication10MetaData md = _unmarshall10(xmlFile);
+         PortletApplication10MetaData md = unmarshall(xmlFile);
          assertNotNull(md);
          assertTrue(md instanceof PortletApplication10MetaData);
          assertEquals("1.0", md.getVersion());
@@ -218,7 +218,7 @@
       {
          String xmlFile = "metadata/portlet/portlet2.xml";
 
-         PortletApplication20MetaData md = this._unmarshall10(xmlFile);
+         PortletApplication20MetaData md = this.unmarshall(xmlFile);
          assertNotNull(md);
          assertTrue(md instanceof PortletApplication20MetaData);
          assertEquals("2.0", md.getVersion());
@@ -376,7 +376,7 @@
       {
          String xmlFile = "metadata/portlet/portlet2-jsr286.xml";
 
-         PortletApplication20MetaData md = this._unmarshall10(xmlFile);
+         PortletApplication20MetaData md = this.unmarshall(xmlFile);
          assertNotNull(md);
          assertTrue(md instanceof PortletApplication20MetaData);
          assertEquals("2.0", md.getVersion());
@@ -493,4 +493,9 @@
       }
    }
 
+   public void testInvalid() throws Exception
+   {
+      unmarshall("metadata/portlet/portlet1-invalid.xml", true);
+      unmarshall("metadata/portlet/portlet2-invalid.xml", true);
+   }
 }

Modified: components/pc/trunk/portlet/src/test/java/org/gatein/pc/portlet/deployment/RenderParameterTestEverythingTestCase.java
===================================================================
--- components/pc/trunk/portlet/src/test/java/org/gatein/pc/portlet/deployment/RenderParameterTestEverythingTestCase.java	2011-09-23 05:21:23 UTC (rev 7494)
+++ components/pc/trunk/portlet/src/test/java/org/gatein/pc/portlet/deployment/RenderParameterTestEverythingTestCase.java	2011-09-23 08:35:39 UTC (rev 7495)
@@ -39,7 +39,7 @@
 
          String xmlFile = "metadata/renderParameter/portlet2.xml";
 
-         PortletApplication20MetaData md = _unmarshall10(xmlFile);
+         PortletApplication20MetaData md = unmarshall(xmlFile);
          assertNotNull(md);
          assertTrue(md instanceof PortletApplication20MetaData);
          assertEquals("2.0", md.getVersion());

Modified: components/pc/trunk/portlet/src/test/java/org/gatein/pc/portlet/deployment/SecurityConstraintTestEverythingTestCase.java
===================================================================
--- components/pc/trunk/portlet/src/test/java/org/gatein/pc/portlet/deployment/SecurityConstraintTestEverythingTestCase.java	2011-09-23 05:21:23 UTC (rev 7494)
+++ components/pc/trunk/portlet/src/test/java/org/gatein/pc/portlet/deployment/SecurityConstraintTestEverythingTestCase.java	2011-09-23 08:35:39 UTC (rev 7495)
@@ -44,7 +44,7 @@
 
          String xmlFile = "metadata/security/portlet1.xml";
 
-         PortletApplication10MetaData md = _unmarshall10(xmlFile);
+         PortletApplication10MetaData md = unmarshall(xmlFile);
          assertNotNull(md);
          assertTrue(md instanceof PortletApplication10MetaData);
          assertEquals("1.0", md.getVersion());
@@ -132,7 +132,7 @@
 
          String xmlFile = "metadata/security/portlet2.xml";
 
-         PortletApplication20MetaData md = this._unmarshall10( xmlFile);
+         PortletApplication20MetaData md = this.unmarshall(xmlFile);
          assertNotNull(md);
          assertTrue(md instanceof PortletApplication20MetaData);
          assertEquals("2.0", md.getVersion());

Modified: components/pc/trunk/portlet/src/test/java/org/gatein/pc/portlet/deployment/UserAttributeTestEverythingTestCase.java
===================================================================
--- components/pc/trunk/portlet/src/test/java/org/gatein/pc/portlet/deployment/UserAttributeTestEverythingTestCase.java	2011-09-23 05:21:23 UTC (rev 7494)
+++ components/pc/trunk/portlet/src/test/java/org/gatein/pc/portlet/deployment/UserAttributeTestEverythingTestCase.java	2011-09-23 08:35:39 UTC (rev 7495)
@@ -41,7 +41,7 @@
       {
          String xmlFile = "metadata/userAttribute/portlet1.xml";
 
-         PortletApplication10MetaData md = _unmarshall10(xmlFile);
+         PortletApplication10MetaData md = unmarshall(xmlFile);
          assertNotNull(md);
          assertTrue(md instanceof PortletApplication10MetaData);
 
@@ -70,7 +70,7 @@
       {
          String xmlFile = "metadata/userAttribute/portlet2.xml";
 
-         PortletApplication20MetaData md = this._unmarshall10(xmlFile);
+         PortletApplication20MetaData md = this.unmarshall(xmlFile);
          assertNotNull(md);
          assertTrue(md instanceof PortletApplication20MetaData);
 

Modified: components/pc/trunk/portlet/src/test/resources/metadata/general/portlet-app_1_0.xml
===================================================================
--- components/pc/trunk/portlet/src/test/resources/metadata/general/portlet-app_1_0.xml	2011-09-23 05:21:23 UTC (rev 7494)
+++ components/pc/trunk/portlet/src/test/resources/metadata/general/portlet-app_1_0.xml	2011-09-23 08:35:39 UTC (rev 7495)
@@ -35,7 +35,7 @@
       <preferences-validator>preferences-validator</preferences-validator>
     </portlet-preferences>
     <security-role-ref id="id">
-      <description xml:lang="">description</description>
+      <description xml:lang="en">description</description>
       <role-name>NMTOKEN</role-name>
       <role-link>role-link</role-link>
     </security-role-ref>
@@ -58,7 +58,7 @@
       <portlet-name>portlet-name</portlet-name>
     </portlet-collection>
     <user-data-constraint id="">
-      <description xml:lang="">description</description>
+      <description xml:lang="en">description</description>
       <transport-guarantee>NONE</transport-guarantee>
     </user-data-constraint>
   </security-constraint>

Added: components/pc/trunk/portlet/src/test/resources/metadata/portlet/portlet1-invalid.xml
===================================================================
--- components/pc/trunk/portlet/src/test/resources/metadata/portlet/portlet1-invalid.xml	                        (rev 0)
+++ components/pc/trunk/portlet/src/test/resources/metadata/portlet/portlet1-invalid.xml	2011-09-23 08:35:39 UTC (rev 7495)
@@ -0,0 +1,7 @@
+<portlet-app xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd"
+             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+             xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd"
+             version="1.0">
+	<portlet>
+	</portlet>
+</portlet-app>

Added: components/pc/trunk/portlet/src/test/resources/metadata/portlet/portlet2-invalid.xml
===================================================================
--- components/pc/trunk/portlet/src/test/resources/metadata/portlet/portlet2-invalid.xml	                        (rev 0)
+++ components/pc/trunk/portlet/src/test/resources/metadata/portlet/portlet2-invalid.xml	2011-09-23 08:35:39 UTC (rev 7495)
@@ -0,0 +1,7 @@
+<portlet-app xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd"
+             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+             xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd"
+             version="2.0">
+	<portlet>
+	</portlet>
+</portlet-app>
\ No newline at end of file



More information about the gatein-commits mailing list