You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by mr...@apache.org on 2006/11/06 23:00:18 UTC
svn commit: r471890 -
/xerces/java/trunk/src/org/apache/xerces/impl/xs/traversers/XSAttributeChecker.java
Author: mrglavas
Date: Mon Nov 6 14:00:18 2006
New Revision: 471890
URL: http://svn.apache.org/viewvc?view=rev&rev=471890
Log:
Fixing JIRA Issue #1209:
http://issues.apache.org/jira/browse/XERCESJ-1209
"union" and "list" are not allowed as the value of the block or blockDefault attributes.
Only the following values are permitted:
block = (#all | List of (extension | restriction | substitution)) [on an element declaration]
blockDefault = (#all | List of (extension | restriction | substitution))
Modified:
xerces/java/trunk/src/org/apache/xerces/impl/xs/traversers/XSAttributeChecker.java
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?view=diff&rev=471890&r1=471889&r2=471890
==============================================================================
--- 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 Mon Nov 6 14:00:18 2006
@@ -504,7 +504,7 @@
attrList = Container.getContainer(10);
// abstract = boolean : false
attrList.put(SchemaSymbols.ATT_ABSTRACT, allAttrs[ATT_ABSTRACT_D]);
- // block = (#all | List of (substitution | extension | restriction | list | union))
+ // block = (#all | List of (extension | restriction | substitution))
attrList.put(SchemaSymbols.ATT_BLOCK, allAttrs[ATT_BLOCK_N]);
// default = string
attrList.put(SchemaSymbols.ATT_DEFAULT, allAttrs[ATT_DEFAULT_N]);
@@ -526,7 +526,7 @@
// for element "element" - local name
attrList = Container.getContainer(10);
- // block = (#all | List of (substitution | extension | restriction | list | union))
+ // block = (#all | List of (extension | restriction | substitution))
attrList.put(SchemaSymbols.ATT_BLOCK, allAttrs[ATT_BLOCK_N]);
// default = string
attrList.put(SchemaSymbols.ATT_DEFAULT, allAttrs[ATT_DEFAULT_N]);
@@ -810,7 +810,7 @@
attrList = Container.getContainer(8);
// attributeFormDefault = (qualified | unqualified) : unqualified
attrList.put(SchemaSymbols.ATT_ATTRIBUTEFORMDEFAULT, allAttrs[ATT_ATTRIBUTE_FD_D]);
- // blockDefault = (#all | List of (substitution | extension | restriction | list | union)) : ''
+ // blockDefault = (#all | List of (extension | restriction | substitution)) : ''
attrList.put(SchemaSymbols.ATT_BLOCKDEFAULT, allAttrs[ATT_BLOCK_D_D]);
// elementFormDefault = (qualified | unqualified) : unqualified
attrList.put(SchemaSymbols.ATT_ELEMENTFORMDEFAULT, allAttrs[ATT_ELEMENT_FD_D]);
@@ -1230,7 +1230,7 @@
throw new InvalidDatatypeValueException("cvc-datatype-valid.1.2.1", new Object[]{value, "positiveInteger"});
break;
case DT_BLOCK:
- // block = (#all | List of (substitution | extension | restriction | list | union))
+ // block = (#all | List of (extension | restriction | substitution))
choice = 0;
if (value.equals (SchemaSymbols.ATTVAL_POUNDALL)) {
choice = XSConstants.DERIVATION_SUBSTITUTION|XSConstants.DERIVATION_EXTENSION|
@@ -1242,23 +1242,17 @@
while (t.hasMoreTokens()) {
String token = t.nextToken ();
- if (token.equals (SchemaSymbols.ATTVAL_SUBSTITUTION)) {
- choice |= XSConstants.DERIVATION_SUBSTITUTION;
- }
- else if (token.equals (SchemaSymbols.ATTVAL_EXTENSION)) {
+ if (token.equals (SchemaSymbols.ATTVAL_EXTENSION)) {
choice |= XSConstants.DERIVATION_EXTENSION;
}
else if (token.equals (SchemaSymbols.ATTVAL_RESTRICTION)) {
choice |= XSConstants.DERIVATION_RESTRICTION;
}
- else if (token.equals (SchemaSymbols.ATTVAL_LIST)) {
- choice |= XSConstants.DERIVATION_LIST;
- }
- else if (token.equals (SchemaSymbols.ATTVAL_UNION)) {
- choice |= XSConstants.DERIVATION_RESTRICTION;
+ else if (token.equals (SchemaSymbols.ATTVAL_SUBSTITUTION)) {
+ choice |= XSConstants.DERIVATION_SUBSTITUTION;
}
else {
- throw new InvalidDatatypeValueException("cvc-datatype-valid.1.2.3", new Object[]{value, "(#all | List of (substitution | extension | restriction | list | union))"});
+ throw new InvalidDatatypeValueException("cvc-datatype-valid.1.2.3", new Object[]{value, "(#all | List of (extension | restriction | substitution))"});
}
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@xerces.apache.org
For additional commands, e-mail: commits-help@xerces.apache.org