svn commit: r1156609 - in /xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs: XMLSchemaValidator.java assertion/XSAssertionXPath2ValueImpl.java util/XSTypeHelper.java
Author: mukulg Date: Thu Aug 11 13:21:33 2011 New Revision: 1156609 URL: http://svn.apache.org/viewvc?rev=1156609view=rev Log: committing a schema 1.1 change. the changes committed by Khaled during the SVN commit 1156230 required these changes (otherwise some of the xsd 1.1 assertion use cases would fail). thanks to Khaled actually for improving the design with this respect. Modified: xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/XMLSchemaValidator.java xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/assertion/XSAssertionXPath2ValueImpl.java xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/util/XSTypeHelper.java Modified: xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/XMLSchemaValidator.java URL: http://svn.apache.org/viewvc/xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/XMLSchemaValidator.java?rev=1156609r1=1156608r2=1156609view=diff == --- xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/XMLSchemaValidator.java (original) +++ xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/XMLSchemaValidator.java Thu Aug 11 13:21:33 2011 @@ -5049,11 +5049,11 @@ public class XMLSchemaValidator } /* - * Preprocessing checks for assertion evaluations for simpleType's with variety union. + * Extra checks for assertion evaluations for simpleType definitions with variety union. */ private void extraCheckForSTUnionAsserts(XSSimpleType simpleTypeDv, String content, ValidatedInfo validatedInfo, Augmentations augs) { if (simpleTypeDv.getVariety() == XSSimpleTypeDefinition.VARIETY_UNION ((XSSimpleType) simpleTypeDv.getBaseType()).getVariety() != XSSimpleTypeDefinition.VARIETY_UNION) { -if (XSTypeHelper.isAtomicValueValidForSTUnion(simpleTypeDv.getMemberTypes(), content, validatedInfo)) { +if (XSTypeHelper.isAtomicStrValueValidForSTUnion(simpleTypeDv.getMemberTypes(), content, validatedInfo, Constants.SCHEMA_VERSION_1_1)) { fIsAssertProcessingNeededForSTUnion = false; } if (augs != null) { Modified: xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/assertion/XSAssertionXPath2ValueImpl.java URL: http://svn.apache.org/viewvc/xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/assertion/XSAssertionXPath2ValueImpl.java?rev=1156609r1=1156608r2=1156609view=diff == --- xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/assertion/XSAssertionXPath2ValueImpl.java (original) +++ xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/assertion/XSAssertionXPath2ValueImpl.java Thu Aug 11 13:21:33 2011 @@ -185,14 +185,14 @@ public class XSAssertionXPath2ValueImpl /* - * Given a string value, this method sets an XPath 2.0 typed value for variable $value in XPath dynamic context, when the value is for simpleType variety union. + * Given a string value, this method sets an XPath 2.0 typed value for variable $value in XPath dynamic context, when the value is for simpleType with variety union. */ public void setXDMTypedValueOf$valueForSTVarietyUnion(String value, XSObjectList memberTypes, DynamicContext xpath2DynamicContext) { // check member types of union in order to find that which member type can successfully validate the string value -// first, and set value of XPath2 context variable $value using the member type found as its type annotation. +// first, and set the type annotation of XPath2 context variable $value with this member type definition. for (int memTypeIdx = 0; memTypeIdx memberTypes.getLength(); memTypeIdx++) { XSSimpleType simpleTypeDv = (XSSimpleType) memberTypes.item(memTypeIdx); -if (XSTypeHelper.isValueValidForASimpleType(value, simpleTypeDv)) { +if (XSTypeHelper.isStrValueValidForASimpleType(value, simpleTypeDv, Constants.SCHEMA_VERSION_1_1)) { setXDMTypedValueOf$valueForSTVarietyAtomic(value, getXercesXSDTypeCodeFor$value(simpleTypeDv), xpath2DynamicContext); break; } @@ -291,7 +291,7 @@ public class XSAssertionXPath2ValueImpl final int memberTypesLength = memberTypes.getLength(); for (int memTypeIdx = 0; memTypeIdx memberTypesLength; memTypeIdx++) { XSSimpleType memSimpleType = (XSSimpleType) memberTypes.item(memTypeIdx); - if (XSTypeHelper.isValueValidForASimpleType(xdmItemStrValue, memSimpleType)) { + if (XSTypeHelper.isStrValueValidForASimpleType(xdmItemStrValue, memSimpleType, Constants.SCHEMA_VERSION_1_1)) { // no more memberTypes need to
svn commit: r1156625 - /xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/XMLSchemaValidator.java
Author: knoaman Date: Thu Aug 11 14:14:00 2011 New Revision: 1156625 URL: http://svn.apache.org/viewvc?rev=1156625view=rev Log: Fix typo - Wrong message key was used Modified: xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/XMLSchemaValidator.java Modified: xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/XMLSchemaValidator.java URL: http://svn.apache.org/viewvc/xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/XMLSchemaValidator.java?rev=1156625r1=1156624r2=1156625view=diff == --- xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/XMLSchemaValidator.java (original) +++ xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/XMLSchemaValidator.java Thu Aug 11 14:14:00 2011 @@ -2360,7 +2360,7 @@ public class XMLSchemaValidator } if (!fXSConstraints.checkTypeDerivationOk(fCurrentType, elemType, block)) { reportSchemaError( -cvc-elt.4.cos-element-consistent.4.a, +cos-element-consistent.4.a, new Object[] { element.rawname, fCurrentType, elemType.getName()}); } } - To unsubscribe, e-mail: commits-unsubscr...@xerces.apache.org For additional commands, e-mail: commits-h...@xerces.apache.org
svn commit: r1156751 - /xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/XSDComplexTypeTraverser.java
Author: knoaman Date: Thu Aug 11 19:18:37 2011 New Revision: 1156751 URL: http://svn.apache.org/viewvc?rev=1156751view=rev Log: Implement latest changes to openContent (dealing with derivation by extension) Modified: xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/XSDComplexTypeTraverser.java Modified: xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/XSDComplexTypeTraverser.java URL: http://svn.apache.org/viewvc/xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/XSDComplexTypeTraverser.java?rev=1156751r1=1156750r2=1156751view=diff == --- xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/XSDComplexTypeTraverser.java (original) +++ xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/XSDComplexTypeTraverser.java Thu Aug 11 19:18:37 2011 @@ -1251,24 +1251,48 @@ class XSDComplexTypeTraverser extends X } } -// If the wildcard element is not absent -if (fOpenContent != null) { -// 6.2 If the actual value of its mode [attribute] is 'none', then an absent {open content} -if (fOpenContent.fMode == XSOpenContentDecl.MODE_NONE) { -fOpenContent = null; -} -// 6.3 If the {variety} is empty, then a Particle as follows: +// 6.1 If the wildcard element is absent or is present and has +// mode = 'none', then the explicit content type. +if (fOpenContent == null || fOpenContent.fMode == XSOpenContentDecl.MODE_NONE) { +fOpenContent = explicitOpenContent; +} +else { +// 6.2 + +// If the {variety} is empty, then a Particle as follows: // {min occurs} 1 // {max occurs} 1 // {term} a model group whose {compositor} is sequence and whose {particles} is empty. -else if (fContentType == XSComplexTypeDecl.CONTENTTYPE_EMPTY) { +if (fContentType == XSComplexTypeDecl.CONTENTTYPE_EMPTY) { fParticle = XSConstraints.getEmptySequence(); fContentType = XSComplexTypeDecl.CONTENTTYPE_ELEMENT; } -} -// 6.1 If the wildcard element is absent, then the explicit open content. -else { -fOpenContent = explicitOpenContent; + +// An Open Content as follows: +// PropertyValue +// {mode} The actual value of the mode [attribute] of the +// wildcard element, if present, otherwise +// interleave. +// +// {wildcard} Let W be the wildcard corresponding to the any +// [child] of the wildcard element. If the +// {open content} of the explicit content type is +// absent, then W; otherwise a wildcard whose +// {process contents} and {annotations} are those of +// W, and whose {namespace constraint} is the +// wildcard union of the {namespace constraint} of W +// and of {open content}.{wildcard} of the explicit +// content type, as defined in Attribute Wildcard +// Union (3.10.6.3). + +// If explicit open content is null, no need to make any changes +if (explicitOpenContent != null) { +XSOpenContentDecl oc = new XSOpenContentDecl(); +oc.fMode = fOpenContent.fMode; // interleave by default +oc.fWildcard = fSchemaHandler.fXSConstraints.performUnionWith(fOpenContent.fWildcard, explicitOpenContent.fWildcard, fOpenContent.fWildcard.fProcessContents); +oc.fWildcard.fAnnotations = fOpenContent.fWildcard.fAnnotations; +fOpenContent = oc; +} } if (fDerivedBy == XSConstants.DERIVATION_EXTENSION baseType.getContentType() != XSComplexTypeDecl.CONTENTTYPE_EMPTY) { - To unsubscribe, e-mail: commits-unsubscr...@xerces.apache.org For additional commands, e-mail: commits-h...@xerces.apache.org
[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=15rev2=16 Comment: updating latest test suite results '''__XERCES XML Schema 1.1 test-suite results__''' - Xerces SVN Revision: 1155074 + Xerces SVN Revision: 1156832 (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;1260 ||style=text-align: center;94.81 || + ||style=text-align: center;1329 ||style=text-align: center;1262 ||style=text-align: center;94.96 || @@ -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;2214 ||style=text-align: center;96.34 || + ||style=text-align: center;2298 ||style=text-align: center;2216 ||style=text-align: center;96.43 || - To unsubscribe, e-mail: commits-unsubscr...@xerces.apache.org For additional commands, e-mail: commits-h...@xerces.apache.org