svn commit: r1157133 - /xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/XSDSimpleTypeTraverser.java
Author: knoaman Date: Fri Aug 12 14:46:12 2011 New Revision: 1157133 URL: http://svn.apache.org/viewvc?rev=1157133view=rev Log: Move the check for itemType and memberTypes not being special type to findDTDValidator Modified: xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/XSDSimpleTypeTraverser.java Modified: xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/XSDSimpleTypeTraverser.java URL: http://svn.apache.org/viewvc/xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/XSDSimpleTypeTraverser.java?rev=1157133r1=1157132r2=1157133view=diff == --- xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/XSDSimpleTypeTraverser.java (original) +++ xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/XSDSimpleTypeTraverser.java Fri Aug 12 14:46:12 2011 @@ -29,7 +29,6 @@ import org.apache.xerces.impl.xs.SchemaS import org.apache.xerces.impl.xs.XSAnnotationImpl; import org.apache.xerces.impl.xs.util.XInt; import org.apache.xerces.impl.xs.util.XSObjectListImpl; -import org.apache.xerces.impl.xs.util.XSTypeHelper; import org.apache.xerces.util.DOMUtil; import org.apache.xerces.xni.QName; import org.apache.xerces.xs.XSConstants; @@ -307,18 +306,15 @@ class XSDSimpleTypeTraverser extends XSD // get types from memberTypes attribute ArrayList dTValidators = null; XSSimpleType dv = null; -XSSimpleType[] memberTypeDvList = null; XSObjectList dvs; if (union memberTypes != null memberTypes.size() 0) { int size = memberTypes.size(); -memberTypeDvList = new XSSimpleType[size]; dTValidators = new ArrayList(size); // for each qname in the list for (int i = 0; i size; i++) { // get the type decl dv = findDTValidator(child, name, (QName)memberTypes.elementAt(i), XSConstants.DERIVATION_UNION, schemaDoc); -memberTypeDvList[i] = dv; if (dv != null) { // if it's a union, expand it // In XML Schema 1.1, we do not expand @@ -449,20 +445,7 @@ class XSDSimpleTypeTraverser extends XSD annotations == null? null : new XSObjectListImpl(annotations, annotations.length)); } } - -if (fSchemaHandler.fSchemaVersion == Constants.SCHEMA_VERSION_1_1) { -if (list baseValidator != null XSTypeHelper.isSpecialSimpleType(baseValidator)) { - reportSchemaError(st-props-correct.1, new Object[] {((XSSimpleTypeDecl)newDecl).getTypeName(), xs:list}, child); -} -else if (union memberTypeDvList != null) { - for (int memTypeIdx = 0; memTypeIdx memberTypeDvList.length; memTypeIdx++) { - if (XSTypeHelper.isSpecialSimpleType(memberTypeDvList[memTypeIdx])) { - reportSchemaError(st-props-correct.1, new Object[] {((XSSimpleTypeDecl)newDecl).getTypeName(), xs:union}, child); - } - } -} -} - + // XML Schema 1.1 // Set context information final int localValidatorsSize = localValidators.size(); @@ -510,15 +493,22 @@ class XSDSimpleTypeTraverser extends XSD // if it's a complex type, or if its restriction of anySimpleType // or anyAtomicType (XML Schema 1.1) -if ((baseType == SchemaGrammar.fAnySimpleType || baseType == SchemaGrammar.fAnyAtomicType) -baseRefContext == XSConstants.DERIVATION_RESTRICTION) { -// if the base type is anySimpleType and the current type is -// a S4S built-in type, return null. (not an error). -if (checkBuiltIn(refName, schemaDoc.fTargetNamespace)) { +if (baseType == SchemaGrammar.fAnySimpleType || baseType == SchemaGrammar.fAnyAtomicType) { +if (baseRefContext == XSConstants.DERIVATION_RESTRICTION) { +// if the base type is anySimpleType and the current type is +// a S4S built-in type, return null. (not an error). +if (checkBuiltIn(refName, schemaDoc.fTargetNamespace)) { +return null; +} +reportSchemaError(cos-st-restricts.1.1, new Object[]{baseTypeStr.rawname, refName}, elm); +return null; +} +else if (fSchemaHandler.fSchemaVersion == Constants.SCHEMA_VERSION_1_1) { +// itemType and memberType cannot be a special type +final String contextString = (baseRefContext == XSConstants.DERIVATION_LIST) ? xs:list : xs:union; +reportSchemaError(st-props-correct.1, new Object[] {refName, contextString}, elm);
svn commit: r1157205 - /xerces/java/trunk/src/org/apache/xerces/impl/msg/DOMMessages.properties
Author: mrglavas Date: Fri Aug 12 18:34:04 2011 New Revision: 1157205 URL: http://svn.apache.org/viewvc?rev=1157205view=rev Log: JIRA Issue #1522: http://issues.apache.org/jira/browse/XERCESJ-1522. Removing trailing spaces from error messages. Modified: xerces/java/trunk/src/org/apache/xerces/impl/msg/DOMMessages.properties Modified: xerces/java/trunk/src/org/apache/xerces/impl/msg/DOMMessages.properties URL: http://svn.apache.org/viewvc/xerces/java/trunk/src/org/apache/xerces/impl/msg/DOMMessages.properties?rev=1157205r1=1157204r2=1157205view=diff == --- xerces/java/trunk/src/org/apache/xerces/impl/msg/DOMMessages.properties (original) +++ xerces/java/trunk/src/org/apache/xerces/impl/msg/DOMMessages.properties Fri Aug 12 18:34:04 2011 @@ -28,23 +28,23 @@ # DOM Core # exception codes -DOMSTRING_SIZE_ERR = The specified range of text does not fit into a DOMString. -HIERARCHY_REQUEST_ERR = An attempt was made to insert a node where it is not permitted. +DOMSTRING_SIZE_ERR = The specified range of text does not fit into a DOMString. +HIERARCHY_REQUEST_ERR = An attempt was made to insert a node where it is not permitted. INDEX_SIZE_ERR = The index or size is negative, or greater than the allowed value. INUSE_ATTRIBUTE_ERR = An attempt is made to add an attribute that is already in use elsewhere. -INVALID_ACCESS_ERR = A parameter or an operation is not supported by the underlying object. -INVALID_CHARACTER_ERR = An invalid or illegal XML character is specified. -INVALID_MODIFICATION_ERR = An attempt is made to modify the type of the underlying object. -INVALID_STATE_ERR = An attempt is made to use an object that is not, or is no longer, usable. +INVALID_ACCESS_ERR = A parameter or an operation is not supported by the underlying object. +INVALID_CHARACTER_ERR = An invalid or illegal XML character is specified. +INVALID_MODIFICATION_ERR = An attempt is made to modify the type of the underlying object. +INVALID_STATE_ERR = An attempt is made to use an object that is not, or is no longer, usable. NAMESPACE_ERR = An attempt is made to create or change an object in a way which is incorrect with regard to namespaces. NOT_FOUND_ERR = An attempt is made to reference a node in a context where it does not exist. -NOT_SUPPORTED_ERR = The implementation does not support the requested type of object or operation. +NOT_SUPPORTED_ERR = The implementation does not support the requested type of object or operation. NO_DATA_ALLOWED_ERR = Data is specified for a node which does not support data. NO_MODIFICATION_ALLOWED_ERR = An attempt is made to modify an object where modifications are not allowed. -SYNTAX_ERR = An invalid or illegal string is specified. +SYNTAX_ERR = An invalid or illegal string is specified. VALIDATION_ERR = A call to a method such as insertBefore or removeChild would make the Node invalid with respect to document grammar. WRONG_DOCUMENT_ERR = A node is used in a different document than the one that created it. -TYPE_MISMATCH_ERR = The value type for this parameter name is incompatible with the expected value type. +TYPE_MISMATCH_ERR = The value type for this parameter name is incompatible with the expected value type. #error messages or exceptions FEATURE_NOT_SUPPORTED = The parameter {0} is recognized but the requested value cannot be set. @@ -78,7 +78,6 @@ jaxp-null-input-source = The source spec BAD_BOUNDARYPOINTS_ERR = The boundary-points of a Range do not meet specific requirements. INVALID_NODE_TYPE_ERR = The container of a boundary-point of a Range is being set to either a node of an invalid type or a node with an ancestor of an invalid type. - #Events -UNSPECIFIED_EVENT_TYPE_ERR = The Event's type was not specified by initializing the event before the method was called. +UNSPECIFIED_EVENT_TYPE_ERR = The Event's type was not specified by initializing the event before the method was called. - To unsubscribe, e-mail: commits-unsubscr...@xerces.apache.org For additional commands, e-mail: commits-h...@xerces.apache.org
svn commit: r1157206 - /xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/msg/DOMMessages.properties
Author: mrglavas Date: Fri Aug 12 18:34:19 2011 New Revision: 1157206 URL: http://svn.apache.org/viewvc?rev=1157206view=rev Log: JIRA Issue #1522: http://issues.apache.org/jira/browse/XERCESJ-1522. Removing trailing spaces from error messages. Modified: xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/msg/DOMMessages.properties Modified: xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/msg/DOMMessages.properties URL: http://svn.apache.org/viewvc/xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/msg/DOMMessages.properties?rev=1157206r1=1157205r2=1157206view=diff == --- xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/msg/DOMMessages.properties (original) +++ xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/msg/DOMMessages.properties Fri Aug 12 18:34:19 2011 @@ -28,23 +28,23 @@ # DOM Core # exception codes -DOMSTRING_SIZE_ERR = The specified range of text does not fit into a DOMString. -HIERARCHY_REQUEST_ERR = An attempt was made to insert a node where it is not permitted. +DOMSTRING_SIZE_ERR = The specified range of text does not fit into a DOMString. +HIERARCHY_REQUEST_ERR = An attempt was made to insert a node where it is not permitted. INDEX_SIZE_ERR = The index or size is negative, or greater than the allowed value. INUSE_ATTRIBUTE_ERR = An attempt is made to add an attribute that is already in use elsewhere. -INVALID_ACCESS_ERR = A parameter or an operation is not supported by the underlying object. -INVALID_CHARACTER_ERR = An invalid or illegal XML character is specified. -INVALID_MODIFICATION_ERR = An attempt is made to modify the type of the underlying object. -INVALID_STATE_ERR = An attempt is made to use an object that is not, or is no longer, usable. +INVALID_ACCESS_ERR = A parameter or an operation is not supported by the underlying object. +INVALID_CHARACTER_ERR = An invalid or illegal XML character is specified. +INVALID_MODIFICATION_ERR = An attempt is made to modify the type of the underlying object. +INVALID_STATE_ERR = An attempt is made to use an object that is not, or is no longer, usable. NAMESPACE_ERR = An attempt is made to create or change an object in a way which is incorrect with regard to namespaces. NOT_FOUND_ERR = An attempt is made to reference a node in a context where it does not exist. -NOT_SUPPORTED_ERR = The implementation does not support the requested type of object or operation. +NOT_SUPPORTED_ERR = The implementation does not support the requested type of object or operation. NO_DATA_ALLOWED_ERR = Data is specified for a node which does not support data. NO_MODIFICATION_ALLOWED_ERR = An attempt is made to modify an object where modifications are not allowed. -SYNTAX_ERR = An invalid or illegal string is specified. +SYNTAX_ERR = An invalid or illegal string is specified. VALIDATION_ERR = A call to a method such as insertBefore or removeChild would make the Node invalid with respect to document grammar. WRONG_DOCUMENT_ERR = A node is used in a different document than the one that created it. -TYPE_MISMATCH_ERR = The value type for this parameter name is incompatible with the expected value type. +TYPE_MISMATCH_ERR = The value type for this parameter name is incompatible with the expected value type. #error messages or exceptions FEATURE_NOT_SUPPORTED = The parameter {0} is recognized but the requested value cannot be set. @@ -78,7 +78,6 @@ jaxp-null-input-source = The source spec BAD_BOUNDARYPOINTS_ERR = The boundary-points of a Range do not meet specific requirements. INVALID_NODE_TYPE_ERR = The container of a boundary-point of a Range is being set to either a node of an invalid type or a node with an ancestor of an invalid type. - #Events -UNSPECIFIED_EVENT_TYPE_ERR = The Event's type was not specified by initializing the event before the method was called. +UNSPECIFIED_EVENT_TYPE_ERR = The Event's type was not specified by initializing the event before the method was called. - To unsubscribe, e-mail: commits-unsubscr...@xerces.apache.org For additional commands, e-mail: commits-h...@xerces.apache.org
svn commit: r1157313 - in /xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/dv/xs: QNameDV.java XSSimpleTypeDecl.java
Author: mukulg Date: Sat Aug 13 03:55:34 2011 New Revision: 1157313 URL: http://svn.apache.org/viewvc?rev=1157313view=rev Log: doing a schema 1.1 commit. adding rules for validating values of types NCName, Name, NMToken QName with XML 1.1 rules if working in XSD 1.1 mode, else (if we would work in XSD 1.0 mode) we would use the XML 1.0 rules. Modified: xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/dv/xs/QNameDV.java xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/dv/xs/XSSimpleTypeDecl.java Modified: xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/dv/xs/QNameDV.java URL: http://svn.apache.org/viewvc/xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/dv/xs/QNameDV.java?rev=1157313r1=1157312r2=1157313view=diff == --- xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/dv/xs/QNameDV.java (original) +++ xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/dv/xs/QNameDV.java Sat Aug 13 03:55:34 2011 @@ -19,6 +19,7 @@ package org.apache.xerces.impl.dv.xs; import org.apache.xerces.impl.dv.InvalidDatatypeValueException; import org.apache.xerces.impl.dv.ValidationContext; +import org.apache.xerces.util.XML11Char; import org.apache.xerces.util.XMLChar; import org.apache.xerces.xni.QName; import org.apache.xerces.xs.datatypes.XSQName; @@ -52,12 +53,17 @@ public class QNameDV extends TypeValidat localpart = content; } -// both prefix (if any) a nd localpart must be valid NCName -if (prefix.length() 0 !XMLChar.isValidNCName(prefix)) +boolean isSchema11 = context.getTypeValidatorHelper().isXMLSchema11(); + +// both prefix (if any) and localpart must be valid NCName +// if using XSD 1.1, use the XML 1.1 rules of validating the prefix and the local part, else use the XML 1.0 rules +if (prefix.length() 0 ((isSchema11) ? !XML11Char.isXML11ValidNCName(prefix) : !XMLChar.isValidNCName(prefix))) { throw new InvalidDatatypeValueException(cvc-datatype-valid.1.2.1, new Object[]{content, QName}); +} -if(!XMLChar.isValidNCName(localpart)) +if((isSchema11) ? !XML11Char.isXML11ValidNCName(localpart) : !XMLChar.isValidNCName(localpart)) { throw new InvalidDatatypeValueException(cvc-datatype-valid.1.2.1, new Object[]{content, QName}); +} // resove prefix to a uri, report an error if failed String uri = context.getURI(prefix); Modified: xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/dv/xs/XSSimpleTypeDecl.java URL: http://svn.apache.org/viewvc/xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/dv/xs/XSSimpleTypeDecl.java?rev=1157313r1=1157312r2=1157313view=diff == --- xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/dv/xs/XSSimpleTypeDecl.java (original) +++ xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/dv/xs/XSSimpleTypeDecl.java Sat Aug 13 03:55:34 2011 @@ -37,6 +37,7 @@ import org.apache.xerces.impl.xs.util.Ob import org.apache.xerces.impl.xs.util.ShortListImpl; import org.apache.xerces.impl.xs.util.StringListImpl; import org.apache.xerces.impl.xs.util.XSObjectListImpl; +import org.apache.xerces.util.XML11Char; import org.apache.xerces.util.XMLChar; import org.apache.xerces.xni.NamespaceContext; import org.apache.xerces.xs.ShortList; @@ -2073,17 +2074,19 @@ public class XSSimpleTypeDecl implements if (fPatternType != SPECIAL_PATTERN_NONE) { boolean seenErr = false; +boolean isSchema11 = context.getTypeValidatorHelper().isXMLSchema11(); +// if using XSD 1.1, use the XML 1.1 rules of validating the NMTOKEN, Name and NCName else use the XML 1.0 rules if (fPatternType == SPECIAL_PATTERN_NMTOKEN) { // PATTERN \\c+ -seenErr = !XMLChar.isValidNmtoken(nvalue); +seenErr = (isSchema11) ? !XML11Char.isXML11ValidNmtoken(nvalue) : !XMLChar.isValidNmtoken(nvalue); } else if (fPatternType == SPECIAL_PATTERN_NAME) { -// PATTERN \\i\\c* -seenErr = !XMLChar.isValidName(nvalue); +// PATTERN \\i\\c* +seenErr = (isSchema11) ? !XML11Char.isXML11ValidName(nvalue) : !XMLChar.isValidName(nvalue); } else if (fPatternType == SPECIAL_PATTERN_NCNAME) { // PATTERN [\\i-[:]][\\c-[:]]* -seenErr = !XMLChar.isValidNCName(nvalue); +seenErr = (isSchema11) ? !XML11Char.isXML11ValidNCName(nvalue) : !XMLChar.isValidNCName(nvalue); } if
[Xerces Wiki] Update of xmlschema11TestSuiteReports by Mukul Gandhi
Dear Wiki user, You have subscribed to a wiki page or wiki category on Xerces Wiki for change notification. The xmlschema11TestSuiteReports page has been changed by Mukul Gandhi: http://wiki.apache.org/xerces/xmlschema11TestSuiteReports?action=diffrev1=16rev2=17 Comment: updating latest test suite results '''__XERCES XML Schema 1.1 test-suite results__''' - Xerces SVN Revision: 1156832 + Xerces SVN Revision: 1157313 (1) __Xerces running IBM XML Schema 1.1 Tests__ @@ -19, +19 @@ ''Summary'': ||style=text-align: center;Total Tests ||style=text-align: center;Tests passed ||style=text-align: center;Success % || - ||style=text-align: center;1329 ||style=text-align: center;1262 ||style=text-align: center;94.96 || + ||style=text-align: center;1329 ||style=text-align: center;1268 ||style=text-align: center;95.41 || @@ -28, +28 @@ '''Overall Test Suite run status:''' ||style=text-align: center;Total Tests ||style=text-align: center;Tests passed ||style=text-align: center;Success % || - ||style=text-align: center;2298 ||style=text-align: center;2216 ||style=text-align: center;96.43 || + ||style=text-align: center;2298 ||style=text-align: center; ||style=text-align: center;96.70 || - To unsubscribe, e-mail: commits-unsubscr...@xerces.apache.org For additional commands, e-mail: commits-h...@xerces.apache.org
[Xerces Wiki] Update of xmlschema11SaxonicaTests by Mukul Gandhi
Dear Wiki user, You have subscribed to a wiki page or wiki category on Xerces Wiki for change notification. The xmlschema11SaxonicaTests page has been changed by Mukul Gandhi: http://wiki.apache.org/xerces/xmlschema11SaxonicaTests?action=diffrev1=13rev2=14 Comment: updating latest test suite results ||:255.|| || || ||:wild082.v1.xml||: #ccff99valid||: #ccff99valid|| || ||: #99XmlVersions|| || || || || || || || ||:xv001|| || || || || - ||:1.|| || ||:xv001.xsd|| ||: #ffcc99valid||: #ffcc99invalid|| + ||:1.|| || ||:xv001.xsd|| ||: #ccff99valid||: #ccff99valid|| - ||:2.|| || || ||:xv001.v01.xml||: #ffcc99valid||: #ffcc99invalid|| + ||:2.|| || || ||:xv001.v01.xml||: #ccff99valid||: #ccff99valid|| || || ||:xv002|| || || || || ||:3.|| || ||:xv002.xsd|| ||: #ccff99valid||: #ccff99valid|| - ||:4.|| || || ||:xv002.v01.xml||: #ffcc99valid||: #ffcc99invalid|| + ||:4.|| || || ||:xv002.v01.xml||: #ccff99valid||: #ccff99valid|| || || ||:xv003|| || || || || ||:5.|| || ||:xv003.xsd|| ||: #ccff99valid||: #ccff99valid|| ||:6.|| || || ||:xv003.v01.xml||: #ccff99valid||: #ccff99valid|| || || ||:xv004|| || || || || - ||:7.|| || ||:xv004.xsd|| ||: #ffcc99valid||: #ffcc99invalid|| + ||:7.|| || ||:xv004.xsd|| ||: #ccff99valid||: #ccff99valid|| - ||:8.|| || || ||:xv004.v01.xml||: #ffcc99valid||: #ffcc99invalid|| + ||:8.|| || || ||:xv004.v01.xml||: #ccff99valid||: #ccff99valid|| || || ||:xv005|| || || || || ||:9.|| || ||:xv005.xsd|| ||: #ccff99valid||: #ccff99valid|| ||:10.|| || || ||:xv005.v01.xml||: #ffcc99valid||: #ffcc99invalid|| @@ -1724, +1724 @@ || || ||:xv009|| || || || || ||:26.|| || ||:xv009.xsd|| ||: #ccff99valid||: #ccff99valid|| ||:27.|| || || ||:xv009.v01.xml||: #ffcc99valid||: #ffcc99invalid|| - ||:28.|| || || ||:xv009.v02.xml||: #ffcc99valid||: #ffcc99invalid|| + ||:28.|| || || ||:xv009.v02.xml||: #ccff99valid||: #ccff99valid|| ||:29.|| || || ||:xv009.n01.xml||: #ccff99invalid||: #ccff99invalid|| ||:30.|| || || ||:xv009.n02.xml||: #ccff99invalid||: #ccff99invalid|| ||:31.|| || || ||:xv009.n03.xml||: #ccff99invalid||: #ccff99invalid|| @@ -1825, +1825 @@ ||:74.|| || || ||:zone304.n02.xml||: #ccff99invalid||: #ccff99invalid|| - - To unsubscribe, e-mail: commits-unsubscr...@xerces.apache.org For additional commands, e-mail: commits-h...@xerces.apache.org