xerces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From knoa...@apache.org
Subject svn commit: r695518 [1/2] - in /xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces: impl/msg/ impl/xs/ impl/xs/traversers/ xs/
Date Mon, 15 Sep 2008 16:00:38 GMT
Author: knoaman
Date: Mon Sep 15 09:00:36 2008
New Revision: 695518

URL: http://svn.apache.org/viewvc?rev=695518&view=rev
Log:
Add traversal support for XML Schema 1.1 open content

Added:
    xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/XSOpenContentDecl.java   (with props)
    xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/xs/XSOpenContent.java   (with props)
Modified:
    xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/msg/XMLSchemaMessages.properties
    xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/SchemaGrammar.java
    xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/SchemaSymbols.java
    xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/XSComplexTypeDecl.java
    xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/XSAttributeChecker.java
    xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/XSDComplexTypeTraverser.java
    xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/XSDHandler.java
    xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/XSDocumentInfo.java
    xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/xs/XSComplexTypeDefinition.java
    xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/xs/XSConstants.java

Modified: xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/msg/XMLSchemaMessages.properties
URL: http://svn.apache.org/viewvc/xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/msg/XMLSchemaMessages.properties?rev=695518&r1=695517&r2=695518&view=diff
==============================================================================
--- xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/msg/XMLSchemaMessages.properties (original)
+++ xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/msg/XMLSchemaMessages.properties Mon Sep 15 09:00:36 2008
@@ -115,6 +115,7 @@
         src-ct.2.2 = src-ct.2.2: Complex Type Definition Representation Error for type ''{0}''.  When a complexType with simpleContent restricts a complexType with mixed content and emptiable particle, then there must be a <simpleType> among the children of <restriction>.
         src-ct.4 = src-ct.4: Complex Type Definition Representation Error for type ''{0}''. The intersection of wildcards is not expressible.
         src-ct.5 = src-ct.5: Complex Type Definition Representation Error for type ''{0}''. The union of wildcards is not expressible.
+        src-ct.6 = src-ct.5: Complex Type Definition Representation Error for type ''{0}''. If <openContent> is present and the actual value of its mode [attribute] is not 'none', then there must be an <any> among the [children] of <openContent>.
         src-element.1 = src-element.1: The properties ''default'' and ''fixed'' cannot both be present in element declaration ''{0}''. Use only one of them.
         src-element.2.1 = src-element.2.1: : One of 'ref' or 'name' must be present in a local element declaration.
         src-element.2.2 = src-element.2.2: Since ''{0}'' contains the ''ref'' attribute, its content must match (annotation?). However, ''{1}'' was found.
@@ -168,6 +169,9 @@
         cos-ct-extends.1.1 = cos-ct-extends.1.1: Type ''{0}'' was derived by extension from type ''{1}''.  However, the ''final'' attribute of ''{1}'' forbids derivation by extension.
         cos-ct-extends.1.4.3.2.2.1.a = cos-ct-extends.1.4.3.2.2.1.a: The content type of a derived type and that of its base must both be mixed or both be element-only. Type ''{0}'' is element only, but its base type is not.
         cos-ct-extends.1.4.3.2.2.1.b = cos-ct-extends.1.4.3.2.2.1.b: The content type of a derived type and that of its base must both be mixed or both be element-only. Type ''{0}'' is mixed, but its base type is not.
+        cos-ct-extends.1.4.3.2.2.3 = cos-ct-extends.1.4.3.2.2.3: The open content of the base type is not absent and the content type of the derived type must have a ''suffix'' or ''interleave'' mode. Type ''{0}'' has an open content with a ''none'' mode.
+        cos-ct-extends.1.4.3.2.2.3.3 = cos-ct-extends.1.4.3.2.2.3.3: The open content of a derived type and that of its base must both have a ''suffix'' mode. Type ''{0}'' has an open content with a ''suffix'' mode, but its base type is not.
+        cos-ct-extends.1.4.3.2.2.3.4 = cos-ct-extends.1.4.3.2.2.3.4: The namespace constraint of the wildcard on the open content of the base type must be a subset of the namespace constraint of the wildcard on the open content of the derived type. This is not the case for type ''{0}''. 
         cos-element-consistent = cos-element-consistent: Error for type ''{0}''. Multiple elements with name ''{1}'', with different types, appear in the model group.
         cos-list-of-atomic = cos-list-of-atomic: In the definition of list type ''{0}'', type ''{1}'' is an invalid list element type because it is not atomic (''{1}'' is either a list type, or a union type which contains a list).
         cos-nonambig = cos-nonambig: {0} and {1} (or elements from their substitution group) violate \"Unique Particle Attribution\". During validation against this schema, ambiguity would be created for those two particles.

Modified: xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/SchemaGrammar.java
URL: http://svn.apache.org/viewvc/xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/SchemaGrammar.java?rev=695518&r1=695517&r2=695518&view=diff
==============================================================================
--- xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/SchemaGrammar.java (original)
+++ xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/SchemaGrammar.java Mon Sep 15 09:00:36 2008
@@ -434,19 +434,19 @@
             // fill complex types
             annotationType.setValues("#AnonType_" + SchemaSymbols.ELT_ANNOTATION, fTargetNamespace, SchemaGrammar.fAnyType,
                     XSConstants.DERIVATION_RESTRICTION, XSConstants.DERIVATION_NONE, (short) (XSConstants.DERIVATION_EXTENSION | XSConstants.DERIVATION_RESTRICTION),
-                    XSComplexTypeDecl.CONTENTTYPE_ELEMENT, false, annotationAttrs, null, annotationParticle, new XSObjectListImpl(null, 0));
+                    XSComplexTypeDecl.CONTENTTYPE_ELEMENT, false, annotationAttrs, null, annotationParticle, new XSObjectListImpl(null, 0), null);
             annotationType.setName("#AnonType_" + SchemaSymbols.ELT_ANNOTATION);
             annotationType.setIsAnonymous();
             
             documentationType.setValues("#AnonType_" + SchemaSymbols.ELT_DOCUMENTATION, fTargetNamespace, SchemaGrammar.fAnyType,
                     XSConstants.DERIVATION_RESTRICTION, XSConstants.DERIVATION_NONE, (short) (XSConstants.DERIVATION_EXTENSION | XSConstants.DERIVATION_RESTRICTION),
-                    XSComplexTypeDecl.CONTENTTYPE_MIXED, false, documentationAttrs, null, anyWCSequenceParticle, new XSObjectListImpl(null, 0));
+                    XSComplexTypeDecl.CONTENTTYPE_MIXED, false, documentationAttrs, null, anyWCSequenceParticle, new XSObjectListImpl(null, 0), null);
             documentationType.setName("#AnonType_" + SchemaSymbols.ELT_DOCUMENTATION);
             documentationType.setIsAnonymous();
             
             appinfoType.setValues("#AnonType_" + SchemaSymbols.ELT_APPINFO, fTargetNamespace, SchemaGrammar.fAnyType,
                     XSConstants.DERIVATION_RESTRICTION, XSConstants.DERIVATION_NONE, (short) (XSConstants.DERIVATION_EXTENSION | XSConstants.DERIVATION_RESTRICTION),
-                    XSComplexTypeDecl.CONTENTTYPE_MIXED, false, appinfoAttrs, null, anyWCSequenceParticle, new XSObjectListImpl(null, 0));
+                    XSComplexTypeDecl.CONTENTTYPE_MIXED, false, appinfoAttrs, null, anyWCSequenceParticle, new XSObjectListImpl(null, 0), null);
             appinfoType.setName("#AnonType_" + SchemaSymbols.ELT_APPINFO);
             appinfoType.setIsAnonymous();
             

Modified: xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/SchemaSymbols.java
URL: http://svn.apache.org/viewvc/xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/SchemaSymbols.java?rev=695518&r1=695517&r2=695518&view=diff
==============================================================================
--- xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/SchemaSymbols.java (original)
+++ xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/SchemaSymbols.java Mon Sep 15 09:00:36 2008
@@ -49,166 +49,173 @@
     public static final String URI_SCHEMAVERSION = "http://www.w3.org/2007/XMLSchema-versioning".intern();
 
     // all possible schema element names
-    public static final String ELT_ALL                  = "all".intern();
-    public static final String ELT_ASSERT               = "assert".intern();
-    public static final String ELT_ALTERNATIVE          = "alternative".intern();
-    public static final String ELT_ANNOTATION           = "annotation".intern();
-    public static final String ELT_ANY                  = "any".intern();
-    public static final String ELT_ANYATTRIBUTE         = "anyAttribute".intern();
-    public static final String ELT_APPINFO              = "appinfo".intern();
-    public static final String ELT_ATTRIBUTE            = "attribute".intern();
-    public static final String ELT_ATTRIBUTEGROUP       = "attributeGroup".intern();
-    public static final String ELT_CHOICE               = "choice".intern();
-    public static final String ELT_COMPLEXCONTENT       = "complexContent".intern();
-    public static final String ELT_COMPLEXTYPE          = "complexType".intern();
-    public static final String ELT_DOCUMENTATION        = "documentation".intern();
-    public static final String ELT_ELEMENT              = "element".intern();
-    public static final String ELT_ENUMERATION          = "enumeration".intern();
-    public static final String ELT_EXTENSION            = "extension".intern();
-    public static final String ELT_FIELD                = "field".intern();
-    public static final String ELT_FRACTIONDIGITS       = "fractionDigits".intern();
-    public static final String ELT_GROUP                = "group".intern();
-    public static final String ELT_IMPORT               = "import".intern();
-    public static final String ELT_INCLUDE              = "include".intern();
-    public static final String ELT_KEY                  = "key".intern();
-    public static final String ELT_KEYREF               = "keyref".intern();
-    public static final String ELT_LENGTH               = "length".intern();
-    public static final String ELT_LIST                 = "list".intern();
-    public static final String ELT_MAXEXCLUSIVE         = "maxExclusive".intern();
-    public static final String ELT_MAXINCLUSIVE         = "maxInclusive".intern();
-    public static final String ELT_MAXLENGTH            = "maxLength".intern();
-    public static final String ELT_MINEXCLUSIVE         = "minExclusive".intern();
-    public static final String ELT_MININCLUSIVE         = "minInclusive".intern();
-    public static final String ELT_MINLENGTH            = "minLength".intern();
-    public static final String ELT_NOTATION             = "notation".intern();
-    public static final String ELT_PATTERN              = "pattern".intern();
-    public static final String ELT_REDEFINE             = "redefine".intern();
-    public static final String ELT_RESTRICTION          = "restriction".intern();
-    public static final String ELT_SCHEMA               = "schema".intern();
-    public static final String ELT_SELECTOR             = "selector".intern();
-    public static final String ELT_SEQUENCE             = "sequence".intern();
-    public static final String ELT_SIMPLECONTENT        = "simpleContent".intern();
-    public static final String ELT_SIMPLETYPE           = "simpleType".intern();
-    public static final String ELT_TOTALDIGITS          = "totalDigits".intern();
-    public static final String ELT_UNION                = "union".intern();
-    public static final String ELT_UNIQUE               = "unique".intern();
-    public static final String ELT_WHITESPACE           = "whiteSpace".intern();
-
+    public static final String ELT_ALL                   = "all".intern();
+    public static final String ELT_ASSERT                = "assert".intern();
+    public static final String ELT_ALTERNATIVE           = "alternative".intern();
+    public static final String ELT_ANNOTATION            = "annotation".intern();
+    public static final String ELT_ANY                   = "any".intern();
+    public static final String ELT_ANYATTRIBUTE          = "anyAttribute".intern();
+    public static final String ELT_APPINFO               = "appinfo".intern();
+    public static final String ELT_ATTRIBUTE             = "attribute".intern();
+    public static final String ELT_ATTRIBUTEGROUP        = "attributeGroup".intern();
+    public static final String ELT_CHOICE                = "choice".intern();
+    public static final String ELT_COMPLEXCONTENT        = "complexContent".intern();
+    public static final String ELT_COMPLEXTYPE           = "complexType".intern();
+    public static final String ELT_DEFAULTOPENCONTENT    = "defaultOpenContent".intern();
+    public static final String ELT_DOCUMENTATION         = "documentation".intern();
+    public static final String ELT_ELEMENT               = "element".intern();
+    public static final String ELT_ENUMERATION           = "enumeration".intern();
+    public static final String ELT_EXTENSION             = "extension".intern();
+    public static final String ELT_FIELD                 = "field".intern();
+    public static final String ELT_FRACTIONDIGITS        = "fractionDigits".intern();
+    public static final String ELT_GROUP                 = "group".intern();
+    public static final String ELT_IMPORT                = "import".intern();
+    public static final String ELT_INCLUDE               = "include".intern();
+    public static final String ELT_KEY                   = "key".intern();
+    public static final String ELT_KEYREF                = "keyref".intern();
+    public static final String ELT_LENGTH                = "length".intern();
+    public static final String ELT_LIST                  = "list".intern();
+    public static final String ELT_MAXEXCLUSIVE          = "maxExclusive".intern();
+    public static final String ELT_MAXINCLUSIVE          = "maxInclusive".intern();
+    public static final String ELT_MAXLENGTH             = "maxLength".intern();
+    public static final String ELT_MINEXCLUSIVE          = "minExclusive".intern();
+    public static final String ELT_MININCLUSIVE          = "minInclusive".intern();
+    public static final String ELT_MINLENGTH             = "minLength".intern();
+    public static final String ELT_NOTATION              = "notation".intern();
+    public static final String ELT_OPENCONTENT           = "openContent".intern();
+    public static final String ELT_PATTERN               = "pattern".intern();
+    public static final String ELT_REDEFINE              = "redefine".intern();
+    public static final String ELT_RESTRICTION           = "restriction".intern();
+    public static final String ELT_SCHEMA                = "schema".intern();
+    public static final String ELT_SELECTOR              = "selector".intern();
+    public static final String ELT_SEQUENCE              = "sequence".intern();
+    public static final String ELT_SIMPLECONTENT         = "simpleContent".intern();
+    public static final String ELT_SIMPLETYPE            = "simpleType".intern();
+    public static final String ELT_TOTALDIGITS           = "totalDigits".intern();
+    public static final String ELT_UNION                 = "union".intern();
+    public static final String ELT_UNIQUE                = "unique".intern();
+    public static final String ELT_WHITESPACE            = "whiteSpace".intern();
+ 
     // all possible schema attribute names (and xml:lang defined on <schema> and <documentation>)
-    public static final String ATT_ABSTRACT             = "abstract".intern();
-    public static final String ATT_ATTRIBUTEFORMDEFAULT = "attributeFormDefault".intern();
-    public static final String ATT_BASE                 = "base".intern();
-    public static final String ATT_BLOCK                = "block".intern();
-    public static final String ATT_BLOCKDEFAULT         = "blockDefault".intern();
-    public static final String ATT_DEFAULT              = "default".intern();
-    public static final String ATT_ELEMENTFORMDEFAULT   = "elementFormDefault".intern();
-    public static final String ATT_FINAL                = "final".intern();
-    public static final String ATT_FINALDEFAULT         = "finalDefault".intern();
-    public static final String ATT_FIXED                = "fixed".intern();
-    public static final String ATT_FORM                 = "form".intern();
-    public static final String ATT_ID                   = "id".intern();
-    public static final String ATT_ITEMTYPE             = "itemType".intern();
-    public static final String ATT_MAXOCCURS            = "maxOccurs".intern();
-    public static final String ATT_MEMBERTYPES          = "memberTypes".intern();
-    public static final String ATT_MINOCCURS            = "minOccurs".intern();
-    public static final String ATT_MIXED                = "mixed".intern();
-    public static final String ATT_NAME                 = "name".intern();
-    public static final String ATT_NAMESPACE            = "namespace".intern();
-    public static final String ATT_NILLABLE             = "nillable".intern();
-    public static final String ATT_PROCESSCONTENTS      = "processContents".intern();
-    public static final String ATT_REF                  = "ref".intern();
-    public static final String ATT_REFER                = "refer".intern();
-    public static final String ATT_SCHEMALOCATION       = "schemaLocation".intern();
-    public static final String ATT_SOURCE               = "source".intern();
-    public static final String ATT_SUBSTITUTIONGROUP    = "substitutionGroup".intern();
-    public static final String ATT_SYSTEM               = "system".intern();
-    public static final String ATT_PUBLIC               = "public".intern();
-    public static final String ATT_TARGETNAMESPACE      = "targetNamespace".intern();
-    public static final String ATT_TEST                 = "test".intern();
-    public static final String ATT_TYPE                 = "type".intern();
-    public static final String ATT_USE                  = "use".intern();
-    public static final String ATT_VALUE                = "value".intern();
-    public static final String ATT_VERSION              = "version".intern();
-    public static final String ATT_XML_LANG             = "xml:lang".intern();
-    public static final String ATT_XPATH                = "xpath".intern();
-    public static final String ATT_XPATH_DEFAULT_NS     = "xpathDefaultNamespace".intern();    
-    public static final String ATT_MINVERSION           = "minVersion".intern();
-    public static final String ATT_MAXVERSION           = "maxVersion".intern();
+    public static final String ATT_ABSTRACT              = "abstract".intern();
+    public static final String ATT_APPLIESTOEMPTY        = "appliesToEmpty".intern();
+    public static final String ATT_ATTRIBUTEFORMDEFAULT  = "attributeFormDefault".intern();
+    public static final String ATT_BASE                  = "base".intern();
+    public static final String ATT_BLOCK                 = "block".intern();
+    public static final String ATT_BLOCKDEFAULT          = "blockDefault".intern();
+    public static final String ATT_DEFAULT               = "default".intern();
+    public static final String ATT_ELEMENTFORMDEFAULT    = "elementFormDefault".intern();
+    public static final String ATT_FINAL                 = "final".intern();
+    public static final String ATT_FINALDEFAULT          = "finalDefault".intern();
+    public static final String ATT_FIXED                 = "fixed".intern();
+    public static final String ATT_FORM                  = "form".intern();
+    public static final String ATT_ID                    = "id".intern();
+    public static final String ATT_ITEMTYPE              = "itemType".intern();
+    public static final String ATT_MAXOCCURS             = "maxOccurs".intern();
+    public static final String ATT_MEMBERTYPES           = "memberTypes".intern();
+    public static final String ATT_MINOCCURS             = "minOccurs".intern();
+    public static final String ATT_MIXED                 = "mixed".intern();
+    public static final String ATT_MODE                  = "mode".intern();    
+    public static final String ATT_NAME                  = "name".intern();
+    public static final String ATT_NAMESPACE             = "namespace".intern();
+    public static final String ATT_NILLABLE              = "nillable".intern();
+    public static final String ATT_PROCESSCONTENTS       = "processContents".intern();
+    public static final String ATT_REF                   = "ref".intern();
+    public static final String ATT_REFER                 = "refer".intern();
+    public static final String ATT_SCHEMALOCATION        = "schemaLocation".intern();
+    public static final String ATT_SOURCE                = "source".intern();
+    public static final String ATT_SUBSTITUTIONGROUP     = "substitutionGroup".intern();
+    public static final String ATT_SYSTEM                = "system".intern();
+    public static final String ATT_PUBLIC                = "public".intern();
+    public static final String ATT_TARGETNAMESPACE       = "targetNamespace".intern();
+    public static final String ATT_TEST                  = "test".intern();
+    public static final String ATT_TYPE                  = "type".intern();
+    public static final String ATT_USE                   = "use".intern();
+    public static final String ATT_VALUE                 = "value".intern();
+    public static final String ATT_VERSION               = "version".intern();
+    public static final String ATT_XML_LANG              = "xml:lang".intern();
+    public static final String ATT_XPATH                 = "xpath".intern();
+    public static final String ATT_XPATH_DEFAULT_NS      = "xpathDefaultNamespace".intern();    
+    public static final String ATT_MINVERSION            = "minVersion".intern();
+    public static final String ATT_MAXVERSION            = "maxVersion".intern();
 
     // all possible schema attribute values
-    public static final String ATTVAL_TWOPOUNDANY       = "##any";
-    public static final String ATTVAL_TWOPOUNDDDEFAULTNS= "##defaultNamespace";    
-    public static final String ATTVAL_TWOPOUNDLOCAL     = "##local";
-    public static final String ATTVAL_TWOPOUNDOTHER     = "##other";
-    public static final String ATTVAL_TWOPOUNDTARGETNS  = "##targetNamespace";
-    public static final String ATTVAL_POUNDALL          = "#all";
-    public static final String ATTVAL_FALSE_0           = "0";
-    public static final String ATTVAL_TRUE_1            = "1";
-    public static final String ATTVAL_ANYSIMPLETYPE     = "anySimpleType";
-    public static final String ATTVAL_ANYTYPE           = "anyType";
-    public static final String ATTVAL_ANYURI            = "anyURI";
-    public static final String ATTVAL_BASE64BINARY      = "base64Binary";
-    public static final String ATTVAL_BOOLEAN           = "boolean";
-    public static final String ATTVAL_BYTE              = "byte";
-    public static final String ATTVAL_COLLAPSE          = "collapse";
-    public static final String ATTVAL_DATE              = "date";
-    public static final String ATTVAL_DATETIME          = "dateTime";
-    public static final String ATTVAL_DAY               = "gDay";
-    public static final String ATTVAL_DECIMAL           = "decimal";
-    public static final String ATTVAL_DOUBLE            = "double";
-    public static final String ATTVAL_DURATION          = "duration";
-    public static final String ATTVAL_ENTITY            = "ENTITY";
-    public static final String ATTVAL_ENTITIES          = "ENTITIES";
-    public static final String ATTVAL_EXTENSION         = "extension";
-    public static final String ATTVAL_FALSE             = "false";
-    public static final String ATTVAL_FLOAT             = "float";
-    public static final String ATTVAL_HEXBINARY         = "hexBinary";
-    public static final String ATTVAL_ID                = "ID";
-    public static final String ATTVAL_IDREF             = "IDREF";
-    public static final String ATTVAL_IDREFS            = "IDREFS";
-    public static final String ATTVAL_INT               = "int";
-    public static final String ATTVAL_INTEGER           = "integer";
-    public static final String ATTVAL_LANGUAGE          = "language";
-    public static final String ATTVAL_LAX               = "lax";
-    public static final String ATTVAL_LIST              = "list";
-    public static final String ATTVAL_LONG              = "long";
-    public static final String ATTVAL_NAME              = "Name";
-    public static final String ATTVAL_NEGATIVEINTEGER   = "negativeInteger";
-    public static final String ATTVAL_MONTH             = "gMonth";
-    public static final String ATTVAL_MONTHDAY          = "gMonthDay";
-    public static final String ATTVAL_NCNAME            = "NCName";
-    public static final String ATTVAL_NMTOKEN           = "NMTOKEN";
-    public static final String ATTVAL_NMTOKENS          = "NMTOKENS";
-    public static final String ATTVAL_NONNEGATIVEINTEGER= "nonNegativeInteger";
-    public static final String ATTVAL_NONPOSITIVEINTEGER= "nonPositiveInteger";
-    public static final String ATTVAL_NORMALIZEDSTRING  = "normalizedString";
-    public static final String ATTVAL_NOTATION          = "NOTATION";
-    public static final String ATTVAL_OPTIONAL          = "optional";
-    public static final String ATTVAL_POSITIVEINTEGER   = "positiveInteger";
-    public static final String ATTVAL_PRESERVE          = "preserve";
-    public static final String ATTVAL_PROHIBITED        = "prohibited";
-    public static final String ATTVAL_QNAME             = "QName";
-    public static final String ATTVAL_QUALIFIED         = "qualified";
-    public static final String ATTVAL_REPLACE           = "replace";
-    public static final String ATTVAL_REQUIRED          = "required";
-    public static final String ATTVAL_RESTRICTION       = "restriction";
-    public static final String ATTVAL_SHORT             = "short";
-    public static final String ATTVAL_SKIP              = "skip";
-    public static final String ATTVAL_STRICT            = "strict";
-    public static final String ATTVAL_STRING            = "string";
-    public static final String ATTVAL_SUBSTITUTION      = "substitution";
-    public static final String ATTVAL_TIME              = "time";
-    public static final String ATTVAL_TOKEN             = "token";
-    public static final String ATTVAL_TRUE              = "true";
-    public static final String ATTVAL_UNBOUNDED         = "unbounded";
-    public static final String ATTVAL_UNION             = "union";
-    public static final String ATTVAL_UNQUALIFIED       = "unqualified";
-    public static final String ATTVAL_UNSIGNEDBYTE      = "unsignedByte";
-    public static final String ATTVAL_UNSIGNEDINT       = "unsignedInt";
-    public static final String ATTVAL_UNSIGNEDLONG      = "unsignedLong";
-    public static final String ATTVAL_UNSIGNEDSHORT     = "unsignedShort";
-    public static final String ATTVAL_YEAR              = "gYear";
-    public static final String ATTVAL_YEARMONTH         = "gYearMonth";
+    public static final String ATTVAL_TWOPOUNDANY        = "##any";
+    public static final String ATTVAL_TWOPOUNDDDEFAULTNS = "##defaultNamespace";    
+    public static final String ATTVAL_TWOPOUNDLOCAL      = "##local";
+    public static final String ATTVAL_TWOPOUNDOTHER      = "##other";
+    public static final String ATTVAL_TWOPOUNDTARGETNS   = "##targetNamespace";
+    public static final String ATTVAL_POUNDALL           = "#all";
+    public static final String ATTVAL_FALSE_0            = "0";
+    public static final String ATTVAL_TRUE_1             = "1";
+    public static final String ATTVAL_ANYSIMPLETYPE      = "anySimpleType";
+    public static final String ATTVAL_ANYTYPE            = "anyType";
+    public static final String ATTVAL_ANYURI             = "anyURI";
+    public static final String ATTVAL_BASE64BINARY       = "base64Binary";
+    public static final String ATTVAL_BOOLEAN            = "boolean";
+    public static final String ATTVAL_BYTE               = "byte";
+    public static final String ATTVAL_COLLAPSE           = "collapse";
+    public static final String ATTVAL_DATE               = "date";
+    public static final String ATTVAL_DATETIME           = "dateTime";
+    public static final String ATTVAL_DAY                = "gDay";
+    public static final String ATTVAL_DECIMAL            = "decimal";
+    public static final String ATTVAL_DOUBLE             = "double";
+    public static final String ATTVAL_DURATION           = "duration";
+    public static final String ATTVAL_ENTITY             = "ENTITY";
+    public static final String ATTVAL_ENTITIES           = "ENTITIES";
+    public static final String ATTVAL_EXTENSION          = "extension";
+    public static final String ATTVAL_FALSE              = "false";
+    public static final String ATTVAL_FLOAT              = "float";
+    public static final String ATTVAL_HEXBINARY          = "hexBinary";
+    public static final String ATTVAL_ID                 = "ID";
+    public static final String ATTVAL_IDREF              = "IDREF";
+    public static final String ATTVAL_IDREFS             = "IDREFS";
+    public static final String ATTVAL_INT                = "int";
+    public static final String ATTVAL_INTEGER            = "integer";
+    public static final String ATTVAL_INTERLEAVE         = "interleave";    
+    public static final String ATTVAL_LANGUAGE           = "language";
+    public static final String ATTVAL_LAX                = "lax";
+    public static final String ATTVAL_LIST               = "list";
+    public static final String ATTVAL_LONG               = "long";
+    public static final String ATTVAL_NAME               = "Name";
+    public static final String ATTVAL_NEGATIVEINTEGER    = "negativeInteger";
+    public static final String ATTVAL_MONTH              = "gMonth";
+    public static final String ATTVAL_MONTHDAY           = "gMonthDay";
+    public static final String ATTVAL_NCNAME             = "NCName";
+    public static final String ATTVAL_NMTOKEN            = "NMTOKEN";
+    public static final String ATTVAL_NMTOKENS           = "NMTOKENS";
+    public static final String ATTVAL_NONE               = "none";    
+    public static final String ATTVAL_NONNEGATIVEINTEGER = "nonNegativeInteger";
+    public static final String ATTVAL_NONPOSITIVEINTEGER = "nonPositiveInteger";
+    public static final String ATTVAL_NORMALIZEDSTRING   = "normalizedString";
+    public static final String ATTVAL_NOTATION           = "NOTATION";
+    public static final String ATTVAL_OPTIONAL           = "optional";
+    public static final String ATTVAL_POSITIVEINTEGER    = "positiveInteger";
+    public static final String ATTVAL_PRESERVE           = "preserve";
+    public static final String ATTVAL_PROHIBITED         = "prohibited";
+    public static final String ATTVAL_QNAME              = "QName";
+    public static final String ATTVAL_QUALIFIED          = "qualified";
+    public static final String ATTVAL_REPLACE            = "replace";
+    public static final String ATTVAL_REQUIRED           = "required";
+    public static final String ATTVAL_RESTRICTION        = "restriction";
+    public static final String ATTVAL_SHORT              = "short";
+    public static final String ATTVAL_SKIP               = "skip";
+    public static final String ATTVAL_STRICT             = "strict";
+    public static final String ATTVAL_STRING             = "string";    
+    public static final String ATTVAL_SUBSTITUTION       = "substitution";
+    public static final String ATTVAL_SUFFIX             = "suffix";
+    public static final String ATTVAL_TIME               = "time";
+    public static final String ATTVAL_TOKEN              = "token";
+    public static final String ATTVAL_TRUE               = "true";
+    public static final String ATTVAL_UNBOUNDED          = "unbounded";
+    public static final String ATTVAL_UNION              = "union";
+    public static final String ATTVAL_UNQUALIFIED        = "unqualified";
+    public static final String ATTVAL_UNSIGNEDBYTE       = "unsignedByte";
+    public static final String ATTVAL_UNSIGNEDINT        = "unsignedInt";
+    public static final String ATTVAL_UNSIGNEDLONG       = "unsignedLong";
+    public static final String ATTVAL_UNSIGNEDSHORT      = "unsignedShort";
+    public static final String ATTVAL_YEAR               = "gYear";
+    public static final String ATTVAL_YEARMONTH          = "gYearMonth";
 
     // form qualified/unqualified
     public static final short FORM_UNQUALIFIED = 0;

Modified: xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/XSComplexTypeDecl.java
URL: http://svn.apache.org/viewvc/xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/XSComplexTypeDecl.java?rev=695518&r1=695517&r2=695518&view=diff
==============================================================================
--- xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/XSComplexTypeDecl.java (original)
+++ xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/XSComplexTypeDecl.java Mon Sep 15 09:00:36 2008
@@ -84,6 +84,9 @@
     // of the complex type definition, if it is globally declared; or null otherwise.
     private XSNamespaceItem fNamespaceItem = null;
 
+    // the open content
+    XSOpenContentDecl fOpenContent = null;
+
     // DOM Level 3 TypeInfo Derivation Method constants
     static final int DERIVATION_ANY = 0;
     static final int DERIVATION_RESTRICTION = 1;
@@ -100,7 +103,7 @@
             short block, short contentType,
             boolean isAbstract, XSAttributeGroupDecl attrGrp, 
             XSSimpleType simpleType, XSParticleDecl particle,
-            XSObjectListImpl annotations) {
+            XSObjectListImpl annotations, XSOpenContentDecl openContent) {
         fTargetNamespace = targetNamespace;
         fBaseType = baseType;
         fDerivedBy = derivedBy;
@@ -113,6 +116,7 @@
         fXSSimpleType = simpleType;
         fParticle = particle;
         fAnnotations = annotations;
+        fOpenContent = openContent;
    }
 
    public void setName(String name) {
@@ -721,4 +725,8 @@
         return isDOMDerivedFrom(typeNamespaceArg, typeNameArg, derivationMethod);
     }
 
+    public XSOpenContent getOpenContent() {
+        return fOpenContent;
+    }
+
 } // class XSComplexTypeDecl

Added: xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/XSOpenContentDecl.java
URL: http://svn.apache.org/viewvc/xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/XSOpenContentDecl.java?rev=695518&view=auto
==============================================================================
--- xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/XSOpenContentDecl.java (added)
+++ xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/XSOpenContentDecl.java Mon Sep 15 09:00:36 2008
@@ -0,0 +1,123 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.xerces.impl.xs;
+
+import org.apache.xerces.xs.XSConstants;
+import org.apache.xerces.xs.XSNamespaceItem;
+import org.apache.xerces.xs.XSOpenContent;
+import org.apache.xerces.xs.XSWildcard;
+
+/**
+ * The XML representation for an openContent declaration either
+ * an &lt;openContent&gt; or a &lt;defaultOpenContent&gt;
+ *
+ * @xerces.internal 
+ *
+ * @author Khaled Noaman, IBM
+ * @version $Id$
+ */
+public class XSOpenContentDecl implements XSOpenContent {
+
+	 // the mode of the openContent
+    public short fMode = MODE_NONE;
+    // the appliesToEmpty flag
+    public boolean fAppliesToEmpty = false;
+    // the wildcard declaration
+    public XSWildcardDecl fWildcard = null;
+    
+    /**
+     * get the string description of this wildcard
+     */
+    private String fDescription = null;
+    public String toString() {
+        if (fDescription == null) {
+            StringBuffer buffer = new StringBuffer();
+            buffer.append("OC[mode=");
+            if (fMode == MODE_NONE) {
+            	buffer.append("none,");
+            }
+            else if (fMode == MODE_INTERLEAVE) {
+            	buffer.append("interleave,");
+            }
+            else {
+            	buffer.append("suffix,");
+            }
+            buffer.append(fWildcard.toString());
+            buffer.append("]");
+            fDescription = buffer.toString();
+        }
+
+        return fDescription;
+    }
+
+    /**
+     * Get the type of the object, i.e ELEMENT_DECLARATION.
+     */
+    public short getType() {
+        return XSConstants.OPEN_CONTENT;
+    }
+
+    /**
+     * The <code>name</code> of this <code>XSObject</code> depending on the
+     * <code>XSObject</code> type.
+     */
+    public String getName() {
+        return null;
+    }
+
+    /**
+     * The namespace URI of this node, or <code>null</code> if it is
+     * unspecified.  defines how a namespace URI is attached to schema
+     * components.
+     */
+    public String getNamespace() {
+        return null;
+    }
+
+	/**
+	 * @see org.apache.xerces.xs.XSObject#getNamespaceItem()
+	 */
+	public XSNamespaceItem getNamespaceItem() {
+        // REVISIT: implement
+		return null;
+	}
+
+    /**
+     * A mode type: none, interleave, suffix. 
+     */
+    public short getModeType() {
+    	return fMode;
+    }
+
+    /**
+     * A wildcard declaration
+     */
+    public XSWildcard getWildcard() {
+    	return fWildcard;
+    }
+    
+    /**
+     * A flag that indicates whether a default open content is applied
+     * when the content type of a complex type declaration is empty
+     */
+    // TODO: do we have two different implementations (i.e. XSOenContentDecl and XSDefaultOpenContentDecl)
+    //       and add that method only to XSDefaultOpenContentDecl
+    public boolean appliesToEmpty() {
+    	return fAppliesToEmpty;
+    }
+}

Propchange: xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/XSOpenContentDecl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/XSOpenContentDecl.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Modified: xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/XSAttributeChecker.java
URL: http://svn.apache.org/viewvc/xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/XSAttributeChecker.java?rev=695518&r1=695517&r2=695518&view=diff
==============================================================================
--- xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/XSAttributeChecker.java (original)
+++ xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/XSAttributeChecker.java Mon Sep 15 09:00:36 2008
@@ -29,6 +29,7 @@
 import org.apache.xerces.impl.xs.SchemaSymbols;
 import org.apache.xerces.impl.xs.XSAttributeDecl;
 import org.apache.xerces.impl.xs.XSGrammarBucket;
+import org.apache.xerces.impl.xs.XSOpenContentDecl;
 import org.apache.xerces.impl.xs.XSWildcardDecl;
 import org.apache.xerces.impl.xs.util.XInt;
 import org.apache.xerces.impl.xs.util.XIntPool;
@@ -122,25 +123,30 @@
     
     //  Schema 1.1
     public static final int ATTIDX_XPATHDEFAULTNS  = ATTIDX_COUNT++;
+    public static final int ATTIDX_APPLIESTOEMPTY  = ATTIDX_COUNT++;
+    public static final int ATTIDX_MODE            = ATTIDX_COUNT++;    
 
     private static final XIntPool fXIntPool = new XIntPool();
     // constants to return
-    private static final XInt INT_QUALIFIED      = fXIntPool.getXInt(SchemaSymbols.FORM_QUALIFIED);
-    private static final XInt INT_UNQUALIFIED    = fXIntPool.getXInt(SchemaSymbols.FORM_UNQUALIFIED);
-    private static final XInt INT_EMPTY_SET      = fXIntPool.getXInt(XSConstants.DERIVATION_NONE);
-    private static final XInt INT_ANY_STRICT     = fXIntPool.getXInt(XSWildcardDecl.PC_STRICT);
-    private static final XInt INT_ANY_LAX        = fXIntPool.getXInt(XSWildcardDecl.PC_LAX);
-    private static final XInt INT_ANY_SKIP       = fXIntPool.getXInt(XSWildcardDecl.PC_SKIP);
-    private static final XInt INT_ANY_ANY        = fXIntPool.getXInt(XSWildcardDecl.NSCONSTRAINT_ANY);
-    private static final XInt INT_ANY_LIST       = fXIntPool.getXInt(XSWildcardDecl.NSCONSTRAINT_LIST);
-    private static final XInt INT_ANY_NOT        = fXIntPool.getXInt(XSWildcardDecl.NSCONSTRAINT_NOT);
-    private static final XInt INT_USE_OPTIONAL   = fXIntPool.getXInt(SchemaSymbols.USE_OPTIONAL);
-    private static final XInt INT_USE_REQUIRED   = fXIntPool.getXInt(SchemaSymbols.USE_REQUIRED);
-    private static final XInt INT_USE_PROHIBITED = fXIntPool.getXInt(SchemaSymbols.USE_PROHIBITED);
-    private static final XInt INT_WS_PRESERVE    = fXIntPool.getXInt(XSSimpleType.WS_PRESERVE);
-    private static final XInt INT_WS_REPLACE     = fXIntPool.getXInt(XSSimpleType.WS_REPLACE);
-    private static final XInt INT_WS_COLLAPSE    = fXIntPool.getXInt(XSSimpleType.WS_COLLAPSE);
-    private static final XInt INT_UNBOUNDED      = fXIntPool.getXInt(SchemaSymbols.OCCURRENCE_UNBOUNDED);
+    private static final XInt INT_QUALIFIED       = fXIntPool.getXInt(SchemaSymbols.FORM_QUALIFIED);
+    private static final XInt INT_UNQUALIFIED     = fXIntPool.getXInt(SchemaSymbols.FORM_UNQUALIFIED);
+    private static final XInt INT_EMPTY_SET       = fXIntPool.getXInt(XSConstants.DERIVATION_NONE);
+    private static final XInt INT_ANY_STRICT      = fXIntPool.getXInt(XSWildcardDecl.PC_STRICT);
+    private static final XInt INT_ANY_LAX         = fXIntPool.getXInt(XSWildcardDecl.PC_LAX);
+    private static final XInt INT_ANY_SKIP        = fXIntPool.getXInt(XSWildcardDecl.PC_SKIP);
+    private static final XInt INT_ANY_ANY         = fXIntPool.getXInt(XSWildcardDecl.NSCONSTRAINT_ANY);
+    private static final XInt INT_ANY_LIST        = fXIntPool.getXInt(XSWildcardDecl.NSCONSTRAINT_LIST);
+    private static final XInt INT_ANY_NOT         = fXIntPool.getXInt(XSWildcardDecl.NSCONSTRAINT_NOT);
+    private static final XInt INT_USE_OPTIONAL    = fXIntPool.getXInt(SchemaSymbols.USE_OPTIONAL);
+    private static final XInt INT_USE_REQUIRED    = fXIntPool.getXInt(SchemaSymbols.USE_REQUIRED);
+    private static final XInt INT_USE_PROHIBITED  = fXIntPool.getXInt(SchemaSymbols.USE_PROHIBITED);
+    private static final XInt INT_WS_PRESERVE     = fXIntPool.getXInt(XSSimpleType.WS_PRESERVE);
+    private static final XInt INT_WS_REPLACE      = fXIntPool.getXInt(XSSimpleType.WS_REPLACE);
+    private static final XInt INT_WS_COLLAPSE     = fXIntPool.getXInt(XSSimpleType.WS_COLLAPSE);
+    private static final XInt INT_UNBOUNDED       = fXIntPool.getXInt(SchemaSymbols.OCCURRENCE_UNBOUNDED);
+    private static final XInt INT_MODE_NONE       = fXIntPool.getXInt(XSOpenContentDecl.MODE_NONE);
+    private static final XInt INT_MODE_INTERLEAVE = fXIntPool.getXInt(XSOpenContentDecl.MODE_INTERLEAVE);
+    private static final XInt INT_MODE_SUFFIX     = fXIntPool.getXInt(XSOpenContentDecl.MODE_SUFFIX);
 
     // used to store the map from element name to attribute list
     // for 14 global elements
@@ -207,6 +213,8 @@
     protected static final int DT_NONNEGINT        = -16;
     protected static final int DT_POSINT           = -17;
     protected static final int DT_XPATH_DEFAULT_NS = -18;
+    protected static final int DT_MODE             = -19;
+    protected static final int DT_MODE1            = -20;
 
     static {
         // step 2: all possible attributes for all elements
@@ -259,211 +267,228 @@
         int ATT_XML_LANG            = attCount++;
         int ATT_XPATH_R             = attCount++;
         int ATT_XPATH1_R            = attCount++;
+        // XML Schema 1.1 attributes
         int ATT_TEST_XPATH_R        = attCount++;
         int ATT_DEFAULT_XPATH_NS_N  = attCount++;
+        int ATT_APPLIESTO_EMPTY_D   = attCount++;
+        int ATT_MODE_D              = attCount++;
+        int ATT_MODE1_D             = attCount++;        
 
         // step 3: store all these attributes in an array
         OneAttr[] allAttrs = new OneAttr[attCount];
-        allAttrs[ATT_ABSTRACT_D]        =   new OneAttr(SchemaSymbols.ATT_ABSTRACT,
+        allAttrs[ATT_ABSTRACT_D]         =   new OneAttr(SchemaSymbols.ATT_ABSTRACT,
                                                         DT_BOOLEAN,
                                                         ATTIDX_ABSTRACT,
                                                         Boolean.FALSE);
-        allAttrs[ATT_ATTRIBUTE_FD_D]    =   new OneAttr(SchemaSymbols.ATT_ATTRIBUTEFORMDEFAULT,
+        allAttrs[ATT_APPLIESTO_EMPTY_D]  =   new OneAttr(SchemaSymbols.ATT_APPLIESTOEMPTY,
+                                                        DT_BOOLEAN,
+                                                        ATTIDX_APPLIESTOEMPTY,
+                                                        Boolean.FALSE);
+        allAttrs[ATT_ATTRIBUTE_FD_D]     =   new OneAttr(SchemaSymbols.ATT_ATTRIBUTEFORMDEFAULT,
                                                         DT_FORM,
                                                         ATTIDX_AFORMDEFAULT,
                                                         INT_UNQUALIFIED);
-        allAttrs[ATT_BASE_R]            =   new OneAttr(SchemaSymbols.ATT_BASE,
+        allAttrs[ATT_BASE_R]             =   new OneAttr(SchemaSymbols.ATT_BASE,
                                                         DT_QNAME,
                                                         ATTIDX_BASE,
                                                         null);
-        allAttrs[ATT_BASE_N]            =   new OneAttr(SchemaSymbols.ATT_BASE,
+        allAttrs[ATT_BASE_N]             =   new OneAttr(SchemaSymbols.ATT_BASE,
                                                         DT_QNAME,
                                                         ATTIDX_BASE,
                                                         null);
-        allAttrs[ATT_BLOCK_N]           =   new OneAttr(SchemaSymbols.ATT_BLOCK,
+        allAttrs[ATT_BLOCK_N]            =   new OneAttr(SchemaSymbols.ATT_BLOCK,
                                                         DT_BLOCK,
                                                         ATTIDX_BLOCK,
                                                         null);
-        allAttrs[ATT_BLOCK1_N]          =   new OneAttr(SchemaSymbols.ATT_BLOCK,
+        allAttrs[ATT_BLOCK1_N]           =   new OneAttr(SchemaSymbols.ATT_BLOCK,
                                                         DT_BLOCK1,
                                                         ATTIDX_BLOCK,
                                                         null);
-        allAttrs[ATT_BLOCK_D_D]         =   new OneAttr(SchemaSymbols.ATT_BLOCKDEFAULT,
+        allAttrs[ATT_BLOCK_D_D]          =   new OneAttr(SchemaSymbols.ATT_BLOCKDEFAULT,
                                                         DT_BLOCK,
                                                         ATTIDX_BLOCKDEFAULT,
                                                         INT_EMPTY_SET);
-        allAttrs[ATT_DEFAULT_N]         =   new OneAttr(SchemaSymbols.ATT_DEFAULT,
+        allAttrs[ATT_DEFAULT_N]          =   new OneAttr(SchemaSymbols.ATT_DEFAULT,
                                                         DT_STRING,
                                                         ATTIDX_DEFAULT,
                                                         null);
-        allAttrs[ATT_ELEMENT_FD_D]      =   new OneAttr(SchemaSymbols.ATT_ELEMENTFORMDEFAULT,
+        allAttrs[ATT_DEFAULT_XPATH_NS_N] =   new OneAttr(SchemaSymbols.ATT_XPATH_DEFAULT_NS,
+                                                        DT_XPATH_DEFAULT_NS,
+                                                        ATTIDX_XPATHDEFAULTNS,
+                                                        null);
+        allAttrs[ATT_ELEMENT_FD_D]       =   new OneAttr(SchemaSymbols.ATT_ELEMENTFORMDEFAULT,
                                                         DT_FORM,
                                                         ATTIDX_EFORMDEFAULT,
                                                         INT_UNQUALIFIED);
-        allAttrs[ATT_FINAL_N]           =   new OneAttr(SchemaSymbols.ATT_FINAL,
+        allAttrs[ATT_FINAL_N]            =   new OneAttr(SchemaSymbols.ATT_FINAL,
                                                         DT_FINAL,
                                                         ATTIDX_FINAL,
                                                         null);
-        allAttrs[ATT_FINAL1_N]          =   new OneAttr(SchemaSymbols.ATT_FINAL,
+        allAttrs[ATT_FINAL1_N]           =   new OneAttr(SchemaSymbols.ATT_FINAL,
                                                         DT_FINAL1,
                                                         ATTIDX_FINAL,
                                                         null);
-        allAttrs[ATT_FINAL_D_D]         =   new OneAttr(SchemaSymbols.ATT_FINALDEFAULT,
+        allAttrs[ATT_FINAL_D_D]          =   new OneAttr(SchemaSymbols.ATT_FINALDEFAULT,
                                                         DT_FINAL2,
                                                         ATTIDX_FINALDEFAULT,
                                                         INT_EMPTY_SET);
-        allAttrs[ATT_FIXED_N]           =   new OneAttr(SchemaSymbols.ATT_FIXED,
+        allAttrs[ATT_FIXED_N]            =   new OneAttr(SchemaSymbols.ATT_FIXED,
                                                         DT_STRING,
                                                         ATTIDX_FIXED,
                                                         null);
-        allAttrs[ATT_FIXED_D]           =   new OneAttr(SchemaSymbols.ATT_FIXED,
+        allAttrs[ATT_FIXED_D]            =   new OneAttr(SchemaSymbols.ATT_FIXED,
                                                         DT_BOOLEAN,
                                                         ATTIDX_FIXED,
                                                         Boolean.FALSE);
-        allAttrs[ATT_FORM_N]            =   new OneAttr(SchemaSymbols.ATT_FORM,
+        allAttrs[ATT_FORM_N]             =   new OneAttr(SchemaSymbols.ATT_FORM,
                                                         DT_FORM,
                                                         ATTIDX_FORM,
                                                         null);
-        allAttrs[ATT_ID_N]              =   new OneAttr(SchemaSymbols.ATT_ID,
+        allAttrs[ATT_ID_N]               =   new OneAttr(SchemaSymbols.ATT_ID,
                                                         DT_ID,
                                                         ATTIDX_ID,
                                                         null);
-        allAttrs[ATT_ITEMTYPE_N]        =   new OneAttr(SchemaSymbols.ATT_ITEMTYPE,
+        allAttrs[ATT_ITEMTYPE_N]         =   new OneAttr(SchemaSymbols.ATT_ITEMTYPE,
                                                         DT_QNAME,
                                                         ATTIDX_ITEMTYPE,
                                                         null);
-        allAttrs[ATT_MAXOCCURS_D]       =   new OneAttr(SchemaSymbols.ATT_MAXOCCURS,
+        allAttrs[ATT_MAXOCCURS_D]        =   new OneAttr(SchemaSymbols.ATT_MAXOCCURS,
                                                         DT_MAXOCCURS,
                                                         ATTIDX_MAXOCCURS,
                                                         fXIntPool.getXInt(1));
-        allAttrs[ATT_MAXOCCURS1_D]      =   new OneAttr(SchemaSymbols.ATT_MAXOCCURS,
+        allAttrs[ATT_MAXOCCURS1_D]       =   new OneAttr(SchemaSymbols.ATT_MAXOCCURS,
                                                         DT_MAXOCCURS1,
                                                         ATTIDX_MAXOCCURS,
                                                         fXIntPool.getXInt(1));
-        allAttrs[ATT_MEMBER_T_N]        =   new OneAttr(SchemaSymbols.ATT_MEMBERTYPES,
+        allAttrs[ATT_MEMBER_T_N]         =   new OneAttr(SchemaSymbols.ATT_MEMBERTYPES,
                                                         DT_MEMBERTYPES,
                                                         ATTIDX_MEMBERTYPES,
                                                         null);
-        allAttrs[ATT_MINOCCURS_D]       =   new OneAttr(SchemaSymbols.ATT_MINOCCURS,
+        allAttrs[ATT_MINOCCURS_D]        =   new OneAttr(SchemaSymbols.ATT_MINOCCURS,
                                                         DT_NONNEGINT,
                                                         ATTIDX_MINOCCURS,
                                                         fXIntPool.getXInt(1));
-        allAttrs[ATT_MINOCCURS1_D]      =   new OneAttr(SchemaSymbols.ATT_MINOCCURS,
+        allAttrs[ATT_MINOCCURS1_D]       =   new OneAttr(SchemaSymbols.ATT_MINOCCURS,
                                                         DT_MINOCCURS1,
                                                         ATTIDX_MINOCCURS,
                                                         fXIntPool.getXInt(1));
-        allAttrs[ATT_MIXED_D]           =   new OneAttr(SchemaSymbols.ATT_MIXED,
+        allAttrs[ATT_MIXED_D]            =   new OneAttr(SchemaSymbols.ATT_MIXED,
                                                         DT_BOOLEAN,
                                                         ATTIDX_MIXED,
                                                         Boolean.FALSE);
-        allAttrs[ATT_MIXED_N]           =   new OneAttr(SchemaSymbols.ATT_MIXED,
+        allAttrs[ATT_MIXED_N]            =   new OneAttr(SchemaSymbols.ATT_MIXED,
                                                         DT_BOOLEAN,
                                                         ATTIDX_MIXED,
                                                         null);
-        allAttrs[ATT_NAME_R]            =   new OneAttr(SchemaSymbols.ATT_NAME,
+        allAttrs[ATT_MODE_D]             =   new OneAttr(SchemaSymbols.ATT_MODE,
+                                                        DT_MODE,
+                                                        ATTIDX_MODE,
+                                                        INT_MODE_INTERLEAVE);
+        allAttrs[ATT_MODE1_D]            =   new OneAttr(SchemaSymbols.ATT_MODE,
+                                                        DT_MODE1,
+                                                        ATTIDX_MODE,
+                                                        INT_MODE_INTERLEAVE);
+        allAttrs[ATT_NAME_R]             =   new OneAttr(SchemaSymbols.ATT_NAME,
                                                         DT_NCNAME,
                                                         ATTIDX_NAME,
                                                         null);
-        allAttrs[ATT_NAMESPACE_D]       =   new OneAttr(SchemaSymbols.ATT_NAMESPACE,
+        allAttrs[ATT_NAMESPACE_D]        =   new OneAttr(SchemaSymbols.ATT_NAMESPACE,
                                                         DT_NAMESPACE,
                                                         ATTIDX_NAMESPACE,
                                                         INT_ANY_ANY);
-        allAttrs[ATT_NAMESPACE_N]       =   new OneAttr(SchemaSymbols.ATT_NAMESPACE,
+        allAttrs[ATT_NAMESPACE_N]        =   new OneAttr(SchemaSymbols.ATT_NAMESPACE,
                                                         DT_ANYURI,
                                                         ATTIDX_NAMESPACE,
                                                         null);
-        allAttrs[ATT_NILLABLE_D]        =   new OneAttr(SchemaSymbols.ATT_NILLABLE,
+        allAttrs[ATT_NILLABLE_D]         =   new OneAttr(SchemaSymbols.ATT_NILLABLE,
                                                         DT_BOOLEAN,
                                                         ATTIDX_NILLABLE,
                                                         Boolean.FALSE);
-        allAttrs[ATT_PROCESS_C_D]       =   new OneAttr(SchemaSymbols.ATT_PROCESSCONTENTS,
+        allAttrs[ATT_PROCESS_C_D]        =   new OneAttr(SchemaSymbols.ATT_PROCESSCONTENTS,
                                                         DT_PROCESSCONTENTS,
                                                         ATTIDX_PROCESSCONTENTS,
                                                         INT_ANY_STRICT);
-        allAttrs[ATT_PUBLIC_R]          =   new OneAttr(SchemaSymbols.ATT_PUBLIC,
+        allAttrs[ATT_PUBLIC_R]           =   new OneAttr(SchemaSymbols.ATT_PUBLIC,
                                                         DT_TOKEN,
                                                         ATTIDX_PUBLIC,
                                                         null);
-        allAttrs[ATT_REF_R]             =   new OneAttr(SchemaSymbols.ATT_REF,
+        allAttrs[ATT_REF_R]              =   new OneAttr(SchemaSymbols.ATT_REF,
                                                         DT_QNAME,
                                                         ATTIDX_REF,
                                                         null);
-        allAttrs[ATT_REFER_R]           =   new OneAttr(SchemaSymbols.ATT_REFER,
+        allAttrs[ATT_REFER_R]            =   new OneAttr(SchemaSymbols.ATT_REFER,
                                                         DT_QNAME,
                                                         ATTIDX_REFER,
                                                         null);
-        allAttrs[ATT_SCHEMA_L_R]        =   new OneAttr(SchemaSymbols.ATT_SCHEMALOCATION,
+        allAttrs[ATT_SCHEMA_L_R]         =   new OneAttr(SchemaSymbols.ATT_SCHEMALOCATION,
                                                         DT_ANYURI,
                                                         ATTIDX_SCHEMALOCATION,
                                                         null);
-        allAttrs[ATT_SCHEMA_L_N]        =   new OneAttr(SchemaSymbols.ATT_SCHEMALOCATION,
+        allAttrs[ATT_SCHEMA_L_N]         =   new OneAttr(SchemaSymbols.ATT_SCHEMALOCATION,
                                                         DT_ANYURI,
                                                         ATTIDX_SCHEMALOCATION,
                                                         null);
-        allAttrs[ATT_SOURCE_N]          =   new OneAttr(SchemaSymbols.ATT_SOURCE,
+        allAttrs[ATT_SOURCE_N]           =   new OneAttr(SchemaSymbols.ATT_SOURCE,
                                                         DT_ANYURI,
                                                         ATTIDX_SOURCE,
                                                         null);
-        allAttrs[ATT_SUBSTITUTION_G_N]  =   new OneAttr(SchemaSymbols.ATT_SUBSTITUTIONGROUP,
+        allAttrs[ATT_SUBSTITUTION_G_N]   =   new OneAttr(SchemaSymbols.ATT_SUBSTITUTIONGROUP,
                                                         DT_QNAME,
                                                         ATTIDX_SUBSGROUP,
                                                         null);
-        allAttrs[ATT_SYSTEM_N]          =   new OneAttr(SchemaSymbols.ATT_SYSTEM,
+        allAttrs[ATT_SYSTEM_N]           =   new OneAttr(SchemaSymbols.ATT_SYSTEM,
                                                         DT_ANYURI,
                                                         ATTIDX_SYSTEM,
                                                         null);
-        allAttrs[ATT_TARGET_N_N]        =   new OneAttr(SchemaSymbols.ATT_TARGETNAMESPACE,
+        allAttrs[ATT_TARGET_N_N]         =   new OneAttr(SchemaSymbols.ATT_TARGETNAMESPACE,
                                                         DT_ANYURI,
                                                         ATTIDX_TARGETNAMESPACE,
                                                         null);
-        allAttrs[ATT_TYPE_N]            =   new OneAttr(SchemaSymbols.ATT_TYPE,
+        allAttrs[ATT_TYPE_N]             =   new OneAttr(SchemaSymbols.ATT_TYPE,
                                                         DT_QNAME,
                                                         ATTIDX_TYPE,
                                                         null);
-        allAttrs[ATT_USE_D]             =   new OneAttr(SchemaSymbols.ATT_USE,
+        allAttrs[ATT_USE_D]              =   new OneAttr(SchemaSymbols.ATT_USE,
                                                         DT_USE,
                                                         ATTIDX_USE,
                                                         INT_USE_OPTIONAL);
-        allAttrs[ATT_VALUE_NNI_N]       =   new OneAttr(SchemaSymbols.ATT_VALUE,
+        allAttrs[ATT_VALUE_NNI_N]        =   new OneAttr(SchemaSymbols.ATT_VALUE,
                                                         DT_NONNEGINT,
                                                         ATTIDX_VALUE,
                                                         null);
-        allAttrs[ATT_VALUE_PI_N]        =   new OneAttr(SchemaSymbols.ATT_VALUE,
+        allAttrs[ATT_VALUE_PI_N]         =   new OneAttr(SchemaSymbols.ATT_VALUE,
                                                         DT_POSINT,
                                                         ATTIDX_VALUE,
                                                         null);
-        allAttrs[ATT_VALUE_STR_N]       =   new OneAttr(SchemaSymbols.ATT_VALUE,
+        allAttrs[ATT_VALUE_STR_N]        =   new OneAttr(SchemaSymbols.ATT_VALUE,
                                                         DT_STRING,
                                                         ATTIDX_VALUE,
                                                         null);
-        allAttrs[ATT_VALUE_WS_N]        =   new OneAttr(SchemaSymbols.ATT_VALUE,
+        allAttrs[ATT_VALUE_WS_N]         =   new OneAttr(SchemaSymbols.ATT_VALUE,
                                                         DT_WHITESPACE,
                                                         ATTIDX_VALUE,
                                                         null);
-        allAttrs[ATT_VERSION_N]         =   new OneAttr(SchemaSymbols.ATT_VERSION,
+        allAttrs[ATT_VERSION_N]          =   new OneAttr(SchemaSymbols.ATT_VERSION,
                                                         DT_TOKEN,
                                                         ATTIDX_VERSION,
                                                         null);
-        allAttrs[ATT_XML_LANG]          =   new OneAttr(SchemaSymbols.ATT_XML_LANG,
+        allAttrs[ATT_XML_LANG]           =   new OneAttr(SchemaSymbols.ATT_XML_LANG,
                                                         DT_LANGUAGE,
                                                         ATTIDX_XML_LANG,
                                                         null);
-        allAttrs[ATT_XPATH_R]           =   new OneAttr(SchemaSymbols.ATT_XPATH,
+        allAttrs[ATT_XPATH_R]            =   new OneAttr(SchemaSymbols.ATT_XPATH,
                                                         DT_XPATH,
                                                         ATTIDX_XPATH,
                                                         null);
-        allAttrs[ATT_XPATH1_R]          =   new OneAttr(SchemaSymbols.ATT_XPATH,
+        allAttrs[ATT_XPATH1_R]           =   new OneAttr(SchemaSymbols.ATT_XPATH,
                                                         DT_XPATH1,
                                                         ATTIDX_XPATH,
                                                         null);
-        allAttrs[ATT_TEST_XPATH_R]      =   new OneAttr(SchemaSymbols.ATT_TEST,
+        allAttrs[ATT_TEST_XPATH_R]       =   new OneAttr(SchemaSymbols.ATT_TEST,
                                                         DT_XPATH1,
                                                         ATTIDX_XPATH,
                                                         null);
-        allAttrs[ATT_DEFAULT_XPATH_NS_N]=   new OneAttr(SchemaSymbols.ATT_XPATH_DEFAULT_NS,
-                                                        DT_XPATH_DEFAULT_NS,
-                                                        ATTIDX_XPATHDEFAULTNS,
-                                                        null);
+        
 
         // step 4: for each element, make a list of possible attributes
         Container attrList;
@@ -952,6 +977,24 @@
         // xpathDefaultNamespace = (anyURI | (##defaultNamespace | ##targetNamespace | ##local))
         attrList.put(SchemaSymbols.ATT_XPATH_DEFAULT_NS, allAttrs[ATT_DEFAULT_XPATH_NS_N]);
         fEleAttrsMapL.put(SchemaSymbols.ELT_ASSERT, attrList);
+
+        // for element "defaultOpenContent" - global
+        attrList = Container.getContainer(3);
+        // appliesToEmpty = boolean : false
+        attrList.put(SchemaSymbols.ATT_APPLIESTOEMPTY, allAttrs[ATT_APPLIESTO_EMPTY_D]);
+        // id = ID
+        attrList.put(SchemaSymbols.ATT_ID, allAttrs[ATT_ID_N]);
+        // mode = (interleave | suffix) : interleave
+        attrList.put(SchemaSymbols.ATT_MODE, allAttrs[ATT_MODE_D]);
+        /*fEleAttrs11MapG*/fEleAttrsMapG.put(SchemaSymbols.ELT_DEFAULTOPENCONTENT, attrList);
+
+        // for element "openContent" - local
+        attrList = Container.getContainer(2);
+        // id = ID
+        attrList.put(SchemaSymbols.ATT_ID, allAttrs[ATT_ID_N]);
+        // mode = (none | interleave | suffix) : interleave
+        attrList.put(SchemaSymbols.ATT_MODE, allAttrs[ATT_MODE1_D]);
+        /*fEleAttrs11MapL*/fEleAttrsMapL.put(SchemaSymbols.ELT_OPENCONTENT, attrList);
     }
 
     // used to resolver namespace prefixes
@@ -1544,6 +1587,23 @@
                 throw new InvalidDatatypeValueException("cvc-enumeration-valid",
                                                         new Object[]{value, "(optional | prohibited | required)"});
             break;
+        case DT_MODE1:
+            // value = none | interleave | suffix
+            if (value.equals (SchemaSymbols.ATTVAL_NONE)) {
+                retValue = INT_MODE_NONE;
+                break;
+            }
+        case DT_MODE:
+            // value = interleave | suffix
+            if (value.equals (SchemaSymbols.ATTVAL_INTERLEAVE))
+                retValue = INT_MODE_INTERLEAVE;
+            else if (value.equals (SchemaSymbols.ATTVAL_SUFFIX))
+                retValue = INT_MODE_SUFFIX;
+            else
+                throw new InvalidDatatypeValueException("cvc-enumeration-valid",
+                                                        (dvIndex == DT_MODE1) ? new Object[]{value, "(none | interleave | suffix)"}
+                                                                              : new Object[]{value, "(interleave | sufix)"});
+            break;
         case DT_WHITESPACE:
             // value = preserve | replace | collapse
             if (value.equals (SchemaSymbols.ATTVAL_PRESERVE))



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@xerces.apache.org
For additional commands, e-mail: commits-help@xerces.apache.org


Mime
View raw message