You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by mu...@apache.org on 2022/03/09 11:44:39 UTC

svn commit: r1898778 - in /xerces/java: branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/XSAttributeChecker.java trunk/src/org/apache/xerces/impl/xs/traversers/XSAttributeChecker.java

Author: mukulg
Date: Wed Mar  9 11:44:39 2022
New Revision: 1898778

URL: http://svn.apache.org/viewvc?rev=1898778&view=rev
Log:
xercesj commit : with XSD validator (both 1.0 and 1.1), simpleType's 'final' attribute can have value 'extension'. this fix implements that.

Modified:
    xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/XSAttributeChecker.java
    xerces/java/trunk/src/org/apache/xerces/impl/xs/traversers/XSAttributeChecker.java

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=1898778&r1=1898777&r2=1898778&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 Wed Mar  9 11:44:39 2022
@@ -978,7 +978,7 @@ public class XSAttributeChecker {
 
         // for element "simpleType" - global
         attrList = Container.getContainer(3);
-        // final = (#all | List of (list | union | restriction))
+        // final = (#all | List of (list | union | restriction | extension))
         attrList.put(SchemaSymbols.ATT_FINAL, allAttrs[ATT_FINAL1_N]);
         // id = ID
         attrList.put(SchemaSymbols.ATT_ID, allAttrs[ATT_ID_N]);
@@ -1819,7 +1819,7 @@ public class XSAttributeChecker {
             retValue = fXIntPool.getXInt(choice);
             break;
         case DT_FINAL1:
-            // final = (#all | List of (list | union | restriction))
+            // final = (#all | List of (list | union | restriction | extension))
             choice = 0;
             if (value.equals (SchemaSymbols.ATTVAL_POUNDALL)) {
                 //choice = SchemaSymbols.RESTRICTION|SchemaSymbols.LIST|
@@ -1846,8 +1846,11 @@ public class XSAttributeChecker {
                     else if (token.equals (SchemaSymbols.ATTVAL_RESTRICTION)) {
                         choice |= XSConstants.DERIVATION_RESTRICTION;
                     }
+                    else if (token.equals (SchemaSymbols.ATTVAL_EXTENSION)) {
+                        choice |= XSConstants.DERIVATION_EXTENSION;
+                    }
                     else {
-                        throw new InvalidDatatypeValueException("cvc-datatype-valid.1.2.3", new Object[]{value, "(#all | List of (list | union | restriction))"});
+                        throw new InvalidDatatypeValueException("cvc-datatype-valid.1.2.3", new Object[]{value, "(#all | List of (list | union | restriction | extension))"});
                     }
                 }
             }

Modified: xerces/java/trunk/src/org/apache/xerces/impl/xs/traversers/XSAttributeChecker.java
URL: http://svn.apache.org/viewvc/xerces/java/trunk/src/org/apache/xerces/impl/xs/traversers/XSAttributeChecker.java?rev=1898778&r1=1898777&r2=1898778&view=diff
==============================================================================
--- xerces/java/trunk/src/org/apache/xerces/impl/xs/traversers/XSAttributeChecker.java (original)
+++ xerces/java/trunk/src/org/apache/xerces/impl/xs/traversers/XSAttributeChecker.java Wed Mar  9 11:44:39 2022
@@ -772,7 +772,7 @@ public class XSAttributeChecker {
 
         // for element "simpleType" - global
         attrList = Container.getContainer(3);
-        // final = (#all | List of (list | union | restriction))
+        // final = (#all | List of (list | union | restriction | extension))
         attrList.put(SchemaSymbols.ATT_FINAL, allAttrs[ATT_FINAL1_N]);
         // id = ID
         attrList.put(SchemaSymbols.ATT_ID, allAttrs[ATT_ID_N]);
@@ -1299,7 +1299,7 @@ public class XSAttributeChecker {
             retValue = fXIntPool.getXInt(choice);
             break;
         case DT_FINAL1:
-            // final = (#all | List of (list | union | restriction))
+            // final = (#all | List of (list | union | restriction | extension))
             choice = 0;
             if (value.equals (SchemaSymbols.ATTVAL_POUNDALL)) {
                 //choice = SchemaSymbols.RESTRICTION|SchemaSymbols.LIST|
@@ -1326,8 +1326,11 @@ public class XSAttributeChecker {
                     else if (token.equals (SchemaSymbols.ATTVAL_RESTRICTION)) {
                         choice |= XSConstants.DERIVATION_RESTRICTION;
                     }
+                    else if (token.equals (SchemaSymbols.ATTVAL_EXTENSION)) {
+                        choice |= XSConstants.DERIVATION_EXTENSION;
+                    }
                     else {
-                        throw new InvalidDatatypeValueException("cvc-datatype-valid.1.2.3", new Object[]{value, "(#all | List of (list | union | restriction))"});
+                        throw new InvalidDatatypeValueException("cvc-datatype-valid.1.2.3", new Object[]{value, "(#all | List of (list | union | restriction | extension))"});
                     }
                 }
             }



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