svn commit: r1823129 - /xerces/java/trunk/docs/faq-xs.xml
Author: mukulg Date: Mon Feb 5 06:25:54 2018 New Revision: 1823129 URL: http://svn.apache.org/viewvc?rev=1823129&view=rev Log: doing a minor correction to documentation Modified: xerces/java/trunk/docs/faq-xs.xml Modified: xerces/java/trunk/docs/faq-xs.xml URL: http://svn.apache.org/viewvc/xerces/java/trunk/docs/faq-xs.xml?rev=1823129&r1=1823128&r2=1823129&view=diff == --- xerces/java/trunk/docs/faq-xs.xml (original) +++ xerces/java/trunk/docs/faq-xs.xml Mon Feb 5 06:25:54 2018 @@ -22,7 +22,8 @@ How do I validate against XML schema? XML Schema 1.0 validation has been integrated with the - regular SAXParser and DOMParser classes. No special classes are + regular SAXParser and DOMParser classes, and also with the JAXP + validation API using the XSD 1.0 Schema factory. No special classes are required to parse documents that use a schema. For XML Schema 1.1 validation, you'll need to use the JAXP validation API, using the XSD 1.1 Schema factory. Here's an example: - To unsubscribe, e-mail: commits-unsubscr...@xerces.apache.org For additional commands, e-mail: commits-h...@xerces.apache.org
svn commit: r1821882 - /xerces/java/trunk/docs/xml-schema.xml
Author: mukulg Date: Mon Jan 22 16:05:10 2018 New Revision: 1821882 URL: http://svn.apache.org/viewvc?rev=1821882&view=rev Log: as per discussion on the jira issue XERCESJ-1687, updating the XML Schema documentation Modified: xerces/java/trunk/docs/xml-schema.xml Modified: xerces/java/trunk/docs/xml-schema.xml URL: http://svn.apache.org/viewvc/xerces/java/trunk/docs/xml-schema.xml?rev=1821882&r1=1821881&r2=1821882&view=diff == --- xerces/java/trunk/docs/xml-schema.xml (original) +++ xerces/java/trunk/docs/xml-schema.xml Mon Jan 22 16:05:10 2018 @@ -130,6 +130,14 @@ Javadoc for javax.xml.XMLConstants.FEATURE_SECURE_PROCESSING for more details. + The JAXP class javax.xml.validation.Schema is defined to be thread safe, i.e. +applications are encouraged to share it across many threads. There are few cases +observed while doing XML Schema 1.1 validation, where the thread safe definition +of javax.xml.validation.Schema is not honored. This problem is observed, while +using the XSD 1.1 syntax <assert> in the XSD documents. But there are also, various +cases observed while using XSD 1.1 syntax <assert>, when thread safety of javax.xml.validation.Schema +is honored correctly. + - To unsubscribe, e-mail: commits-unsubscr...@xerces.apache.org For additional commands, e-mail: commits-h...@xerces.apache.org
svn commit: r1821827 - /xerces/java/branches/xml-schema-1.1-dev/docs/xml-schema.xml
Author: mukulg Date: Mon Jan 22 07:01:33 2018 New Revision: 1821827 URL: http://svn.apache.org/viewvc?rev=1821827&view=rev Log: as per discussion on the jira issue XERCESJ-1687, updating the XSD 1.1 documentation Modified: xerces/java/branches/xml-schema-1.1-dev/docs/xml-schema.xml Modified: xerces/java/branches/xml-schema-1.1-dev/docs/xml-schema.xml URL: http://svn.apache.org/viewvc/xerces/java/branches/xml-schema-1.1-dev/docs/xml-schema.xml?rev=1821827&r1=1821826&r2=1821827&view=diff == --- xerces/java/branches/xml-schema-1.1-dev/docs/xml-schema.xml (original) +++ xerces/java/branches/xml-schema-1.1-dev/docs/xml-schema.xml Mon Jan 22 07:01:33 2018 @@ -130,6 +130,14 @@ Javadoc for javax.xml.XMLConstants.FEATURE_SECURE_PROCESSING for more details. + The JAXP class javax.xml.validation.Schema is defined to be thread safe, i.e. +applications are encouraged to share it across many threads. There are few cases +observed while doing XML Schema 1.1 validation, where the thread safe definition +of javax.xml.validation.Schema is not honored. This problem is observed, while +using the XSD 1.1 syntax <assert> in the XSD documents. But there are also, various +cases observed while using XSD 1.1 syntax <assert>, when thread safety of javax.xml.validation.Schema +is honored correctly. + - To unsubscribe, e-mail: commits-unsubscr...@xerces.apache.org For additional commands, e-mail: commits-h...@xerces.apache.org
svn commit: r1785425 - /xerces/java/trunk/src/org/apache/xerces/impl/xs/traversers/StAXSchemaParser.java
Author: mukulg Date: Sat Mar 4 03:51:24 2017 New Revision: 1785425 URL: http://svn.apache.org/viewvc?rev=1785425&view=rev Log: making a minor fix. This declaration private final JAXPNamespaceContextWrapper fNamespaceContext = new JAXPNamespaceContextWrapper(fSymbolTable); had an uninitialized fSymbolTable passed to the constructor Modified: xerces/java/trunk/src/org/apache/xerces/impl/xs/traversers/StAXSchemaParser.java Modified: xerces/java/trunk/src/org/apache/xerces/impl/xs/traversers/StAXSchemaParser.java URL: http://svn.apache.org/viewvc/xerces/java/trunk/src/org/apache/xerces/impl/xs/traversers/StAXSchemaParser.java?rev=1785425&r1=1785424&r2=1785425&view=diff == --- xerces/java/trunk/src/org/apache/xerces/impl/xs/traversers/StAXSchemaParser.java (original) +++ xerces/java/trunk/src/org/apache/xerces/impl/xs/traversers/StAXSchemaParser.java Sat Mar 4 03:51:24 2017 @@ -64,7 +64,7 @@ final class StAXSchemaParser { private final char [] fCharBuffer = new char[CHUNK_SIZE]; /** Symbol table **/ -private SymbolTable fSymbolTable; +private SymbolTable fSymbolTable = new SymbolTable(); /** SchemaDOMParser, events will be delegated to SchemaDOMParser to pass */ private SchemaDOMParser fSchemaDOMParser; - To unsubscribe, e-mail: commits-unsubscr...@xerces.apache.org For additional commands, e-mail: commits-h...@xerces.apache.org
svn commit: r1785424 - /xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/StAXSchemaParser.java
Author: mukulg Date: Sat Mar 4 03:50:33 2017 New Revision: 1785424 URL: http://svn.apache.org/viewvc?rev=1785424&view=rev Log: making a minor fix. This declaration private final JAXPNamespaceContextWrapper fNamespaceContext = new JAXPNamespaceContextWrapper(fSymbolTable); had an uninitialized fSymbolTable passed to the constructor Modified: xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/StAXSchemaParser.java Modified: xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/StAXSchemaParser.java URL: http://svn.apache.org/viewvc/xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/StAXSchemaParser.java?rev=1785424&r1=1785423&r2=1785424&view=diff == --- xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/StAXSchemaParser.java (original) +++ xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/StAXSchemaParser.java Sat Mar 4 03:50:33 2017 @@ -64,7 +64,7 @@ final class StAXSchemaParser { private final char [] fCharBuffer = new char[CHUNK_SIZE]; /** Symbol table **/ -private SymbolTable fSymbolTable; +private SymbolTable fSymbolTable = new SymbolTable(); /** SchemaDOMParser, events will be delegated to SchemaDOMParser to pass */ private SchemaDOMParser fSchemaDOMParser; - To unsubscribe, e-mail: commits-unsubscr...@xerces.apache.org For additional commands, e-mail: commits-h...@xerces.apache.org
svn commit: r1758329 - /xerces/java/branches/xml-schema-1.1-dev/README
Author: mukulg Date: Tue Aug 30 06:21:48 2016 New Revision: 1758329 URL: http://svn.apache.org/viewvc?rev=1758329&view=rev Log: adding some details to this file, about the unit tests that are there. Modified: xerces/java/branches/xml-schema-1.1-dev/README Modified: xerces/java/branches/xml-schema-1.1-dev/README URL: http://svn.apache.org/viewvc/xerces/java/branches/xml-schema-1.1-dev/README?rev=1758329&r1=1758328&r2=1758329&view=diff == --- xerces/java/branches/xml-schema-1.1-dev/README (original) +++ xerces/java/branches/xml-schema-1.1-dev/README Tue Aug 30 06:21:48 2016 @@ -56,4 +56,11 @@ building, these files will be located in If you want to build everything, including the documentation, run the build batch file (or shell script) specifying the "all" -target instead of "jars". \ No newline at end of file +target instead of "jars". + +Details about proprietary XML Schema 1.1 unit tests: +The XercesJ XML Schema 1.1 deliverables, include a proprietary unit test suite located in the branch "xs-1.1-tests". +This is in addition to the Xerces tests that are located at /xerces-java-xml-schema-1.1-dev/tests. It is advisable +to always comply to tests in the branch "xs-1.1-tests" whenever changing the code (in addition to the tests /xerces-java-xml-schema-1.1-dev/tests), +since the functionality these tests are testing are core part of Xerces deliverables (one of the important things the +"xs-1.1-tests" tests test, are the error/warning messages generated during XML Schema 1.1 validation assessments. \ No newline at end of file - To unsubscribe, e-mail: commits-unsubscr...@xerces.apache.org For additional commands, e-mail: commits-h...@xerces.apache.org
svn commit: r1758327 - /xerces/java/branches/xs-1.1-tests/readme.txt
Author: mukulg Date: Tue Aug 30 06:07:46 2016 New Revision: 1758327 URL: http://svn.apache.org/viewvc?rev=1758327&view=rev Log: minor change in details to text in this file Modified: xerces/java/branches/xs-1.1-tests/readme.txt Modified: xerces/java/branches/xs-1.1-tests/readme.txt URL: http://svn.apache.org/viewvc/xerces/java/branches/xs-1.1-tests/readme.txt?rev=1758327&r1=1758326&r2=1758327&view=diff == --- xerces/java/branches/xs-1.1-tests/readme.txt (original) +++ xerces/java/branches/xs-1.1-tests/readme.txt Tue Aug 30 06:07:46 2016 @@ -17,8 +17,8 @@ This SVN branch contains Xerces proprietary unit test cases for the Xerces XML Schema (XSD) 1.1 functionality. -Configuration notes: Minimum JRE needed to run these tests is 1.5. These unit tests contain a folder "data" parallel -to the "src" folder, that contain the XML and XSD documents needed by the unit tests. Before invoking this unit test +Configuration notes: Minimum JRE needed to run these tests is 1.5. These unit tests contain a folder "data" alongside +to the "src" folder, that contain the XML and XSD documents needed for the unit tests. Before invoking this unit test suite, the following argument needs to be provided to the Java VM, -Dorg.apache.xerces.tests.dataDir= relative to which the unit tests would retrieve XML and XSD documents. @@ -27,4 +27,5 @@ The class "AllXercesXSD11Tests" is the e Acknowledgements: These unit tests contain XSD 1.1 examples written by Roger L. Costello (coste...@mitre.org), and have been included -here with the permission from author. Roger's contribution of useful XSD 1.1 examples to this test suite is highly appreciated. \ No newline at end of file +here with the permission from author. Roger's contribution of useful XSD 1.1 examples to this test suite is highly appreciated. +Roger has been an active contributor to the XML Schema standards work. \ No newline at end of file - To unsubscribe, e-mail: commits-unsubscr...@xerces.apache.org For additional commands, e-mail: commits-h...@xerces.apache.org
svn commit: r1758326 - /xerces/java/branches/xs-1.1-tests/.project
Author: mukulg Date: Tue Aug 30 06:02:51 2016 New Revision: 1758326 URL: http://svn.apache.org/viewvc?rev=1758326&view=rev Log: adding a .project file to this eclipse project Added: xerces/java/branches/xs-1.1-tests/.project (with props) Added: xerces/java/branches/xs-1.1-tests/.project URL: http://svn.apache.org/viewvc/xerces/java/branches/xs-1.1-tests/.project?rev=1758326&view=auto == --- xerces/java/branches/xs-1.1-tests/.project (added) +++ xerces/java/branches/xs-1.1-tests/.project Tue Aug 30 06:02:51 2016 @@ -0,0 +1,33 @@ + + + + xs-1.1-tests + + + + + + org.eclipse.jdt.core.javabuilder + + + + + + org.eclipse.jdt.core.javanature + + Propchange: xerces/java/branches/xs-1.1-tests/.project -- svn:eol-style = native Propchange: xerces/java/branches/xs-1.1-tests/.project -- svn:keywords = Author Date Id Revision - To unsubscribe, e-mail: commits-unsubscr...@xerces.apache.org For additional commands, e-mail: commits-h...@xerces.apache.org
svn commit: r1747634 - /xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/jaxp/datatype/DurationImpl.java
Author: mukulg Date: Fri Jun 10 04:57:39 2016 New Revision: 1747634 URL: http://svn.apache.org/viewvc?rev=1747634&view=rev Log: I am reverting a change I did long time ago to this file. I am restoring the logic in this file, that was in the original revision 906804. I think, the original code that I had changed in this file is not really wrong. Modified: xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/jaxp/datatype/DurationImpl.java Modified: xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/jaxp/datatype/DurationImpl.java URL: http://svn.apache.org/viewvc/xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/jaxp/datatype/DurationImpl.java?rev=1747634&r1=1747633&r2=1747634&view=diff == --- xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/jaxp/datatype/DurationImpl.java (original) +++ xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/jaxp/datatype/DurationImpl.java Fri Jun 10 04:57:39 2016 @@ -420,16 +420,16 @@ class DurationImpl protected DurationImpl(String lexicalRepresentation) throws IllegalArgumentException { // only if I could use the JDK1.4 regular expression - -if (lexicalRepresentation == null) { - throw new NullPointerException(); -} final String s = lexicalRepresentation; boolean positive; int[] idx = new int[1]; int length = s.length(); boolean timeRequired = false; + +if (lexicalRepresentation == null) { + throw new NullPointerException(); +} idx[0] = 0; if (length != idx[0] && s.charAt(idx[0]) == '-') { - To unsubscribe, e-mail: commits-unsubscr...@xerces.apache.org For additional commands, e-mail: commits-h...@xerces.apache.org
svn commit: r1747631 - /xerces/java/trunk/src/org/apache/xerces/jaxp/datatype/DurationImpl.java
Author: mukulg Date: Fri Jun 10 04:44:24 2016 New Revision: 1747631 URL: http://svn.apache.org/viewvc?rev=1747631&view=rev Log: I am reverting a change I did long time ago to this file. I am restoring the logic in this file, that was in the original revision 906803. I think, the original code that I had changed in this file is not really wrong. I started looking at the code in this file, while studying the bug report XERCESJ-1669. Modified: xerces/java/trunk/src/org/apache/xerces/jaxp/datatype/DurationImpl.java Modified: xerces/java/trunk/src/org/apache/xerces/jaxp/datatype/DurationImpl.java URL: http://svn.apache.org/viewvc/xerces/java/trunk/src/org/apache/xerces/jaxp/datatype/DurationImpl.java?rev=1747631&r1=1747630&r2=1747631&view=diff == --- xerces/java/trunk/src/org/apache/xerces/jaxp/datatype/DurationImpl.java (original) +++ xerces/java/trunk/src/org/apache/xerces/jaxp/datatype/DurationImpl.java Fri Jun 10 04:44:24 2016 @@ -420,16 +420,16 @@ class DurationImpl protected DurationImpl(String lexicalRepresentation) throws IllegalArgumentException { // only if I could use the JDK1.4 regular expression - -if (lexicalRepresentation == null) { - throw new NullPointerException(); -} - + final String s = lexicalRepresentation; boolean positive; int[] idx = new int[1]; int length = s.length(); boolean timeRequired = false; + +if (lexicalRepresentation == null) { +throw new NullPointerException(); +} idx[0] = 0; if (length != idx[0] && s.charAt(idx[0]) == '-') { - To unsubscribe, e-mail: commits-unsubscr...@xerces.apache.org For additional commands, e-mail: commits-h...@xerces.apache.org
svn commit: r1685006 - in /xerces/java/branches/xs-1.1-tests: depracateNotice.txt readme.txt
Author: mukulg Date: Fri Jun 12 00:03:16 2015 New Revision: 1685006 URL: http://svn.apache.org/r1685006 Log: I'm again changing the status of these unit tests as it was since their inception. I think these are anyway useful in their current form. i.e these are not intended to be depracated. This was also due to recent motivations felt from XML tool vendors integrating the XML Schema 1.1 branch of Xerces. I apologize if these new changes cause any confusion to the Xerces community. Removed: xerces/java/branches/xs-1.1-tests/depracateNotice.txt Modified: xerces/java/branches/xs-1.1-tests/readme.txt Modified: xerces/java/branches/xs-1.1-tests/readme.txt URL: http://svn.apache.org/viewvc/xerces/java/branches/xs-1.1-tests/readme.txt?rev=1685006&r1=1685005&r2=1685006&view=diff == --- xerces/java/branches/xs-1.1-tests/readme.txt (original) +++ xerces/java/branches/xs-1.1-tests/readme.txt Fri Jun 12 00:03:16 2015 @@ -15,11 +15,11 @@ * limitations under the License. */ -This SVN branch contains unit test cases, related to Xerces XML Schema (XSD) 1.1 functionality. +This SVN branch contains Xerces proprietary unit test cases for the Xerces XML Schema (XSD) 1.1 functionality. -Configuration notes: These unit tests contain a folder "data" parallel to the "src" folder, that contain the -XML and XSD documents needed by the unit tests. Before invoking this unit test suite, the following argument -needs to be provided to the Java VM, +Configuration notes: Minimum JRE needed to run these tests is 1.5. These unit tests contain a folder "data" parallel +to the "src" folder, that contain the XML and XSD documents needed by the unit tests. Before invoking this unit test +suite, the following argument needs to be provided to the Java VM, -Dorg.apache.xerces.tests.dataDir= relative to which the unit tests would retrieve XML and XSD documents. - To unsubscribe, e-mail: commits-unsubscr...@xerces.apache.org For additional commands, e-mail: commits-h...@xerces.apache.org
svn commit: r1677532 - /xerces/java/branches/xs-1.1-tests/depracateNotice.txt
Author: mukulg Date: Mon May 4 07:07:23 2015 New Revision: 1677532 URL: http://svn.apache.org/r1677532 Log: adding a depracate notice file to XercesJ's XML Schema 1.1 implementation unit tests. Added: xerces/java/branches/xs-1.1-tests/depracateNotice.txt (with props) Added: xerces/java/branches/xs-1.1-tests/depracateNotice.txt URL: http://svn.apache.org/viewvc/xerces/java/branches/xs-1.1-tests/depracateNotice.txt?rev=1677532&view=auto == --- xerces/java/branches/xs-1.1-tests/depracateNotice.txt (added) +++ xerces/java/branches/xs-1.1-tests/depracateNotice.txt Mon May 4 07:07:23 2015 @@ -0,0 +1,5 @@ +05/04/2015 : These unit tests are proprietary to Apache Xerces, and are not mandatory conditions to be checked while developing with XercesJ2 XML Schema 1.1 implementation. The most important Apache Xerces XML Schema 1.1 tests are the W3C XML Schema 1.1 tests. + +Due to these aspects, these XML Schema 1.1 unit tests in the folder, xerces/java/branches/xs-1.1-tests are now depracated. This means that, the Apache XercesJ2 developers need not maintain and run these tests as a necessary condition for working with XercesJ2's XML Schema 1.1 implementation. Although good to have, any further deviations from these existing tests will not be monitored and attempted to be rectified. + +This is intended to make contributing to XercesJ2's XML Schema 1.1 implementation easier. \ No newline at end of file Propchange: xerces/java/branches/xs-1.1-tests/depracateNotice.txt -- svn:eol-style = native Propchange: xerces/java/branches/xs-1.1-tests/depracateNotice.txt -- svn:keywords = Author Date Id Revision - To unsubscribe, e-mail: commits-unsubscr...@xerces.apache.org For additional commands, e-mail: commits-h...@xerces.apache.org
svn commit: r1631026 - in /xerces/java/trunk/src/org/apache/xerces/impl: msg/XMLSchemaMessages.properties xs/traversers/XSDAbstractTraverser.java xs/traversers/XSDComplexTypeTraverser.java xs/traverse
Author: mukulg Date: Sat Oct 11 07:30:37 2014 New Revision: 1631026 URL: http://svn.apache.org/r1631026 Log: committing fix for jira issue XERCESJ-1646 on trunk Modified: xerces/java/trunk/src/org/apache/xerces/impl/msg/XMLSchemaMessages.properties xerces/java/trunk/src/org/apache/xerces/impl/xs/traversers/XSDAbstractTraverser.java xerces/java/trunk/src/org/apache/xerces/impl/xs/traversers/XSDComplexTypeTraverser.java xerces/java/trunk/src/org/apache/xerces/impl/xs/traversers/XSDSimpleTypeTraverser.java Modified: xerces/java/trunk/src/org/apache/xerces/impl/msg/XMLSchemaMessages.properties URL: http://svn.apache.org/viewvc/xerces/java/trunk/src/org/apache/xerces/impl/msg/XMLSchemaMessages.properties?rev=1631026&r1=1631025&r2=1631026&view=diff == --- xerces/java/trunk/src/org/apache/xerces/impl/msg/XMLSchemaMessages.properties (original) +++ xerces/java/trunk/src/org/apache/xerces/impl/msg/XMLSchemaMessages.properties Sat Oct 11 07:30:37 2014 @@ -311,6 +311,7 @@ TargetNamespace.2 = TargetNamespace.2: Expecting no namespace, but the schema document has a target namespace of ''{1}''. UndeclaredEntity = UndeclaredEntity: Entity ''{0}'' is not declared. UndeclaredPrefix = UndeclaredPrefix: Cannot resolve ''{0}'' as a QName: the prefix ''{1}'' is not declared. +FacetsContradict = FacetsContradict: For simpleType definition ''{2}'', the enumeration value ''{0}'' contradicts with value of ''{1}'' facet. # JAXP 1.2 schema source property errors Modified: xerces/java/trunk/src/org/apache/xerces/impl/xs/traversers/XSDAbstractTraverser.java URL: http://svn.apache.org/viewvc/xerces/java/trunk/src/org/apache/xerces/impl/xs/traversers/XSDAbstractTraverser.java?rev=1631026&r1=1631025&r2=1631026&view=diff == --- xerces/java/trunk/src/org/apache/xerces/impl/xs/traversers/XSDAbstractTraverser.java (original) +++ xerces/java/trunk/src/org/apache/xerces/impl/xs/traversers/XSDAbstractTraverser.java Sat Oct 11 07:30:37 2014 @@ -23,6 +23,8 @@ import java.util.Vector; import org.apache.xerces.impl.dv.InvalidDatatypeValueException; import org.apache.xerces.impl.dv.XSFacets; import org.apache.xerces.impl.dv.XSSimpleType; +import org.apache.xerces.impl.dv.util.Base64; +import org.apache.xerces.impl.dv.xs.XSSimpleTypeDecl; import org.apache.xerces.impl.validation.ValidationState; import org.apache.xerces.impl.xs.SchemaGrammar; import org.apache.xerces.impl.xs.SchemaSymbols; @@ -41,6 +43,7 @@ import org.apache.xerces.util.SymbolTabl import org.apache.xerces.xni.QName; import org.apache.xerces.xs.XSAttributeUse; import org.apache.xerces.xs.XSObjectList; +import org.apache.xerces.xs.XSSimpleTypeDefinition; import org.apache.xerces.xs.XSTypeDefinition; import org.w3c.dom.Element; @@ -274,6 +277,7 @@ abstract class XSDAbstractTraverser { } FacetInfo traverseFacets(Element content, +XSTypeDefinition typeDef, XSSimpleType baseValidator, XSDocumentInfo schemaDoc) { @@ -288,6 +292,8 @@ abstract class XSDAbstractTraverser { int currentFacet = 0; xsFacets.reset(); boolean seenPattern = false; +Element contextNode = (Element)content.getParentNode(); +boolean hasLengthFacet = false, hasMinLengthFacet = false, hasMaxLengthFacet = false; while (content != null) { // General Attribute Checking Object[] attrs = null; @@ -472,9 +478,11 @@ abstract class XSDAbstractTraverser { switch (currentFacet) { case XSSimpleType.FACET_MINLENGTH: xsFacets.minLength = ((XInt)attrs[XSAttributeChecker.ATTIDX_VALUE]).intValue(); +hasMinLengthFacet = true; break; case XSSimpleType.FACET_MAXLENGTH: xsFacets.maxLength = ((XInt)attrs[XSAttributeChecker.ATTIDX_VALUE]).intValue(); +hasMaxLengthFacet = true; break; case XSSimpleType.FACET_MAXEXCLUSIVE: xsFacets.maxExclusive = (String)attrs[XSAttributeChecker.ATTIDX_VALUE]; @@ -499,6 +507,7 @@ abstract class XSDAbstractTraverser { break; case XSSimpleType.FACET_LENGTH: xsFacets.length = ((XInt)attrs[XSAttributeChecker.ATTIDX_VALUE]).intValue(); +hasLengthFacet = true; break; } @@ -569,9 +578,140 @@ abstract class XSDAbstractTraverser { fPattern.setLength(0); +// check if length, minLength
svn commit: r1631025 - in /xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl: msg/XMLSchemaMessages.properties xs/traversers/XSDAbstractTraverser.java
Author: mukulg Date: Sat Oct 11 07:28:50 2014 New Revision: 1631025 URL: http://svn.apache.org/r1631025 Log: committing fix for jira issue XERCESJ-1646 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/traversers/XSDAbstractTraverser.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=1631025&r1=1631024&r2=1631025&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 Sat Oct 11 07:28:50 2014 @@ -367,6 +367,7 @@ TargetNamespace.2 = TargetNamespace.2: Expecting no namespace, but the schema document has a target namespace of ''{1}''. UndeclaredEntity = UndeclaredEntity: Entity ''{0}'' is not declared. UndeclaredPrefix = UndeclaredPrefix: Cannot resolve ''{0}'' as a QName: the prefix ''{1}'' is not declared. +FacetsContradict = FacetsContradict: For simpleType definition ''{2}'', the enumeration value ''{0}'' contradicts with value of ''{1}'' facet. # JAXP 1.2 schema source property errors Modified: xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/XSDAbstractTraverser.java URL: http://svn.apache.org/viewvc/xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/XSDAbstractTraverser.java?rev=1631025&r1=1631024&r2=1631025&view=diff == --- xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/XSDAbstractTraverser.java (original) +++ xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/XSDAbstractTraverser.java Sat Oct 11 07:28:50 2014 @@ -28,6 +28,7 @@ import org.apache.xerces.impl.Constants; import org.apache.xerces.impl.dv.InvalidDatatypeValueException; import org.apache.xerces.impl.dv.XSFacets; import org.apache.xerces.impl.dv.XSSimpleType; +import org.apache.xerces.impl.dv.util.Base64; import org.apache.xerces.impl.validation.ValidationState; import org.apache.xerces.impl.xs.SchemaGrammar; import org.apache.xerces.impl.xs.SchemaNamespaceSupport; @@ -354,6 +355,8 @@ abstract class XSDAbstractTraverser { int currentFacet = 0; xsFacets.reset(); boolean seenPattern = false; +Element contextNode = (Element)content.getParentNode(); +boolean hasLengthFacet = false, hasMinLengthFacet = false, hasMaxLengthFacet = false; while (content != null) { // General Attribute Checking Object[] attrs = null; @@ -619,9 +622,11 @@ abstract class XSDAbstractTraverser { switch (currentFacet) { case XSSimpleType.FACET_MINLENGTH: xsFacets.minLength = ((XInt)attrs[XSAttributeChecker.ATTIDX_VALUE]).intValue(); +hasMinLengthFacet = true; break; case XSSimpleType.FACET_MAXLENGTH: xsFacets.maxLength = ((XInt)attrs[XSAttributeChecker.ATTIDX_VALUE]).intValue(); +hasMaxLengthFacet = true; break; case XSSimpleType.FACET_MAXEXCLUSIVE: xsFacets.maxExclusive = (String)attrs[XSAttributeChecker.ATTIDX_VALUE]; @@ -646,6 +651,7 @@ abstract class XSDAbstractTraverser { break; case XSSimpleType.FACET_LENGTH: xsFacets.length = ((XInt)attrs[XSAttributeChecker.ATTIDX_VALUE]).intValue(); +hasLengthFacet = true; break; case XSSimpleType.FACET_MAXSCALE: xsFacets.maxScale = ((XInt)attrs[XSAttributeChecker.ATTIDX_VALUE]).intValue(); //XML Schema 1.1 @@ -754,9 +760,122 @@ abstract class XSDAbstractTraverser { } fPattern.setLength(0); + +// check if length, minLength and maxLength facets contradict with enumeration facets. +// currently considers the case when the baseValidator is a built-in type. +if (enumData != null) { + if (hasLengthFacet) { + checkEnumerationAndLengthInconsistency(baseValidator, enumData, contextNode, XS11TypeHelper.getSchemaTypeName(typeDef)); + } + if (hasMinLengthFacet) { + checkEnu
svn commit: r1616506 - /xerces/java/branches/xml-schema-1.1-dev/tools/org.eclipse.wst.xml.xpath2.processor_1.2.0.jar
Author: mukulg Date: Thu Aug 7 15:17:40 2014 New Revision: 1616506 URL: http://svn.apache.org/r1616506 Log: committing a fix for jira issue XERCESJ-1640 Modified: xerces/java/branches/xml-schema-1.1-dev/tools/org.eclipse.wst.xml.xpath2.processor_1.2.0.jar Modified: xerces/java/branches/xml-schema-1.1-dev/tools/org.eclipse.wst.xml.xpath2.processor_1.2.0.jar URL: http://svn.apache.org/viewvc/xerces/java/branches/xml-schema-1.1-dev/tools/org.eclipse.wst.xml.xpath2.processor_1.2.0.jar?rev=1616506&r1=1616505&r2=1616506&view=diff == Binary files - no diff available. - To unsubscribe, e-mail: commits-unsubscr...@xerces.apache.org For additional commands, e-mail: commits-h...@xerces.apache.org
svn commit: r1610123 - in /xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs: SchemaValidatorHelper.java XMLSchemaValidator.java XSValidatorHelper.java
Author: mukulg Date: Sun Jul 13 06:27:43 2014 New Revision: 1610123 URL: http://svn.apache.org/r1610123 Log: committing minor refactoring. doing little renaming of file. Added: xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/XSValidatorHelper.java - copied, changed from r1610113, xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/SchemaValidatorHelper.java Removed: xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/SchemaValidatorHelper.java 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=1610123&r1=1610122&r2=1610123&view=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 Sun Jul 13 06:27:43 2014 @@ -98,7 +98,7 @@ import org.xml.sax.SAXNotSupportedExcept * @author Neeraj Bajaj, Sun Microsystems, inc. * @version $Id$ */ -public class XMLSchemaValidator extends SchemaValidatorHelper implements XMLComponent, XMLDocumentFilter, RevalidationHandler { +public class XMLSchemaValidator extends XSValidatorHelper implements XMLComponent, XMLDocumentFilter, RevalidationHandler { // // XMLComponent methods Copied: xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/XSValidatorHelper.java (from r1610113, xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/SchemaValidatorHelper.java) URL: http://svn.apache.org/viewvc/xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/XSValidatorHelper.java?p2=xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/XSValidatorHelper.java&p1=xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/SchemaValidatorHelper.java&r1=1610113&r2=1610123&rev=1610123&view=diff == --- xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/SchemaValidatorHelper.java (original) +++ xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/XSValidatorHelper.java Sun Jul 13 06:27:43 2014 @@ -83,9 +83,9 @@ import org.apache.xerces.xs.datatypes.Ob * @author Neeraj Bajaj, Sun Microsystems, inc. * @version $Id$ */ -public class SchemaValidatorHelper implements XSElementDeclHelper, FieldActivator { +public class XSValidatorHelper implements XSElementDeclHelper, FieldActivator { -protected SchemaValidatorHelper() { +protected XSValidatorHelper() { // NO OP } @@ -2010,4 +2010,4 @@ public class SchemaValidatorHelper imple return fInheritableAttrList; } -} // SchemaValidatorHelper \ No newline at end of file +} // XSValidatorHelper \ No newline at end of file - To unsubscribe, e-mail: commits-unsubscr...@xerces.apache.org For additional commands, e-mail: commits-h...@xerces.apache.org
svn commit: r1610115 - in /xerces/java/branches/xml-schema-1.1-dev/tests/schema/override: OverrideHandlerTest.java OverrideTransformTest.java
Author: mukulg Date: Sun Jul 13 05:37:39 2014 New Revision: 1610115 URL: http://svn.apache.org/r1610115 Log: seems few compile errors remained in these files, because of earlier refactoring. committing fixes for them. Modified: xerces/java/branches/xml-schema-1.1-dev/tests/schema/override/OverrideHandlerTest.java xerces/java/branches/xml-schema-1.1-dev/tests/schema/override/OverrideTransformTest.java Modified: xerces/java/branches/xml-schema-1.1-dev/tests/schema/override/OverrideHandlerTest.java URL: http://svn.apache.org/viewvc/xerces/java/branches/xml-schema-1.1-dev/tests/schema/override/OverrideHandlerTest.java?rev=1610115&r1=1610114&r2=1610115&view=diff == --- xerces/java/branches/xml-schema-1.1-dev/tests/schema/override/OverrideHandlerTest.java (original) +++ xerces/java/branches/xml-schema-1.1-dev/tests/schema/override/OverrideHandlerTest.java Sun Jul 13 05:37:39 2014 @@ -24,8 +24,8 @@ import java.util.LinkedList; import org.apache.xerces.impl.Constants; import org.apache.xerces.impl.xs.SchemaSymbols; -import org.apache.xerces.impl.xs.traversers.override.DOMOverrideImpl; -import org.apache.xerces.impl.xs.traversers.override.OverrideTransformationManager; +import org.apache.xerces.impl.xs.traversers.DOMOverrideImpl; +import org.apache.xerces.impl.xs.traversers.OverrideTransformationManager; import org.apache.xerces.util.DOMUtil; import org.w3c.dom.Document; import org.w3c.dom.Element; Modified: xerces/java/branches/xml-schema-1.1-dev/tests/schema/override/OverrideTransformTest.java URL: http://svn.apache.org/viewvc/xerces/java/branches/xml-schema-1.1-dev/tests/schema/override/OverrideTransformTest.java?rev=1610115&r1=1610114&r2=1610115&view=diff == --- xerces/java/branches/xml-schema-1.1-dev/tests/schema/override/OverrideTransformTest.java (original) +++ xerces/java/branches/xml-schema-1.1-dev/tests/schema/override/OverrideTransformTest.java Sun Jul 13 05:37:39 2014 @@ -18,9 +18,9 @@ package schema.override; import org.apache.xerces.impl.Constants; -import org.apache.xerces.impl.xs.traversers.override.DOMOverrideImpl; -import org.apache.xerces.impl.xs.traversers.override.OverrideTransformException; -import org.apache.xerces.impl.xs.traversers.override.OverrideTransformer; +import org.apache.xerces.impl.xs.traversers.DOMOverrideImpl; +import org.apache.xerces.impl.xs.traversers.OverrideTransformException; +import org.apache.xerces.impl.xs.traversers.OverrideTransformer; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.Node; - To unsubscribe, e-mail: commits-unsubscr...@xerces.apache.org For additional commands, e-mail: commits-h...@xerces.apache.org
svn commit: r1594899 - /xerces/java/branches/xml-schema-1.1-dev/tools/org.eclipse.wst.xml.xpath2.processor_1.2.0.jar
Author: mukulg Date: Thu May 15 12:36:05 2014 New Revision: 1594899 URL: http://svn.apache.org/r1594899 Log: committing fix for jira issue XERCESJ-1633 Modified: xerces/java/branches/xml-schema-1.1-dev/tools/org.eclipse.wst.xml.xpath2.processor_1.2.0.jar Modified: xerces/java/branches/xml-schema-1.1-dev/tools/org.eclipse.wst.xml.xpath2.processor_1.2.0.jar URL: http://svn.apache.org/viewvc/xerces/java/branches/xml-schema-1.1-dev/tools/org.eclipse.wst.xml.xpath2.processor_1.2.0.jar?rev=1594899&r1=1594898&r2=1594899&view=diff == Binary files - no diff available. - To unsubscribe, e-mail: commits-unsubscr...@xerces.apache.org For additional commands, e-mail: commits-h...@xerces.apache.org
svn commit: r1594523 - /xerces/java/branches/xs-1.1-tests/data/xpath/floating_point.xsd
Author: mukulg Date: Wed May 14 08:56:57 2014 New Revision: 1594523 URL: http://svn.apache.org/r1594523 Log: committing a minor correction to test case file. this was perhaps incorrectly changed earlier. Modified: xerces/java/branches/xs-1.1-tests/data/xpath/floating_point.xsd Modified: xerces/java/branches/xs-1.1-tests/data/xpath/floating_point.xsd URL: http://svn.apache.org/viewvc/xerces/java/branches/xs-1.1-tests/data/xpath/floating_point.xsd?rev=1594523&r1=1594522&r2=1594523&view=diff == --- xerces/java/branches/xs-1.1-tests/data/xpath/floating_point.xsd (original) +++ xerces/java/branches/xs-1.1-tests/data/xpath/floating_point.xsd Wed May 14 08:56:57 2014 @@ -8,9 +8,9 @@ - - - + + + - To unsubscribe, e-mail: commits-unsubscr...@xerces.apache.org For additional commands, e-mail: commits-h...@xerces.apache.org
svn commit: r1594522 - /xerces/java/branches/xml-schema-1.1-dev/tools/org.eclipse.wst.xml.xpath2.processor_1.2.0.jar
Author: mukulg Date: Wed May 14 08:55:41 2014 New Revision: 1594522 URL: http://svn.apache.org/r1594522 Log: committing a new psychopath jar, with minor cleanup of source code Modified: xerces/java/branches/xml-schema-1.1-dev/tools/org.eclipse.wst.xml.xpath2.processor_1.2.0.jar Modified: xerces/java/branches/xml-schema-1.1-dev/tools/org.eclipse.wst.xml.xpath2.processor_1.2.0.jar URL: http://svn.apache.org/viewvc/xerces/java/branches/xml-schema-1.1-dev/tools/org.eclipse.wst.xml.xpath2.processor_1.2.0.jar?rev=1594522&r1=1594521&r2=1594522&view=diff == Binary files - no diff available. - To unsubscribe, e-mail: commits-unsubscr...@xerces.apache.org For additional commands, e-mail: commits-h...@xerces.apache.org
svn commit: r1587245 - /xerces/java/branches/xml-schema-1.1-dev/tools/org.eclipse.wst.xml.xpath2.processor_1.2.0.jar
Author: mukulg Date: Mon Apr 14 16:15:36 2014 New Revision: 1587245 URL: http://svn.apache.org/r1587245 Log: committing fix for jira issue XERCESJ-1623. new psychopath xpath2 jar is provided. Modified: xerces/java/branches/xml-schema-1.1-dev/tools/org.eclipse.wst.xml.xpath2.processor_1.2.0.jar Modified: xerces/java/branches/xml-schema-1.1-dev/tools/org.eclipse.wst.xml.xpath2.processor_1.2.0.jar URL: http://svn.apache.org/viewvc/xerces/java/branches/xml-schema-1.1-dev/tools/org.eclipse.wst.xml.xpath2.processor_1.2.0.jar?rev=1587245&r1=1587244&r2=1587245&view=diff == Binary files - no diff available. - To unsubscribe, e-mail: commits-unsubscr...@xerces.apache.org For additional commands, e-mail: commits-h...@xerces.apache.org
svn commit: r1587248 - /xerces/java/branches/xs-1.1-tests/data/xpath/floating_point.xsd
Author: mukulg Date: Mon Apr 14 16:18:45 2014 New Revision: 1587248 URL: http://svn.apache.org/r1587248 Log: committing a minor change to a test file Modified: xerces/java/branches/xs-1.1-tests/data/xpath/floating_point.xsd Modified: xerces/java/branches/xs-1.1-tests/data/xpath/floating_point.xsd URL: http://svn.apache.org/viewvc/xerces/java/branches/xs-1.1-tests/data/xpath/floating_point.xsd?rev=1587248&r1=1587247&r2=1587248&view=diff == --- xerces/java/branches/xs-1.1-tests/data/xpath/floating_point.xsd (original) +++ xerces/java/branches/xs-1.1-tests/data/xpath/floating_point.xsd Mon Apr 14 16:18:45 2014 @@ -8,9 +8,9 @@ - - - + + + - To unsubscribe, e-mail: commits-unsubscr...@xerces.apache.org For additional commands, e-mail: commits-h...@xerces.apache.org
svn commit: r1581385 - /xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/opti/SchemaDOMParser.java
Author: mukulg Date: Tue Mar 25 15:53:03 2014 New Revision: 1581385 URL: http://svn.apache.org/r1581385 Log: committing fix for jira issue XERCESJ-1628 Modified: xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/opti/SchemaDOMParser.java Modified: xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/opti/SchemaDOMParser.java URL: http://svn.apache.org/viewvc/xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/opti/SchemaDOMParser.java?rev=1581385&r1=1581384&r2=1581385&view=diff == --- xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/opti/SchemaDOMParser.java (original) +++ xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/opti/SchemaDOMParser.java Tue Mar 25 15:53:03 2014 @@ -633,7 +633,7 @@ public class SchemaDOMParser extends Def } catch (NumberFormatException nfe) { fErrorReporter.reportError(XSMessageFormatter.SCHEMA_DOMAIN, "s4s-att-invalid-value", - new Object[] {element.localpart, attrLocalName, nfe.getMessage()}, XMLErrorReporter.SEVERITY_ERROR); + new Object[] {element.localpart, attrLocalName, attrValue}, XMLErrorReporter.SEVERITY_ERROR); } } else if (SchemaSymbols.ATT_MAXVERSION.equals(attrLocalName)) { @@ -642,7 +642,7 @@ public class SchemaDOMParser extends Def } catch (NumberFormatException nfe) { fErrorReporter.reportError(XSMessageFormatter.SCHEMA_DOMAIN, "s4s-att-invalid-value", - new Object[] {element.localpart, attrLocalName, nfe.getMessage()}, XMLErrorReporter.SEVERITY_ERROR); + new Object[] {element.localpart, attrLocalName, attrValue}, XMLErrorReporter.SEVERITY_ERROR); } } else if (SchemaSymbols.ATT_TYPEAVAILABLE.equals(attrLocalName)) { - To unsubscribe, e-mail: commits-unsubscr...@xerces.apache.org For additional commands, e-mail: commits-h...@xerces.apache.org
svn commit: r1580136 - /xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/XSDAbstractTraverser.java
Author: mukulg Date: Sat Mar 22 03:18:36 2014 New Revision: 1580136 URL: http://svn.apache.org/r1580136 Log: committing fix for jira issue XERCESJ-1625 Modified: xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/XSDAbstractTraverser.java Modified: xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/XSDAbstractTraverser.java URL: http://svn.apache.org/viewvc/xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/XSDAbstractTraverser.java?rev=1580136&r1=1580135&r2=1580136&view=diff == --- xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/XSDAbstractTraverser.java (original) +++ xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/XSDAbstractTraverser.java Sat Mar 22 03:18:36 2014 @@ -578,7 +578,7 @@ abstract class XSDAbstractTraverser { else if (facet.equals(SchemaSymbols.ELT_MINSCALE)) { //XML Schema 1.1 currentFacet = XSSimpleType.FACET_MINSCALE; } -else if (facet.equals(SchemaSymbols.ELT_EXPLICITTIMEZONE)){ +else if (facet.equals(SchemaSymbols.ELT_EXPLICITTIMEZONE) && fSchemaHandler.fSchemaVersion == Constants.SCHEMA_VERSION_1_1){ //XML Schema 1.1 currentFacet = XSSimpleType.FACET_EXPLICITTIMEZONE; } else { - To unsubscribe, e-mail: commits-unsubscr...@xerces.apache.org For additional commands, e-mail: commits-h...@xerces.apache.org
svn commit: r1565084 - in /xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers: DOMOverrideImpl.java OverrideTransformException.java OverrideTransformationManager.java Ove
Author: mukulg Date: Thu Feb 6 05:39:07 2014 New Revision: 1565084 URL: http://svn.apache.org/r1565084 Log: i've been thinking on this refactoring since quite a bit of time. i'm moving the traverser code to the usual java package. this doesn't change the correctness of current xerces implementation. Added: xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/DOMOverrideImpl.java - copied, changed from r1565081, xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/override/DOMOverrideImpl.java xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/OverrideTransformException.java - copied, changed from r1565081, xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/override/OverrideTransformException.java xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/OverrideTransformationManager.java - copied, changed from r1565081, xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/override/OverrideTransformationManager.java xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/OverrideTransformer.java - copied, changed from r1565081, xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/override/OverrideTransformer.java Removed: xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/override/ Modified: xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/XSDHandler.java Copied: xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/DOMOverrideImpl.java (from r1565081, xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/override/DOMOverrideImpl.java) URL: http://svn.apache.org/viewvc/xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/DOMOverrideImpl.java?p2=xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/DOMOverrideImpl.java&p1=xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/override/DOMOverrideImpl.java&r1=1565081&r2=1565084&rev=1565084&view=diff == --- xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/override/DOMOverrideImpl.java (original) +++ xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/DOMOverrideImpl.java Thu Feb 6 05:39:07 2014 @@ -15,14 +15,13 @@ * limitations under the License. */ -package org.apache.xerces.impl.xs.traversers.override; +package org.apache.xerces.impl.xs.traversers; import java.util.ArrayList; import java.util.HashMap; import java.util.Iterator; import org.apache.xerces.impl.xs.SchemaSymbols; -import org.apache.xerces.impl.xs.traversers.XSDHandler; import org.apache.xerces.util.DOMUtil; import org.w3c.dom.DOMImplementation; import org.w3c.dom.Document; Copied: xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/OverrideTransformException.java (from r1565081, xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/override/OverrideTransformException.java) URL: http://svn.apache.org/viewvc/xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/OverrideTransformException.java?p2=xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/OverrideTransformException.java&p1=xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/override/OverrideTransformException.java&r1=1565081&r2=1565084&rev=1565084&view=diff == --- xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/override/OverrideTransformException.java (original) +++ xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/OverrideTransformException.java Thu Feb 6 05:39:07 2014 @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.xerces.impl.xs.traversers.override; +package org.apache.xerces.impl.xs.traversers; /** * @xerces.internal Copied: xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/OverrideTransformationManager.java (from r1565081, xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/override/OverrideTransformationManager.java) URL: http://svn.apache.org/viewvc/xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/OverrideTransformationManager.java?p2=xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/OverrideTransformationManager.java&p1=xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/x
svn commit: r1564227 - /xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/XSDHandler.java
Author: mukulg Date: Tue Feb 4 08:42:39 2014 New Revision: 1564227 URL: http://svn.apache.org/r1564227 Log: doing minor refactoring to XSD 1.1 XSDHandler component, to reduce complexity of code. currently haven't done this on XSD 1.0 code base. Modified: xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/XSDHandler.java Modified: xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/XSDHandler.java URL: http://svn.apache.org/viewvc/xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/XSDHandler.java?rev=1564227&r1=1564226&r2=1564227&view=diff == --- xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/XSDHandler.java (original) +++ xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/XSDHandler.java Tue Feb 4 08:42:39 2014 @@ -1601,73 +1601,11 @@ public class XSDHandler { boolean sawAnnotation = false; // traverse this schema's global decls -for (Element globalComp = -DOMUtil.getFirstVisibleChildElement(currRoot, fHiddenNodes); -globalComp != null; -globalComp = DOMUtil.getNextVisibleSiblingElement(globalComp, fHiddenNodes)) { -DOMUtil.setHidden(globalComp, fHiddenNodes); -String componentType = DOMUtil.getLocalName(globalComp); -// includes and imports will not show up here! -if (DOMUtil.getLocalName(globalComp).equals(SchemaSymbols.ELT_REDEFINE)) { -// use the namespace decls for the redefine, instead of for the parent - currSchemaDoc.backupNSSupport((SchemaNamespaceSupport)fRedefine2NSSupport.get(globalComp)); -for (Element redefinedComp = DOMUtil.getFirstVisibleChildElement(globalComp, fHiddenNodes); -redefinedComp != null; -redefinedComp = DOMUtil.getNextVisibleSiblingElement(redefinedComp, fHiddenNodes)) { -String redefinedComponentType = DOMUtil.getLocalName(redefinedComp); -DOMUtil.setHidden(redefinedComp, fHiddenNodes); -if (redefinedComponentType.equals(SchemaSymbols.ELT_ATTRIBUTEGROUP)) { - fAttributeGroupTraverser.traverseGlobal(redefinedComp, currSchemaDoc, currSG); -} -else if (redefinedComponentType.equals(SchemaSymbols.ELT_COMPLEXTYPE)) { - fComplexTypeTraverser.traverseGlobal(redefinedComp, currSchemaDoc, currSG); -} -else if (redefinedComponentType.equals(SchemaSymbols.ELT_GROUP)) { -fGroupTraverser.traverseGlobal(redefinedComp, currSchemaDoc, currSG); -} -else if (redefinedComponentType.equals(SchemaSymbols.ELT_SIMPLETYPE)) { -fSimpleTypeTraverser.traverseGlobal(redefinedComp, currSchemaDoc, currSG); -} -// annotations will have been processed already; this is now -// unnecessary -//else if (redefinedComponentType.equals(SchemaSymbols.ELT_ANNOTATION)) { -// fElementTraverser.traverseAnnotationDecl(redefinedComp, null, true, currSchemaDoc); -//} -else { -reportSchemaError("s4s-elt-must-match.1", new Object [] {DOMUtil.getLocalName(globalComp), "(annotation | (simpleType | complexType | group | attributeGroup))*", redefinedComponentType}, redefinedComp); -} -} // end march through children -currSchemaDoc.restoreNSSupport(); -} -else if (componentType.equals(SchemaSymbols.ELT_ATTRIBUTE)) { -fAttributeTraverser.traverseGlobal(globalComp, currSchemaDoc, currSG); -} -else if (componentType.equals(SchemaSymbols.ELT_ATTRIBUTEGROUP)) { -fAttributeGroupTraverser.traverseGlobal(globalComp, currSchemaDoc, currSG); -} -else if (componentType.equals(SchemaSymbols.ELT_COMPLEXTYPE)) { -fComplexTypeTraverser.traverseGlobal(globalComp, currSchemaDoc, currSG); -} -else if (componentType.equals(SchemaSymbols.ELT_ELEMENT)) { -fElementTraverser.traverseGlobal(globalComp, currSchemaDoc, currSG); -} -else if (componentType.equals(SchemaSymbols.ELT_GROUP)) { -fGroupTraverser.traverseGlobal(globalComp, currSchemaDoc, currSG); -
svn commit: r1507769 - /xerces/java/branches/xs-1.1-tests/src/org/apache/xerces/tests/PSVITests.java
Author: mukulg Date: Sun Jul 28 06:20:15 2013 New Revision: 1507769 URL: http://svn.apache.org/r1507769 Log: updating a xsd 1.1 test case file, due to an earlier change in class name Modified: xerces/java/branches/xs-1.1-tests/src/org/apache/xerces/tests/PSVITests.java Modified: xerces/java/branches/xs-1.1-tests/src/org/apache/xerces/tests/PSVITests.java URL: http://svn.apache.org/viewvc/xerces/java/branches/xs-1.1-tests/src/org/apache/xerces/tests/PSVITests.java?rev=1507769&r1=1507768&r2=1507769&view=diff == --- xerces/java/branches/xs-1.1-tests/src/org/apache/xerces/tests/PSVITests.java (original) +++ xerces/java/branches/xs-1.1-tests/src/org/apache/xerces/tests/PSVITests.java Sun Jul 28 06:20:15 2013 @@ -30,7 +30,7 @@ import javax.xml.validation.Validator; import org.apache.xerces.dom.PSVIDocumentImpl; import org.apache.xerces.impl.dv.xs.XSSimpleTypeDecl; import org.apache.xerces.impl.xs.assertion.XSAssert; -import org.apache.xerces.impl.xs.util.XSTypeHelper; +import org.apache.xerces.impl.xs.util.XS11TypeHelper; import org.apache.xerces.xs.AttributePSVI; import org.apache.xerces.xs.ElementPSVI; import org.apache.xerces.xs.PSVIProvider; @@ -213,7 +213,7 @@ public class PSVITests extends XercesAbs ObjectList failedAssertions = getFailedAssertions(resultDoc, "x"); assertTrue(failedAssertions.getLength() == 1); XSAssert failedAssert = (XSAssert) failedAssertions.item(0); -assertEquals("#AnonType_x", XSTypeHelper.getSchemaTypeName(failedAssert.getTypeDefinition())); +assertEquals("#AnonType_x", XS11TypeHelper.getSchemaTypeName(failedAssert.getTypeDefinition())); assertEquals("a = 'hello'", failedAssert.getTest().getXPathStr()); } catch(Exception ex) { assertTrue(false); @@ -233,7 +233,7 @@ public class PSVITests extends XercesAbs ObjectList failedAssertions = getFailedAssertions(resultDoc, "x"); assertTrue(failedAssertions.getLength() == 1); XSAssert failedAssert = (XSAssert) failedAssertions.item(0); -assertEquals("MY_INT", XSTypeHelper.getSchemaTypeName(failedAssert.getTypeDefinition())); +assertEquals("MY_INT", XS11TypeHelper.getSchemaTypeName(failedAssert.getTypeDefinition())); assertEquals("$value mod 2 = 0", failedAssert.getTest().getXPathStr()); } catch(Exception ex) { assertTrue(false); @@ -253,10 +253,10 @@ public class PSVITests extends XercesAbs ObjectList failedAssertions = getFailedAssertions(resultDoc, "x"); assertTrue(failedAssertions.getLength() == 2); XSAssert failedAssert1 = (XSAssert) failedAssertions.item(0); -assertEquals("MY_INT", XSTypeHelper.getSchemaTypeName(failedAssert1.getTypeDefinition())); +assertEquals("MY_INT", XS11TypeHelper.getSchemaTypeName(failedAssert1.getTypeDefinition())); assertEquals("($value + 1) mod 2 = 0", failedAssert1.getTest().getXPathStr()); XSAssert failedAssert2 = (XSAssert) failedAssertions.item(1); -assertEquals("MY_INT", XSTypeHelper.getSchemaTypeName(failedAssert2.getTypeDefinition())); +assertEquals("MY_INT", XS11TypeHelper.getSchemaTypeName(failedAssert2.getTypeDefinition())); assertEquals("($value + 3) mod 2 = 0", failedAssert2.getTest().getXPathStr()); } catch(Exception ex) { assertTrue(false); @@ -276,7 +276,7 @@ public class PSVITests extends XercesAbs ObjectList failedAssertions = getFailedAssertions(resultDoc, "x"); assertTrue(failedAssertions.getLength() == 1); XSAssert failedAssert = (XSAssert) failedAssertions.item(0); -assertEquals("X_TYPE", XSTypeHelper.getSchemaTypeName(failedAssert.getTypeDefinition())); +assertEquals("X_TYPE", XS11TypeHelper.getSchemaTypeName(failedAssert.getTypeDefinition())); assertEquals("a", failedAssert.getTest().getXPathStr()); } catch(Exception ex) { assertTrue(false); @@ -296,7 +296,7 @@ public class PSVITests extends XercesAbs v.validate(new DOMSource(getDomDocument(xmlfile)), new DOMResult(resultDoc)); XSTypeAlternative typeAlternative = getTypeAlternative(resultDoc, "x"); assertEquals("@a = 1", typeAlternative.getTestStr()); -assertEquals("A_TYPE", XSTypeHelper.getSchemaTypeName(typeAlternative.getTypeDefinition())); +assertEquals("A_TYPE", X
svn commit: r1503577 - /xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/assertion/XMLAssertHandler.java
Author: mukulg Date: Tue Jul 16 07:18:35 2013 New Revision: 1503577 URL: http://svn.apache.org/r1503577 Log: specifying a minor change to authorship of a class. the name specified first, did contribution earlier to the class. Modified: xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/assertion/XMLAssertHandler.java Modified: xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/assertion/XMLAssertHandler.java URL: http://svn.apache.org/viewvc/xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/assertion/XMLAssertHandler.java?rev=1503577&r1=1503576&r2=1503577&view=diff == --- xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/assertion/XMLAssertHandler.java (original) +++ xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/assertion/XMLAssertHandler.java Tue Jul 16 07:18:35 2013 @@ -30,8 +30,8 @@ import org.apache.xerces.xni.XMLString; * * @xerces.internal * - * @author Mukul Gandhi, IBM * @author Ken Cai, IBM + * @author Mukul Gandhi, IBM * * @version $Id$ */ - To unsubscribe, e-mail: commits-unsubscr...@xerces.apache.org For additional commands, e-mail: commits-h...@xerces.apache.org
svn commit: r1493456 - in /xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl: msg/XMLSchemaMessages.properties xs/traversers/XSDAbstractTraverser.java
Author: mukulg Date: Sun Jun 16 03:51:58 2013 New Revision: 1493456 URL: http://svn.apache.org/r1493456 Log: committing fix for jira issue XERCESJ-1615 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/traversers/XSDAbstractTraverser.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=1493456&r1=1493455&r2=1493456&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 Sun Jun 16 03:51:58 2013 @@ -137,6 +137,7 @@ 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 is present and the actual value of its mode [attribute] is not 'none', then there must be an among the [children] of . +src-ct.7 = src-ct.7: Attribute group ''{0}'' is declared more than once within a complex type definition ''{1}''. src-ct11.3 = src-ct11.3: Complex Type Definition Representation Error for type ''{0}''. If is present and has mode = 'none', then there must not be an among the [children] of . src-ct11.4 = src-ct11.4: Complex Type Definition Representation Error for type ''{0}''. If the alternative is chosen and the 'mixed' attribute is present on both and , then the actual values of those attributes must be the same. src-element.1 = src-element.1: The properties ''default'' and ''fixed'' cannot both be present in element declaration ''{0}''. Use only one of them. @@ -372,4 +373,4 @@ jaxp12-schema-source-type.1 = The ''http://java.sun.com/xml/jaxp/properties/schemaSource'' property cannot have a value of type ''{0}''. Possible types of the value supported are String, File, InputStream, InputSource or an array of these types. jaxp12-schema-source-type.2 = The ''http://java.sun.com/xml/jaxp/properties/schemaSource'' property cannot have an array value of type ''{0}''. Possible types of the array supported are Object, String, File, InputStream and InputSource. jaxp12-schema-source-ns = When using an array of Objects as the value of the 'http://java.sun.com/xml/jaxp/properties/schemaSource' property, it is illegal to have two schemas that share the same target namespace. - + Modified: xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/XSDAbstractTraverser.java URL: http://svn.apache.org/viewvc/xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/XSDAbstractTraverser.java?rev=1493456&r1=1493455&r2=1493456&view=diff == --- xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/XSDAbstractTraverser.java (original) +++ xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/XSDAbstractTraverser.java Sun Jun 16 03:51:58 2013 @@ -17,7 +17,11 @@ package org.apache.xerces.impl.xs.traversers; +import java.util.HashMap; +import java.util.Iterator; import java.util.Locale; +import java.util.Map; +import java.util.Set; import java.util.Vector; import org.apache.xerces.impl.Constants; @@ -37,8 +41,8 @@ import org.apache.xerces.impl.xs.XSWildc import org.apache.xerces.impl.xs.assertion.Test; import org.apache.xerces.impl.xs.assertion.XSAssertImpl; import org.apache.xerces.impl.xs.util.XInt; -import org.apache.xerces.impl.xs.util.XSObjectListImpl; import org.apache.xerces.impl.xs.util.XS11TypeHelper; +import org.apache.xerces.impl.xs.util.XSObjectListImpl; import org.apache.xerces.util.DOMUtil; import org.apache.xerces.util.NamespaceSupport; import org.apache.xerces.util.SymbolTable; @@ -789,6 +793,7 @@ abstract class XSDAbstractTraverser { XSAttributeUseImpl tempAttrUse = null; XSAttributeUse otherUse = null; String childName; +Map attr
svn commit: r1479074 - in /xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs: XMLSchemaValidator.java XSDTypeAlternativeValidator.java
Author: mukulg Date: Sat May 4 11:02:02 2013 New Revision: 1479074 URL: http://svn.apache.org/r1479074 Log: committing a minor change, similar to the previous commit 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/XSDTypeAlternativeValidator.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=1479074&r1=1479073&r2=1479074&view=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 Sat May 4 11:02:02 2013 @@ -5139,16 +5139,24 @@ public class XMLSchemaValidator return fIsAssertProcessingNeededForSTUnionElem; } -void setIsAssertProcessingNeededForSTUnionElem(boolean fIsAssertProcessingNeededForSTUnionElem) { -this.fIsAssertProcessingNeededForSTUnionElem = fIsAssertProcessingNeededForSTUnionElem; +void setIsAssertProcessingNeededForSTUnionElem(boolean isAssertProcessingNeededForSTUnionElem) { +this.fIsAssertProcessingNeededForSTUnionElem = isAssertProcessingNeededForSTUnionElem; } List getIsAssertProcessingNeededForSTUnionAttrs() { return fIsAssertProcessingNeededForSTUnionAttrs; } -void setIsAssertProcessingNeededForSTUnionAttrs(List fIsAssertProcessingNeededForSTUnionAttrs) { -this.fIsAssertProcessingNeededForSTUnionAttrs = fIsAssertProcessingNeededForSTUnionAttrs; +void setIsAssertProcessingNeededForSTUnionAttrs(List isAssertProcessingNeededForSTUnionAttrs) { +this.fIsAssertProcessingNeededForSTUnionAttrs = isAssertProcessingNeededForSTUnionAttrs; +} + +Vector getInheritableAttrList() { +return fInheritableAttrList; +} + +void setInheritableAttrList(Vector inheritableAttrList) { +this.fInheritableAttrList = inheritableAttrList; } } // class XMLSchemaValidator Modified: xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/XSDTypeAlternativeValidator.java URL: http://svn.apache.org/viewvc/xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/XSDTypeAlternativeValidator.java?rev=1479074&r1=1479073&r2=1479074&view=diff == --- xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/XSDTypeAlternativeValidator.java (original) +++ xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/XSDTypeAlternativeValidator.java Sat May 4 11:02:02 2013 @@ -149,7 +149,7 @@ public class XSDTypeAlternativeValidator XSAttributeDeclaration attrDecl = (XSAttributeDeclaration) attrUse.getAttrDeclaration(); Augmentations attrAugs = attributes.getAugmentations(attrDecl.getNamespace(), attrDecl.getName()); if (attrAugs != null) { - fXmlSchemaValidator.fInheritableAttrList.add((AttributePSVI)attrAugs.getItem(Constants.ATTRIBUTE_PSVI)); + (fXmlSchemaValidator.getInheritableAttrList()).add((AttributePSVI)attrAugs.getItem(Constants.ATTRIBUTE_PSVI)); } } } @@ -163,11 +163,12 @@ public class XSDTypeAlternativeValidator ObjectList getInheritedAttributesForPSVI() { ObjectList inheritedAttributesList = null; +Vector inheritableAttrList = fXmlSchemaValidator.getInheritableAttrList(); -if (fXmlSchemaValidator.fInheritableAttrList.size() > 0) { -Object[] inheritedAttributesArray = new Object[fXmlSchemaValidator.fInheritableAttrList.size()]; -for (int inhrAttrIdx = 0; inhrAttrIdx < fXmlSchemaValidator.fInheritableAttrList.size(); inhrAttrIdx++) { -inheritedAttributesArray[inhrAttrIdx] = fXmlSchemaValidator.fInheritableAttrList.get(inhrAttrIdx); +if (inheritableAttrList.size() > 0) { +Object[] inheritedAttributesArray = new Object[inheritableAttrList.size()]; +for (int inhrAttrIdx = 0; inhrAttrIdx < inheritableAttrList.size(); inhrAttrIdx++) { +inheritedAttributesArray[inhrAttrIdx] = inheritableAttrList.get(inhrAttrIdx); } inheritedAttributesList = new ObjectListImpl(inheritedAttributesArray, inheritedAttributesArray.length); } - To unsubscribe, e-mail: commits-unsubscr...@xerces.apache.org For additional commands, e-mail: commits-h...@xerces.apache.org
svn commit: r1479073 - in /xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs: XMLSchemaValidator.java XSDAssertionValidator.java XSDTypeAlternativeValidator.java
Author: mukulg Date: Sat May 4 10:40:46 2013 New Revision: 1479073 URL: http://svn.apache.org/r1479073 Log: doing little refactoring of schema 1.1 code base. moving certain functions to CTA and assertion's own classes, and adding few getters and setters to support this refactoring. 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/XSDAssertionValidator.java xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/XSDTypeAlternativeValidator.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=1479073&r1=1479072&r2=1479073&view=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 Sat May 4 10:40:46 2013 @@ -54,9 +54,7 @@ import org.apache.xerces.impl.xs.identit import org.apache.xerces.impl.xs.models.CMBuilder; import org.apache.xerces.impl.xs.models.CMNodeFactory; import org.apache.xerces.impl.xs.models.XSCMValidator; -import org.apache.xerces.impl.xs.util.ObjectListImpl; import org.apache.xerces.impl.xs.util.XS11TypeHelper; -import org.apache.xerces.impl.xs.util.XSObjectListImpl; import org.apache.xerces.util.AugmentationsImpl; import org.apache.xerces.util.IntStack; import org.apache.xerces.util.SymbolTable; @@ -87,11 +85,8 @@ import org.apache.xerces.xs.AttributePSV import org.apache.xerces.xs.ElementPSVI; import org.apache.xerces.xs.ShortList; import org.apache.xerces.xs.StringList; -import org.apache.xerces.xs.XSAttributeDeclaration; -import org.apache.xerces.xs.XSAttributeUse; import org.apache.xerces.xs.XSConstants; import org.apache.xerces.xs.XSObjectList; -import org.apache.xerces.xs.XSSimpleTypeDefinition; import org.apache.xerces.xs.XSTypeAlternative; import org.apache.xerces.xs.XSTypeDefinition; import org.apache.xerces.xs.datatypes.ObjectList; @@ -1414,17 +1409,17 @@ public class XMLSchemaValidator // variable to track validity of element content for simpleType->union. if a member type of union in XSD namespace can // successfully validate an element instance value, we don't process assertions for such union types in downstream checks. i.e., // an element instance known to be valid doesn't require assertion evaluations. -private boolean fIsAssertProcessingNeededForSTUnionElem = true; - +boolean fIsAssertProcessingNeededForSTUnionElem = true; + // variable with similar semantics as fIsAssertProcessingNeededForSTUnionElem, but for attributes of an element instance (i.e., // all attributes of one element instance). -private List fIsAssertProcessingNeededForSTUnionAttrs = new ArrayList(); +List fIsAssertProcessingNeededForSTUnionAttrs = new ArrayList(); // 'type alternative' validator subcomponent private XSDTypeAlternativeValidator fTypeAlternativeValidator = null; // a Vector list storing inheritable attributes -private Vector fInheritableAttrList = new Vector(); +Vector fInheritableAttrList = new Vector(); // a Stack storing inheritable attribute count for the elements private IntStack fInhrAttrCountStack = new IntStack(); @@ -1439,7 +1434,7 @@ public class XMLSchemaValidator fState4ApplyDefault.setFacetChecking(false); fSchemaVersion = fSchemaLoader.getSchemaVersion(); fXSConstraints = fSchemaLoader.getXSConstraints(); -fTypeAlternativeValidator = new XSDTypeAlternativeValidator(); +fTypeAlternativeValidator = new XSDTypeAlternativeValidator(this); } // () /* @@ -2564,7 +2559,7 @@ public class XMLSchemaValidator // assert check for union types, for attributes if (fSchemaVersion == Constants.SCHEMA_VERSION_1_1) { - extraCheckForSTUnionAssertsAttrs(attributes); +fAssertionValidator.extraCheckForSTUnionAssertsAttrs(attributes); } // Set ID scope to parent @@ -2598,7 +2593,7 @@ public class XMLSchemaValidator fCurrentPSVI.fTypeAlternative = fTypeAlternative; // PSVI: add inherited attributes fInhrAttrCountStack.push(fInheritableAttrList.size()); - fCurrentPSVI.fInheritedAttributes = getInheritedAttributesForPSVI(); + fCurrentPSVI.fInheritedAttributes = fTypeAlternativeValidator.getInheritedAttributesForPSVI(); // PSVI: add failed assertions fCurrentPS
svn commit: r1467171 - /xerces/java/branches/xml-schema-1.1-dev/docs/faq-xs.xml
Author: mukulg Date: Fri Apr 12 06:32:27 2013 New Revision: 1467171 URL: http://svn.apache.org/r1467171 Log: committing few minor improvements to xerces xsd 1.1 docs Modified: xerces/java/branches/xml-schema-1.1-dev/docs/faq-xs.xml Modified: xerces/java/branches/xml-schema-1.1-dev/docs/faq-xs.xml URL: http://svn.apache.org/viewvc/xerces/java/branches/xml-schema-1.1-dev/docs/faq-xs.xml?rev=1467171&r1=1467170&r2=1467171&view=diff == --- xerces/java/branches/xml-schema-1.1-dev/docs/faq-xs.xml (original) +++ xerces/java/branches/xml-schema-1.1-dev/docs/faq-xs.xml Fri Apr 12 06:32:27 2013 @@ -90,7 +90,7 @@ v.validate(instanceDocument); - How Xerces-J uses an XPath 2.0 engine for XML Schema 1.1 assertions and CTAs? + How an XPath 2.0 engine is used for XML Schema 1.1 assertions and CTAs? XML Schema 1.1 assertions and CTAs require an XPath processor during evaluation. For XSD 1.1 assertions, full http://www.w3.org/TR/xpath20/";>XPath 2.0 support is required. For XSD 1.1 CTAs the XSD schema engines can @@ -102,33 +102,26 @@ v.validate(instanceDocument); (for XSD 1.1 assertions, and optionally for CTAs), Xerces-J uses the http://wiki.eclipse.org/PsychoPathXPathProcessor";>Eclipse/PsychoPath XPath 2.0 engine. Xerces-J does bundle along a PsychoPath XPath 2.0 jar (which requires JDK 1.4 or later). - - Users should be aware that more recent releases of the Eclipse PsychoPath - XPath engine may have better conformance to the W3C XPath 2.0 language than the PsychoPath XPath 2.0 jar that's bundled with Apache Xerces-J. - Official builds of the PsychoPath XPath 2.0 jar are available for download from the location, http://www.eclipse.org/webtools/";>Eclipse Web Tools Platform (WTP) Project - - The latest 'Released' or a 'Stable milestone' WTP version can be downloaded from here (from which the PsychoPath XPath 2.0 jar can be extracted). - The latest PsychoPath XPath 2.0 engine builds at Eclipse require a minimum JDK level of 1.5. - How to specify a user defined error message, when an XML Schema 1.1 assertion returns a 'false' result? -By default when an XSD 1.1 assertion fails, the Xerces XML Schema validator would produce a default error message, +When evaluation of an XSD 1.1 assertion fails the Xerces XML Schema validator would produce a default error message, which would say that which element or attribute was not validated successfully by an assertion and the schema type involved during validation. It is however possible to, specify an user-defined error message for assertion failures. This is done by -specifying an attribute "message" in the XML namespace 'http://xerces.apache.org' on an xs:assert or xs:assertion -element in the schema. The value of attribute "message" is the text of user-defined assertion error message, which is produced by -the Xerces XML Schema validator when an assertion fails. +specifying an attribute "message" in the XML namespace 'http://xerces.apache.org' on an +xs:assert or xs:assertion element in the schema. In this case, the value of attribute "message" +is a text of user-defined assertion error message which is generated by the Xerces XML Schema validator when an assertion fails. -In case of use of the XML Schema xs:assertion facet within simple types, if a user defined error message is used, if a user wants -it is further possible to dynamically construct the assertion error message by fetching the value of XPath 2.0 context variable -$value into the assertion error message. Following is an example of such an assertion error message: -xerces:message="The number {$value} is not divisible by 2". With such a specification of assertion error message, -a value from XML instance document is assigned to a variable placeholder {$value} (which is a key word). Therefore at -runtime, an assertion message for this example would be produced as follows, "The number 3 is not divisible by 2" -(the value 3 was assigned to the variable reference {$value}). +While using xs:assertion facet within simple types, if a user defined error message is used, a user may +dynamically construct the assertion error message by getting the value of XPath 2.0 context variable +$value into the error message. Following is an example of such an assertion error message: +xerces:message="The number {$value} is not divisible by 2". With such a description of
svn commit: r1466787 - /xerces/java/branches/xml-schema-1.1-dev/docs/features.xml
Author: mukulg Date: Thu Apr 11 08:08:07 2013 New Revision: 1466787 URL: http://svn.apache.org/r1466787 Log: committing a minor enhancement to xerces docs information. Modified: xerces/java/branches/xml-schema-1.1-dev/docs/features.xml Modified: xerces/java/branches/xml-schema-1.1-dev/docs/features.xml URL: http://svn.apache.org/viewvc/xerces/java/branches/xml-schema-1.1-dev/docs/features.xml?rev=1466787&r1=1466786&r2=1466787&view=diff == --- xerces/java/branches/xml-schema-1.1-dev/docs/features.xml (original) +++ xerces/java/branches/xml-schema-1.1-dev/docs/features.xml Thu Apr 11 08:08:07 2013 @@ -327,16 +327,27 @@ catch (SAXException e) { + + Setting this feature to 'true', would allow CTA XPath expressions to have full XPath 2.0 syntax. The default + is to recognize the CTA XPath subset, defined by XSD 1.1 language. If the CTA XPath expressions in a schema document + fall within the subset, then the use of default Xerces CTA XPath processor may result in an efficient schema + processing. + - Enable comments and PIs in XDM model, for XSD 1.1 assertion processing. - Disable comments and PIs in XDM model, for XSD 1.1 assertion processing. + Enable occurrence of comments and PIs within XDM model instance, for XSD 1.1 assertion processing. + Disable occurrence of comments and PIs within XDM model instance, for XSD 1.1 assertion processing. + + Setting this feature to 'true', would allow assertions to access comments and PIs from an XML instance document + and correspondingly test for their absence, presence or do string processing on them for the purpose of XSD + validation. + - To unsubscribe, e-mail: commits-unsubscr...@xerces.apache.org For additional commands, e-mail: commits-h...@xerces.apache.org
svn commit: r1458744 - /xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/XSDComplexTypeTraverser.java
Author: mukulg Date: Wed Mar 20 10:42:46 2013 New Revision: 1458744 URL: http://svn.apache.org/r1458744 Log: committing fix for jira issue XERCESJ-1610 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=1458744&r1=1458743&r2=1458744&view=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 Wed Mar 20 10:42:46 2013 @@ -1447,8 +1447,9 @@ class XSDComplexTypeTraverser extends X // invoke the method recursively (traverse up the type hierarchy) XSTypeDefinition ancestorType = baseSchemaType.getBaseType(); -if (ancestorType != null && !(ancestorType.getName().equals(SchemaSymbols.ATTVAL_ANYTYPE) || - ancestorType.derivedFrom(Constants.NS_XMLSCHEMA, SchemaSymbols.ATTVAL_ANYATOMICTYPE, XSConstants.DERIVATION_RESTRICTION))) { + +if (ancestorType != null && !((XS11TypeHelper.getSchemaTypeName(ancestorType)).equals(SchemaSymbols.ATTVAL_ANYTYPE) || + ancestorType.derivedFrom(Constants.NS_XMLSCHEMA, SchemaSymbols.ATTVAL_ANYATOMICTYPE, XSConstants.DERIVATION_RESTRICTION))) { addAssertsFromBaseTypes(ancestorType); } } - To unsubscribe, e-mail: commits-unsubscr...@xerces.apache.org For additional commands, e-mail: commits-h...@xerces.apache.org
svn commit: r1453665 - in /xerces/java/branches/xs-1.1-tests: data/jira_bugs/1608_1.xml data/jira_bugs/1608_1.xsd data/jira_bugs/1608_2.xml src/org/apache/xerces/tests/JiraBugsTests.java
Author: mukulg Date: Thu Mar 7 02:38:26 2013 New Revision: 1453665 URL: http://svn.apache.org/r1453665 Log: committing fix for jira issue XERCESJ-1608, along with few test cases. Added: xerces/java/branches/xs-1.1-tests/data/jira_bugs/1608_1.xml xerces/java/branches/xs-1.1-tests/data/jira_bugs/1608_1.xsd xerces/java/branches/xs-1.1-tests/data/jira_bugs/1608_2.xml Modified: xerces/java/branches/xs-1.1-tests/src/org/apache/xerces/tests/JiraBugsTests.java Added: xerces/java/branches/xs-1.1-tests/data/jira_bugs/1608_1.xml URL: http://svn.apache.org/viewvc/xerces/java/branches/xs-1.1-tests/data/jira_bugs/1608_1.xml?rev=1453665&view=auto == --- xerces/java/branches/xs-1.1-tests/data/jira_bugs/1608_1.xml (added) +++ xerces/java/branches/xs-1.1-tests/data/jira_bugs/1608_1.xml Thu Mar 7 02:38:26 2013 @@ -0,0 +1,5 @@ +http://www.rackspace.com/test/duration";> +PT22H +PT1H +PT1H + \ No newline at end of file Added: xerces/java/branches/xs-1.1-tests/data/jira_bugs/1608_1.xsd URL: http://svn.apache.org/viewvc/xerces/java/branches/xs-1.1-tests/data/jira_bugs/1608_1.xsd?rev=1453665&view=auto == --- xerces/java/branches/xs-1.1-tests/data/jira_bugs/1608_1.xsd (added) +++ xerces/java/branches/xs-1.1-tests/data/jira_bugs/1608_1.xsd Thu Mar 7 02:38:26 2013 @@ -0,0 +1,16 @@ +http://www.w3.org/2001/XMLSchema"; +xmlns:xsd="http://www.w3.org/2001/XMLSchema"; +xmlns:tst="http://www.rackspace.com/test/duration"; +targetNamespace="http://www.rackspace.com/test/duration";> + + + + + + + + + \ No newline at end of file Added: xerces/java/branches/xs-1.1-tests/data/jira_bugs/1608_2.xml URL: http://svn.apache.org/viewvc/xerces/java/branches/xs-1.1-tests/data/jira_bugs/1608_2.xml?rev=1453665&view=auto == --- xerces/java/branches/xs-1.1-tests/data/jira_bugs/1608_2.xml (added) +++ xerces/java/branches/xs-1.1-tests/data/jira_bugs/1608_2.xml Thu Mar 7 02:38:26 2013 @@ -0,0 +1,5 @@ +http://www.rackspace.com/test/duration";> +PT24H +PT1H +PT1H + \ No newline at end of file Modified: xerces/java/branches/xs-1.1-tests/src/org/apache/xerces/tests/JiraBugsTests.java URL: http://svn.apache.org/viewvc/xerces/java/branches/xs-1.1-tests/src/org/apache/xerces/tests/JiraBugsTests.java?rev=1453665&r1=1453664&r2=1453665&view=diff == --- xerces/java/branches/xs-1.1-tests/src/org/apache/xerces/tests/JiraBugsTests.java (original) +++ xerces/java/branches/xs-1.1-tests/src/org/apache/xerces/tests/JiraBugsTests.java Thu Mar 7 02:38:26 2013 @@ -370,5 +370,36 @@ public class JiraBugsTests extends Xerce assertEquals("cos-nonambig: Element1 and Element1 (or elements from their substitution group) violate \"Unique Particle Attribution\". During validation against this schema, ambiguity would be created for those two particles.", ex.getMessage()); } } + + public void testJira_1608_1() { + String xmlfile = fDataDir+"/jira_bugs/1608_1.xml"; + String schemapath = fDataDir+"/jira_bugs/1608_1.xsd"; + try { + Schema s = fSchemaFactory.newSchema(new StreamSource(schemapath)); +Validator v = s.newValidator(); + v.setErrorHandler(this); +v.validate(new StreamSource(xmlfile)); +assertNull(fErrSysId); +assertNull(fFatErrSysId); + } catch(Exception ex) { + ex.printStackTrace(); + assertTrue(false); + } + } + + public void testJira_1608_2() { + String xmlfile = fDataDir+"/jira_bugs/1608_2.xml"; + String schemapath = fDataDir+"/jira_bugs/1608_1.xsd"; + try { + Schema s = fSchemaFactory.newSchema(new StreamSource(schemapath)); +Validator v = s.newValidator(); + v.setErrorHandler(this); +v.validate(new StreamSource(xmlfile)); +assertTrue(failureList.size() == 2); + } catch(Exception ex) { + ex.printStackTrace(); + assertTrue(false); + } + } } - To unsubscribe, e-mail: commits-unsubscr...@xerces.apache.org For additional commands, e-mail: commits-h...@xerces.apache.org
svn commit: r1453664 - /xerces/java/branches/xml-schema-1.1-dev/tools/org.eclipse.wst.xml.xpath2.processor_1.2.0.jar
Author: mukulg Date: Thu Mar 7 02:38:03 2013 New Revision: 1453664 URL: http://svn.apache.org/r1453664 Log: committing fix for jira issue XERCESJ-1608, along with few test cases. Modified: xerces/java/branches/xml-schema-1.1-dev/tools/org.eclipse.wst.xml.xpath2.processor_1.2.0.jar Modified: xerces/java/branches/xml-schema-1.1-dev/tools/org.eclipse.wst.xml.xpath2.processor_1.2.0.jar URL: http://svn.apache.org/viewvc/xerces/java/branches/xml-schema-1.1-dev/tools/org.eclipse.wst.xml.xpath2.processor_1.2.0.jar?rev=1453664&r1=1453663&r2=1453664&view=diff == Binary files - no diff available. - To unsubscribe, e-mail: commits-unsubscr...@xerces.apache.org For additional commands, e-mail: commits-h...@xerces.apache.org
svn commit: r1446414 - in /xerces/java/branches/xs-1.1-tests: data/jira_bugs/1603_1.xsd data/jira_bugs/1605_1.xsd src/org/apache/xerces/tests/JiraBugsTests.java
Author: mukulg Date: Fri Feb 15 00:37:37 2013 New Revision: 1446414 URL: http://svn.apache.org/r1446414 Log: commiting fix for jira issue XERCESJ-1605. commiting few related test cases as well. Added: xerces/java/branches/xs-1.1-tests/data/jira_bugs/1603_1.xsd xerces/java/branches/xs-1.1-tests/data/jira_bugs/1605_1.xsd Modified: xerces/java/branches/xs-1.1-tests/src/org/apache/xerces/tests/JiraBugsTests.java Added: xerces/java/branches/xs-1.1-tests/data/jira_bugs/1603_1.xsd URL: http://svn.apache.org/viewvc/xerces/java/branches/xs-1.1-tests/data/jira_bugs/1603_1.xsd?rev=1446414&view=auto == --- xerces/java/branches/xs-1.1-tests/data/jira_bugs/1603_1.xsd (added) +++ xerces/java/branches/xs-1.1-tests/data/jira_bugs/1603_1.xsd Fri Feb 15 00:37:37 2013 @@ -0,0 +1,21 @@ +http://www.w3.org/2001/XMLSchema"; elementFormDefault="qualified"> + + + + + + + + + + + + + + + + + + + + \ No newline at end of file Added: xerces/java/branches/xs-1.1-tests/data/jira_bugs/1605_1.xsd URL: http://svn.apache.org/viewvc/xerces/java/branches/xs-1.1-tests/data/jira_bugs/1605_1.xsd?rev=1446414&view=auto == --- xerces/java/branches/xs-1.1-tests/data/jira_bugs/1605_1.xsd (added) +++ xerces/java/branches/xs-1.1-tests/data/jira_bugs/1605_1.xsd Fri Feb 15 00:37:37 2013 @@ -0,0 +1,26 @@ +http://www.w3.org/2001/XMLSchema";> + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file Modified: xerces/java/branches/xs-1.1-tests/src/org/apache/xerces/tests/JiraBugsTests.java URL: http://svn.apache.org/viewvc/xerces/java/branches/xs-1.1-tests/src/org/apache/xerces/tests/JiraBugsTests.java?rev=1446414&r1=1446413&r2=1446414&view=diff == --- xerces/java/branches/xs-1.1-tests/src/org/apache/xerces/tests/JiraBugsTests.java (original) +++ xerces/java/branches/xs-1.1-tests/src/org/apache/xerces/tests/JiraBugsTests.java Fri Feb 15 00:37:37 2013 @@ -25,6 +25,8 @@ import javax.xml.validation.Schema; import javax.xml.validation.SchemaFactory; import javax.xml.validation.Validator; +import org.xml.sax.SAXException; + /** * @xerces.internal * @@ -348,5 +350,25 @@ public class JiraBugsTests extends Xerce assertTrue(false); } } + + public void testJira_1603() { + String schemapath = fDataDir+"/jira_bugs/1603_1.xsd"; + try { + Schema s = fSchemaFactory.newSchema(new StreamSource(schemapath)); + } catch(SAXException ex) { + // test expected error messages + assertEquals("src-ct.5: Complex Type Definition Representation Error for type 'bCT'. If is present and the actual value of its mode [attribute] is not none, then there must be an among the [children] of .", ex.getMessage()); + } + } + + public void testJira_1605() { + String schemapath = fDataDir+"/jira_bugs/1605_1.xsd"; + try { + Schema s = fSchemaFactory.newSchema(new StreamSource(schemapath)); + } catch(SAXException ex) { + // test expected error messages +assertEquals("cos-nonambig: Element1 and Element1 (or elements from their substitution group) violate \"Unique Particle Attribution\". During validation against this schema, ambiguity would be created for those two particles.", ex.getMessage()); + } + } } - To unsubscribe, e-mail: commits-unsubscr...@xerces.apache.org For additional commands, e-mail: commits-h...@xerces.apache.org
svn commit: r1446413 - in /xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs: XS11Constraints.java models/XS11CMRestriction.java util/XS11TypeHelper.java
Author: mukulg Date: Fri Feb 15 00:37:09 2013 New Revision: 1446413 URL: http://svn.apache.org/r1446413 Log: commiting fix for jira issue XERCESJ-1605. commiting few related test cases as well. Modified: xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/XS11Constraints.java xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/models/XS11CMRestriction.java xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/util/XS11TypeHelper.java Modified: xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/XS11Constraints.java URL: http://svn.apache.org/viewvc/xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/XS11Constraints.java?rev=1446413&r1=1446412&r2=1446413&view=diff == --- xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/XS11Constraints.java (original) +++ xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/XS11Constraints.java Fri Feb 15 00:37:09 2013 @@ -29,6 +29,7 @@ import org.apache.xerces.impl.xs.models. import org.apache.xerces.impl.xs.models.XS11CMRestriction; import org.apache.xerces.impl.xs.models.XSCMValidator; import org.apache.xerces.impl.xs.util.SimpleLocator; +import org.apache.xerces.impl.xs.util.XS11TypeHelper; import org.apache.xerces.impl.xs.util.XSObjectListImpl; import org.apache.xerces.util.NamespaceSupport; import org.apache.xerces.util.SymbolHash; @@ -133,8 +134,8 @@ class XS11Constraints extends XSConstrai // Types are not the same throw new XMLSchemaException("cos-element-consistent", new Object[] {type.fName, elem.fName}); } - -if (!isTypeTablesEquivalent(elem, existingElem)) { + +if (XS11TypeHelper.isTypeTablesComparable(elem.getTypeAlternatives(), existingElem.getTypeAlternatives()) && !isTypeTablesEquivalent(elem, existingElem)) { // Type tables are not equivalent throw new XMLSchemaException("cos-element-consistent.4.b", new Object[] {type.fName, elem.fName}); } @@ -185,7 +186,7 @@ class XS11Constraints extends XSConstrai if (grammar != null) { final XSElementDecl gElem = grammar.getGlobalElementDecl(elem.fName); if (gElem != null) { -if (gElem != elem && !isTypeTablesEquivalent(elem, gElem)) { +if (gElem != elem && XS11TypeHelper.isTypeTablesComparable(elem.getTypeAlternatives(), gElem.getTypeAlternatives()) && !isTypeTablesEquivalent(elem, gElem)) { // Type tables are not equivalent throw new XMLSchemaException("cos-element-consistent.4.b", new Object[] {type.fName, elem.fName}); } @@ -200,29 +201,33 @@ class XS11Constraints extends XSConstrai */ final public boolean isTypeTablesEquivalent(XSElementDecl elementDecl1, XSElementDecl elementDecl2) { +boolean typeTablesEquivalent = true; + final XSTypeAlternativeImpl[] typeTable1 = elementDecl1.getTypeAlternatives(); final XSTypeAlternativeImpl[] typeTable2 = elementDecl2.getTypeAlternatives(); - -// both tables are absent -if (typeTable1 == typeTable2) { -return true; -} -// one of the tables is absent or has a different length -if (typeTable1 == null || typeTable2 == null -|| typeTable1.length != typeTable2.length) { -return false; +// if two type tables have different length +if (typeTable1.length != typeTable2.length) { +typeTablesEquivalent = false; } -for (int typeAltIdx = 0; typeAltIdx < typeTable1.length; typeAltIdx++) { -final XSTypeAlternativeImpl typeAlt1 = typeTable1[typeAltIdx]; -final XSTypeAlternativeImpl typeAlt2 = typeTable2[typeAltIdx]; -if (!isTypeAlternativesEquivalent(typeAlt1, typeAlt2)) { -return false; +if (typeTablesEquivalent) { +for (int typeAltIdx = 0; typeAltIdx < typeTable1.length; typeAltIdx++) { +final XSTypeAlternativeImpl typeAlt1 = typeTable1[typeAltIdx]; +final XSTypeAlternativeImpl typeAlt2 = typeTable2[typeAltIdx]; +if (!isTypeAlternativesEquivalent(typeAlt1, typeAlt2)) { +typeTablesEquivalent = false; +break; +} } } -return isTypeAlternativesEquivalent(elementDecl1.getDefaultTypeDefinition(), elementDecl2.getDefaultTypeDefinition()); +if (typeTablesEquivalent && !elementDecl1.isTypeTableOK()) { +typeTablesEquivalent = isTypeAlternativesEq
svn commit: r1441691 - /xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/XSDComplexTypeTraverser.java
Author: mukulg Date: Sat Feb 2 02:53:39 2013 New Revision: 1441691 URL: http://svn.apache.org/viewvc?rev=1441691&view=rev Log: committing fix for jira issue, XERCESJ-1603 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=1441691&r1=1441690&r2=1441691&view=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 Sat Feb 2 02:53:39 2013 @@ -1298,7 +1298,7 @@ class XSDComplexTypeTraverser extends X // Union (3.10.6.3). // If explicit open content is null, no need to make any changes -if (explicitOpenContent != null) { +if (explicitOpenContent != null && fOpenContent.fWildcard != null) { XSOpenContentDecl oc = new XSOpenContentDecl(); oc.fMode = fOpenContent.fMode; // interleave by default oc.fWildcard = fSchemaHandler.fXSConstraints.performUnionWith(fOpenContent.fWildcard, explicitOpenContent.fWildcard, fOpenContent.fWildcard.fProcessContents); - To unsubscribe, e-mail: commits-unsubscr...@xerces.apache.org For additional commands, e-mail: commits-h...@xerces.apache.org
svn commit: r1436091 - /xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/XMLSchemaValidator.java
Author: mukulg Date: Mon Jan 21 01:57:13 2013 New Revision: 1436091 URL: http://svn.apache.org/viewvc?rev=1436091&view=rev Log: committing minor improvements to variable comments 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=1436091&r1=1436090&r2=1436091&view=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 Mon Jan 21 01:57:13 2013 @@ -1411,12 +1411,13 @@ public class XMLSchemaValidator // assertion validator subcomponent private XSDAssertionValidator fAssertionValidator = null; -// variable to track validity of element simple content for union types. if a member type of union in XML Schema namespace can -// successfully validate an atomic value, we don't process assertions for such union types in downstream checks. i.e, a known -// valid element doesn't require assertion evaluations. +// variable to track validity of element content for simpleType->union. if a member type of union in XSD namespace can +// successfully validate an element instance value, we don't process assertions for such union types in downstream checks. i.e., +// an element instance known to be valid doesn't require assertion evaluations. private boolean fIsAssertProcessingNeededForSTUnionElem = true; -// a similar variable as above to track union type validity for attributes of one element. +// variable with similar semantics as fIsAssertProcessingNeededForSTUnionElem, but for attributes of an element instance (i.e., +// all attributes of one element instance). private List fIsAssertProcessingNeededForSTUnionAttrs = new ArrayList(); // 'type alternative' validator subcomponent - To unsubscribe, e-mail: commits-unsubscr...@xerces.apache.org For additional commands, e-mail: commits-h...@xerces.apache.org
svn commit: r1432599 - in /xerces/java/branches/xs-1.1-tests/src/org/apache/xerces/tests: IDConstraintTests.java JiraBugsTests.java
Author: mukulg Date: Sun Jan 13 12:12:52 2013 New Revision: 1432599 URL: http://svn.apache.org/viewvc?rev=1432599&view=rev Log: making few updates to test cases for recent implementation changes for Jira issue, 1594 Modified: xerces/java/branches/xs-1.1-tests/src/org/apache/xerces/tests/IDConstraintTests.java xerces/java/branches/xs-1.1-tests/src/org/apache/xerces/tests/JiraBugsTests.java Modified: xerces/java/branches/xs-1.1-tests/src/org/apache/xerces/tests/IDConstraintTests.java URL: http://svn.apache.org/viewvc/xerces/java/branches/xs-1.1-tests/src/org/apache/xerces/tests/IDConstraintTests.java?rev=1432599&r1=1432598&r2=1432599&view=diff == --- xerces/java/branches/xs-1.1-tests/src/org/apache/xerces/tests/IDConstraintTests.java (original) +++ xerces/java/branches/xs-1.1-tests/src/org/apache/xerces/tests/IDConstraintTests.java Sun Jan 13 12:12:52 2013 @@ -303,13 +303,10 @@ public class IDConstraintTests extends X Validator v = s.newValidator(); v.setErrorHandler(this); v.validate(new StreamSource(xmlfile)); -assertTrue(failureList.size() == 2); +assertTrue(failureList.size() == 1); // test expected error messages List expectedMsgList = new ArrayList(); FailureMesgFragments mesgFragments = new FailureMesgFragments(); -mesgFragments.setMessageFragment("cvc-identity-constraint.4.3.b: Not enough values specified for identity constraint specified for element \"Sub_1a\""); -expectedMsgList.add(mesgFragments); -mesgFragments = new FailureMesgFragments(); mesgFragments.setMessageFragment("the keyref identity constraint \"newKeyref\" refers to a key or unique that is out of scope"); expectedMsgList.add(mesgFragments); assertTrue(areErrorMessagesConsistent(expectedMsgList)); @@ -327,13 +324,10 @@ public class IDConstraintTests extends X Validator v = s.newValidator(); v.setErrorHandler(this); v.validate(new StreamSource(xmlfile)); -assertTrue(failureList.size() == 2); +assertTrue(failureList.size() == 1); // test expected error messages List expectedMsgList = new ArrayList(); FailureMesgFragments mesgFragments = new FailureMesgFragments(); -mesgFragments.setMessageFragment("cvc-identity-constraint.4.3.b: Not enough values specified for identity constraint specified for element \"personnel\""); -expectedMsgList.add(mesgFragments); -mesgFragments = new FailureMesgFragments(); mesgFragments.setMessageFragment("cvc-identity-constraint.4.3: Key 'keyref' with value '1' not found for identity constraint of element 'personnel'"); expectedMsgList.add(mesgFragments); assertTrue(areErrorMessagesConsistent(expectedMsgList)); Modified: xerces/java/branches/xs-1.1-tests/src/org/apache/xerces/tests/JiraBugsTests.java URL: http://svn.apache.org/viewvc/xerces/java/branches/xs-1.1-tests/src/org/apache/xerces/tests/JiraBugsTests.java?rev=1432599&r1=1432598&r2=1432599&view=diff == --- xerces/java/branches/xs-1.1-tests/src/org/apache/xerces/tests/JiraBugsTests.java (original) +++ xerces/java/branches/xs-1.1-tests/src/org/apache/xerces/tests/JiraBugsTests.java Sun Jan 13 12:12:52 2013 @@ -117,7 +117,7 @@ public class JiraBugsTests extends Xerce Validator v = s.newValidator(); v.setErrorHandler(this); v.validate(new StreamSource(xmlfile)); -assertTrue(failureList.size() == 2); +assertTrue(failureList.size() == 1); // test expected error messages List expectedMsgList = new ArrayList(); FailureMesgFragments mesgFragments = new FailureMesgFragments(); - To unsubscribe, e-mail: commits-unsubscr...@xerces.apache.org For additional commands, e-mail: commits-h...@xerces.apache.org
svn commit: r1432596 - in /xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl: msg/XMLSchemaMessages.properties xs/XMLSchemaValidator.java
Author: mukulg Date: Sun Jan 13 12:11:15 2013 New Revision: 1432596 URL: http://svn.apache.org/viewvc?rev=1432596&view=rev Log: committing few fixes for Jira issue, 1594 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/XMLSchemaValidator.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=1432596&r1=1432595&r2=1432596&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 Sun Jan 13 12:11:15 2013 @@ -44,7 +44,7 @@ KeyRefOutOfScope = Identity Constraint error: the keyref identity constraint \"{0}\" refers to a key or unique that is out of scope. KeyRefReferNotFound = Key reference declaration \"{0}\" refers to unknown key with name \"{1}\". UnknownField = Internal identity constraint error; unknown field \"{0}\" for identity constraint \"{2}\" specified for element \"{1}\". -KeyRefNotEnoughValues = cvc-identity-constraint.4.3.b: Not enough values specified for identity constraint specified for element \"{0}\". +## KeyRefNotEnoughValues = cvc-identity-constraint.4.3.b: Not enough values specified for identity constraint specified for element \"{0}\". # Ideally, we should only use the following error keys, not the ones under # "Identity constraints". And we should cover all of the following errors. 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=1432596&r1=1432595&r2=1432596&view=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 Sun Jan 13 12:11:15 2013 @@ -2771,11 +2771,11 @@ public class XMLSchemaValidator ValueStoreBase values = fValueStoreCache.getValueStoreFor(id, selMatcher.getInitialDepth()); if (values != null) { -values.endDocumentFragment(); // nothing to do if nothing matched -// report error if not all fields are present -if (values.fValuesCount != values.fFieldCount) { +values.endDocumentFragment(); // nothing to do if nothing matched +/*if (values.fValuesCount != values.fFieldCount) { +// report error if not all fields are present reportSchemaError("KeyRefNotEnoughValues", new Object[] { element.rawname, values.getIdentityConstraint().getName() }); -} +} */ } } } - To unsubscribe, e-mail: commits-unsubscr...@xerces.apache.org For additional commands, e-mail: commits-h...@xerces.apache.org
svn commit: r1429874 - in /xerces/java/branches/xs-1.1-tests: data/assertions/list_union/ src/org/apache/xerces/tests/
Author: mukulg Date: Mon Jan 7 16:14:56 2013 New Revision: 1429874 URL: http://svn.apache.org/viewvc?rev=1429874&view=rev Log: schema 1.1 commit: adding few new test cases, for implementation improvements done few minutes ago and for earlier improvements as well. Added: xerces/java/branches/xs-1.1-tests/data/assertions/list_union/listunion18_1.xml - copied unchanged from r1429470, xerces/java/branches/xs-1.1-tests/data/assertions/list_union/listunion18.xml xerces/java/branches/xs-1.1-tests/data/assertions/list_union/listunion18_2.xml xerces/java/branches/xs-1.1-tests/data/assertions/list_union/listunion19.xsd xerces/java/branches/xs-1.1-tests/data/assertions/list_union/listunion19_1.xml xerces/java/branches/xs-1.1-tests/data/assertions/list_union/listunion19_2.xml Removed: xerces/java/branches/xs-1.1-tests/data/assertions/list_union/listunion18.xml Modified: xerces/java/branches/xs-1.1-tests/src/org/apache/xerces/tests/AssertionTests.java Added: xerces/java/branches/xs-1.1-tests/data/assertions/list_union/listunion18_2.xml URL: http://svn.apache.org/viewvc/xerces/java/branches/xs-1.1-tests/data/assertions/list_union/listunion18_2.xml?rev=1429874&view=auto == --- xerces/java/branches/xs-1.1-tests/data/assertions/list_union/listunion18_2.xml (added) +++ xerces/java/branches/xs-1.1-tests/data/assertions/list_union/listunion18_2.xml Mon Jan 7 16:14:56 2013 @@ -0,0 +1 @@ +5 \ No newline at end of file Added: xerces/java/branches/xs-1.1-tests/data/assertions/list_union/listunion19.xsd URL: http://svn.apache.org/viewvc/xerces/java/branches/xs-1.1-tests/data/assertions/list_union/listunion19.xsd?rev=1429874&view=auto == --- xerces/java/branches/xs-1.1-tests/data/assertions/list_union/listunion19.xsd (added) +++ xerces/java/branches/xs-1.1-tests/data/assertions/list_union/listunion19.xsd Mon Jan 7 16:14:56 2013 @@ -0,0 +1,21 @@ +http://www.w3.org/2001/XMLSchema";> + + + + + + + + + + + + + + + + + + + + \ No newline at end of file Added: xerces/java/branches/xs-1.1-tests/data/assertions/list_union/listunion19_1.xml URL: http://svn.apache.org/viewvc/xerces/java/branches/xs-1.1-tests/data/assertions/list_union/listunion19_1.xml?rev=1429874&view=auto == --- xerces/java/branches/xs-1.1-tests/data/assertions/list_union/listunion19_1.xml (added) +++ xerces/java/branches/xs-1.1-tests/data/assertions/list_union/listunion19_1.xml Mon Jan 7 16:14:56 2013 @@ -0,0 +1 @@ +2 2005-10-05 \ No newline at end of file Added: xerces/java/branches/xs-1.1-tests/data/assertions/list_union/listunion19_2.xml URL: http://svn.apache.org/viewvc/xerces/java/branches/xs-1.1-tests/data/assertions/list_union/listunion19_2.xml?rev=1429874&view=auto == --- xerces/java/branches/xs-1.1-tests/data/assertions/list_union/listunion19_2.xml (added) +++ xerces/java/branches/xs-1.1-tests/data/assertions/list_union/listunion19_2.xml Mon Jan 7 16:14:56 2013 @@ -0,0 +1 @@ +2005-10-05 2 \ No newline at end of file Modified: xerces/java/branches/xs-1.1-tests/src/org/apache/xerces/tests/AssertionTests.java URL: http://svn.apache.org/viewvc/xerces/java/branches/xs-1.1-tests/src/org/apache/xerces/tests/AssertionTests.java?rev=1429874&r1=1429873&r2=1429874&view=diff == --- xerces/java/branches/xs-1.1-tests/src/org/apache/xerces/tests/AssertionTests.java (original) +++ xerces/java/branches/xs-1.1-tests/src/org/apache/xerces/tests/AssertionTests.java Mon Jan 7 16:14:56 2013 @@ -2765,7 +2765,7 @@ public class AssertionTests extends Xerc } public void testAssert155() { - String xmlfile = fDataDir+"/assertions/list_union/listunion18.xml"; + String xmlfile = fDataDir+"/assertions/list_union/listunion18_1.xml"; String schemapath = fDataDir+"/assertions/list_union/listunion18.xsd"; try { Schema s = fSchemaFactory.newSchema(new StreamSource(schemapath)); @@ -2780,4 +2780,50 @@ public class AssertionTests extends Xerc } } + public void testAssert156() { + String xmlfile = fDataDir+"/assertions/list_union/listunion18_2.xml"; + String schemapath = fDataDir+"/assertions/list_union/listunion18.xsd"; +
svn commit: r1429869 - /xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/assertion/XSAssertionXPath2ValueImpl.java
Author: mukulg Date: Mon Jan 7 16:09:33 2013 New Revision: 1429869 URL: http://svn.apache.org/viewvc?rev=1429869&view=rev Log: schema 1.1 commit: improving computing typed value of assertion xpath2 context variable $value, during following scenario, $value represents value for a simpleType which is derived by restriction from a list and itemType of that list is a union. Modified: xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/assertion/XSAssertionXPath2ValueImpl.java 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=1429869&r1=1429868&r2=1429869&view=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 Mon Jan 7 16:09:33 2013 @@ -124,8 +124,7 @@ public class XSAssertionXPath2ValueImpl if (listOrUnionType != null) { if (isTypeDerivedFromList || listOrUnionType.getVariety() == XSSimpleTypeDefinition.VARIETY_LIST) { -// $value is a sequence of atomic values (with type annotation xs:anyAtomicType*) -// tokenize the list value by a sequence of white spaces +// $value is a sequence of atomic values (with type annotation xs:anyAtomicType*). tokenize the list value by a sequence of white spaces. StringTokenizer listStrTokens = new StringTokenizer(value, " \n\t\r"); List xdmItemList = new ArrayList(); while (listStrTokens.hasMoreTokens()) { @@ -185,10 +184,17 @@ public class XSAssertionXPath2ValueImpl public void setXDMTypedValueOf$valueForSTVarietyList(Element rootNodeOfAssertTree, String listStrValue, XSSimpleTypeDefinition itemType, boolean isTypeDerivedFromList, DynamicContext xpath2DynamicContext) throws Exception { if (itemType.getVariety() == XSSimpleTypeDefinition.VARIETY_UNION) { - // the list's item type has variety 'union' - XSSimpleTypeDefinition actualListItemType = getActualXDMItemTypeForSTVarietyUnion(itemType.getMemberTypes(), listStrValue); - // set a schema 'typed value' to variable $value - setXDMTypedValueOf$value(rootNodeOfAssertTree, listStrValue, actualListItemType, null, false, xpath2DynamicContext); + // itemType of xs:list has variety 'union' + List xdmItemList = new ArrayList(); + XSObjectList memberTypes = itemType.getMemberTypes(); + // tokenize the list value by a sequence of white spaces + StringTokenizer values = new StringTokenizer(listStrValue, " \n\t\r"); + while (values.hasMoreTokens()) { + String itemValue = values.nextToken(); + XSSimpleTypeDefinition listItemTypeForUnion = getActualXDMItemTypeForSTVarietyUnion(memberTypes, itemValue); + xdmItemList.add(SchemaTypeValueFactory.newSchemaTypeValue(listItemTypeForUnion.getBuiltInKind(), itemValue)); + } + xpath2DynamicContext.set_variable(new org.eclipse.wst.xml.xpath2.processor.internal.types.QName("value"), XS11TypeHelper.getXPath2ResultSequence(xdmItemList)); } else { setXDMTypedValueOf$value(rootNodeOfAssertTree, listStrValue, itemType, null, isTypeDerivedFromList, xpath2DynamicContext); @@ -228,13 +234,12 @@ public class XSAssertionXPath2ValueImpl if (complexTypeSimplContentType.getVariety() == XSSimpleTypeDefinition.VARIETY_LIST) { // simple content type has variety xs:list XSSimpleTypeDefinition listItemType = complexTypeSimplContentType.getItemType(); -// tokenize the list value by a sequence of white spaces -StringTokenizer values = new StringTokenizer(value, " \n\t\r"); -// $value is a sequence of atomic values (with type annotation xs:anyAtomicType*) +// $value is a sequence of atomic values (with type annotation xs:anyAtomicType*). tokenize the list value by a sequence of white spaces. +StringTokenizer values = new StringTokenizer(value, " \n\t\r"); List xdmItemList = new ArrayList(); -final XSObjectList memberTypes = listItemType.getMemberTypes(); -if (memberTypes.getLength() > 0) { - // itemType of xs:list has variety 'union'. here list items may have different types which are determined below. +if (listItemType.getVariety() == XSSimpleTypeDefinit
svn commit: r1429470 - in /xerces/java/branches/xs-1.1-tests: data/assertions/list_union/listunion18.xml data/assertions/list_union/listunion18.xsd src/org/apache/xerces/tests/AssertionTests.java
Author: mukulg Date: Sun Jan 6 06:21:31 2013 New Revision: 1429470 URL: http://svn.apache.org/viewvc?rev=1429470&view=rev Log: schema 1.1 commit: adding a new test case for implementation improvements committed few minutes ago. Added: xerces/java/branches/xs-1.1-tests/data/assertions/list_union/listunion18.xml xerces/java/branches/xs-1.1-tests/data/assertions/list_union/listunion18.xsd Modified: xerces/java/branches/xs-1.1-tests/src/org/apache/xerces/tests/AssertionTests.java Added: xerces/java/branches/xs-1.1-tests/data/assertions/list_union/listunion18.xml URL: http://svn.apache.org/viewvc/xerces/java/branches/xs-1.1-tests/data/assertions/list_union/listunion18.xml?rev=1429470&view=auto == --- xerces/java/branches/xs-1.1-tests/data/assertions/list_union/listunion18.xml (added) +++ xerces/java/branches/xs-1.1-tests/data/assertions/list_union/listunion18.xml Sun Jan 6 06:21:31 2013 @@ -0,0 +1 @@ +abcde \ No newline at end of file Added: xerces/java/branches/xs-1.1-tests/data/assertions/list_union/listunion18.xsd URL: http://svn.apache.org/viewvc/xerces/java/branches/xs-1.1-tests/data/assertions/list_union/listunion18.xsd?rev=1429470&view=auto == --- xerces/java/branches/xs-1.1-tests/data/assertions/list_union/listunion18.xsd (added) +++ xerces/java/branches/xs-1.1-tests/data/assertions/list_union/listunion18.xsd Sun Jan 6 06:21:31 2013 @@ -0,0 +1,27 @@ +http://www.w3.org/2001/XMLSchema";> + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file Modified: xerces/java/branches/xs-1.1-tests/src/org/apache/xerces/tests/AssertionTests.java URL: http://svn.apache.org/viewvc/xerces/java/branches/xs-1.1-tests/src/org/apache/xerces/tests/AssertionTests.java?rev=1429470&r1=1429469&r2=1429470&view=diff == --- xerces/java/branches/xs-1.1-tests/src/org/apache/xerces/tests/AssertionTests.java (original) +++ xerces/java/branches/xs-1.1-tests/src/org/apache/xerces/tests/AssertionTests.java Sun Jan 6 06:21:31 2013 @@ -2764,4 +2764,20 @@ public class AssertionTests extends Xerc } } + public void testAssert155() { + String xmlfile = fDataDir+"/assertions/list_union/listunion18.xml"; + String schemapath = fDataDir+"/assertions/list_union/listunion18.xsd"; + try { + Schema s = fSchemaFactory.newSchema(new StreamSource(schemapath)); +Validator v = s.newValidator(); + v.setErrorHandler(this); +v.validate(new StreamSource(xmlfile)); +assertNull(fErrSysId); +assertNull(fFatErrSysId); + } catch(Exception ex) { + ex.printStackTrace(); + assertTrue(false); + } + } + } - To unsubscribe, e-mail: commits-unsubscr...@xerces.apache.org For additional commands, e-mail: commits-h...@xerces.apache.org
svn commit: r1429469 - /xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/XMLAssertPsychopathXPath2Impl.java
Author: mukulg Date: Sun Jan 6 06:19:26 2013 New Revision: 1429469 URL: http://svn.apache.org/viewvc?rev=1429469&view=rev Log: schema 1.1 commit: committing a minor improvement to assertions implementation. this handles better the case, when assertions are within a simpleType->union scenario (particularly, when a memberType of union in non XSD namespace having non-assertion facets can validate successfully an XML instance value). Modified: xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/XMLAssertPsychopathXPath2Impl.java Modified: xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/XMLAssertPsychopathXPath2Impl.java URL: http://svn.apache.org/viewvc/xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/XMLAssertPsychopathXPath2Impl.java?rev=1429469&r1=1429468&r2=1429469&view=diff == --- xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/XMLAssertPsychopathXPath2Impl.java (original) +++ xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/XMLAssertPsychopathXPath2Impl.java Sun Jan 6 06:19:26 2013 @@ -618,65 +618,58 @@ public class XMLAssertPsychopathXPath2Im private boolean isValidationFailedForSTUnion(XSObjectList memberTypes, QName element, String value, Augmentations augs) { boolean isValidationFailedForUnion = true; -final int memberTypesLength = memberTypes.getLength(); -int memberTypesHavingAsserts = 0; - -for (int memberTypeIdx = 0; memberTypeIdx < memberTypesLength; memberTypeIdx++) { + +for (int memberTypeIdx = 0; memberTypeIdx < memberTypes.getLength(); memberTypeIdx++) { XSSimpleTypeDefinition memType = (XSSimpleTypeDefinition) memberTypes.item(memberTypeIdx); -// check for assertions on types in an non-schema namespace -if (!SchemaSymbols.URI_SCHEMAFORSCHEMA.equals(memType.getNamespace()) && XS11TypeHelper.simpleTypeHasAsserts(memType)) { -memberTypesHavingAsserts++; -XSObjectList memberTypeFacets = memType.getMultiValueFacets(); -final int memberTypeFacetsLength = memberTypeFacets.getLength(); -for (int memberTypeFacetIdx = 0; memberTypeFacetIdx < memberTypeFacetsLength; memberTypeFacetIdx++) { -XSMultiValueFacet facet = (XSMultiValueFacet) memberTypeFacets.item(memberTypeFacetIdx); -if (facet.getFacetKind() == XSSimpleTypeDefinition.FACET_ASSERT) { -Vector assertFacets = facet.getAsserts(); -int assertsSucceeded = 0; -for (Iterator iter = assertFacets.iterator(); iter.hasNext(); ) { -XSAssertImpl assertImpl = (XSAssertImpl) iter.next(); -try { - setXDMTypedValueOf$value(fCurrentAssertDomNode, value, memType, null, false, fXpath2DynamicContext); - AssertionError assertError = evaluateOneAssertion(element, assertImpl, value, false, false); - if (assertError == null) { - assertsSucceeded++; - } -} -catch(Exception ex) { - // An exception may occur if for example a typed value cannot be constructed by PsychoPath - // XPath engine for a given "string value" (say a value '5' was attempted to be converted to a typed - // value xs:date). - // it's useful to report warning ... REVISIT -} -} -if (assertsSucceeded == assertFacets.size()) { -// all assertions on a 'union' member type have evaluated to 'true', therefore validation with -// union has succeeded wrt assertions. -// update memberType PSVI property -ItemPSVI elemPSVI = (ItemPSVI)augs.getItem(Constants.ELEMENT_PSVI); -ItemPSVI attrPSVI = (ItemPSVI)augs.getItem(Constants.ATTRIBUTE_PSVI); -if (elemPSVI != null) { - ((ElementPSVImpl) elemPSVI).fValue.memberType = (XSSimpleType) memType; +if (!SchemaSymbols.URI_SCHEMAFORSCHEMA.equals(memType.getNamespace())) { +// only look for member types in non XSD namespace +if (!XS11TypeHelper.simpleTypeHasAsserts(memType) && XS11TypeHelper.isStrValueValidForASimpleType(value, (XSSimpleType)memType, Constants.SCHEMA_VERSION_1_
svn commit: r1429251 - in /xerces/java/branches/xs-1.1-tests: data/assertions/list_union/ src/org/apache/xerces/tests/
Author: mukulg Date: Sat Jan 5 10:46:27 2013 New Revision: 1429251 URL: http://svn.apache.org/viewvc?rev=1429251&view=rev Log: schema 1.1 commit: adding few new test cases, for implementation improvements committed few minutes ago. Added: xerces/java/branches/xs-1.1-tests/data/assertions/list_union/listunion16.xml xerces/java/branches/xs-1.1-tests/data/assertions/list_union/listunion16.xsd xerces/java/branches/xs-1.1-tests/data/assertions/list_union/listunion17.xml xerces/java/branches/xs-1.1-tests/data/assertions/list_union/listunion17.xsd Modified: xerces/java/branches/xs-1.1-tests/src/org/apache/xerces/tests/AssertionTests.java Added: xerces/java/branches/xs-1.1-tests/data/assertions/list_union/listunion16.xml URL: http://svn.apache.org/viewvc/xerces/java/branches/xs-1.1-tests/data/assertions/list_union/listunion16.xml?rev=1429251&view=auto == --- xerces/java/branches/xs-1.1-tests/data/assertions/list_union/listunion16.xml (added) +++ xerces/java/branches/xs-1.1-tests/data/assertions/list_union/listunion16.xml Sat Jan 5 10:46:27 2013 @@ -0,0 +1,4 @@ + + + + \ No newline at end of file Added: xerces/java/branches/xs-1.1-tests/data/assertions/list_union/listunion16.xsd URL: http://svn.apache.org/viewvc/xerces/java/branches/xs-1.1-tests/data/assertions/list_union/listunion16.xsd?rev=1429251&view=auto == --- xerces/java/branches/xs-1.1-tests/data/assertions/list_union/listunion16.xsd (added) +++ xerces/java/branches/xs-1.1-tests/data/assertions/list_union/listunion16.xsd Sat Jan 5 10:46:27 2013 @@ -0,0 +1,41 @@ +http://www.w3.org/2001/XMLSchema";> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file Added: xerces/java/branches/xs-1.1-tests/data/assertions/list_union/listunion17.xml URL: http://svn.apache.org/viewvc/xerces/java/branches/xs-1.1-tests/data/assertions/list_union/listunion17.xml?rev=1429251&view=auto == --- xerces/java/branches/xs-1.1-tests/data/assertions/list_union/listunion17.xml (added) +++ xerces/java/branches/xs-1.1-tests/data/assertions/list_union/listunion17.xml Sat Jan 5 10:46:27 2013 @@ -0,0 +1,4 @@ + + + + \ No newline at end of file Added: xerces/java/branches/xs-1.1-tests/data/assertions/list_union/listunion17.xsd URL: http://svn.apache.org/viewvc/xerces/java/branches/xs-1.1-tests/data/assertions/list_union/listunion17.xsd?rev=1429251&view=auto == --- xerces/java/branches/xs-1.1-tests/data/assertions/list_union/listunion17.xsd (added) +++ xerces/java/branches/xs-1.1-tests/data/assertions/list_union/listunion17.xsd Sat Jan 5 10:46:27 2013 @@ -0,0 +1,48 @@ +http
svn commit: r1429247 - in /xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs: XMLAssertPsychopathXPath2Impl.java XMLSchemaValidator.java XSDAssertionValidator.java assertion/XSAsse
Author: mukulg Date: Sat Jan 5 10:43:18 2013 New Revision: 1429247 URL: http://svn.apache.org/viewvc?rev=1429247&view=rev Log: schema 1.1 commit: when an attribute's simpleType has assertions and the type is a union of an atomic type and a list, the assertion context variable $value needs to have a relevant typed value. this commit provides few improvements related to this. there are also few minor refactorings and javadoc improvements. Added: xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/assertion/XSAssertConstants.java (with props) Modified: xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/XMLAssertPsychopathXPath2Impl.java 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/XSDAssertionValidator.java xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/util/XS11TypeHelper.java Modified: xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/XMLAssertPsychopathXPath2Impl.java URL: http://svn.apache.org/viewvc/xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/XMLAssertPsychopathXPath2Impl.java?rev=1429247&r1=1429246&r2=1429247&view=diff == --- xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/XMLAssertPsychopathXPath2Impl.java (original) +++ xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/XMLAssertPsychopathXPath2Impl.java Sat Jan 5 10:43:18 2013 @@ -34,6 +34,7 @@ import org.apache.xerces.impl.dv.XSSimpl import org.apache.xerces.impl.dv.xs.XSSimpleTypeDecl; import org.apache.xerces.impl.xs.assertion.XMLAssertAdapter; import org.apache.xerces.impl.xs.assertion.XSAssert; +import org.apache.xerces.impl.xs.assertion.XSAssertConstants; import org.apache.xerces.impl.xs.assertion.XSAssertImpl; import org.apache.xerces.impl.xs.util.ObjectListImpl; import org.apache.xerces.impl.xs.util.XS11TypeHelper; @@ -163,7 +164,7 @@ public class XMLAssertPsychopathXPath2Im } // if we have assertions applicable to this element, store the element reference and the assertions on it on the runtime stacks -List assertionList = (List) augs.getItem("ASSERT"); +List assertionList = (List) augs.getItem(XSAssertConstants.assertList); if (assertionList != null) { fAssertRootStack.push(fCurrentAssertDomNode); fAssertListStack.push(assertionList); @@ -172,7 +173,7 @@ public class XMLAssertPsychopathXPath2Im // evaluate assertions from attributes. evaluation of assertions on attributes in startElement call, helps us setting the PSVI results // for attributes appropriately. -if (((Boolean)augs.getItem("ATTRIBUTES-HAVE-ASSERTS")).booleanValue()) { +if (((Boolean)augs.getItem(XSAssertConstants.isAttrHaveAsserts)).booleanValue()) { evaluateAssertsFromAttributes(element, attributes); } @@ -389,18 +390,18 @@ public class XMLAssertPsychopathXPath2Im // evaluating assertions for "simpleType -> list" evaluateAssertionOnSTListValue(element, value, assertImpl, false, simpleTypeDefn.getItemType(), isTypeDerivedFromList); } -else if (((Boolean)augs.getItem("ASSERT_PROC_NEEDED_FOR_UNION")).booleanValue()) { -// evaluating assertions for "simpleType -> union" -boolean isValueValidWithSTUnion = evaluateAssertionOnSTUnion(element, simpleTypeDefn, isTypeDerivedFromUnion, assertImpl, value, augs); -if (!isValueValidWithSTUnion) { -if (isAttribute) { - fXmlSchemaValidator.reportSchemaError("cvc-attribute.3", new Object[] {element.rawname, attrQname.localpart, value, ((XSSimpleTypeDecl)simpleTypeDefn).getTypeName()}); -} -else { -fXmlSchemaValidator.reportSchemaError("cvc-type.3.1.3", new Object[] {element.rawname, value}); -} +else if (!isAttribute && ((Boolean)augs.getItem(XSAssertConstants.isAssertProcNeededForUnionElem)).booleanValue()) { +// evaluating assertions for "simpleType -> union" for an element +if (!evaluateAssertionOnSTUnion(element, simpleTypeDefn, isTypeDerivedFromUnion, assertImpl, value, augs)) { +fXmlSchemaValidator.reportSchemaError("cvc-type.3.1.3", new Object[] {element.rawname, value}); } } +else if (isAttribute && ((Boolean)augs.getItem(XSAssertConstants.isAssertProcNeededForUnionAttr)).booleanValue()) { +// evaluating assertions for "simpleType -> union"
svn commit: r1428379 - in /xerces/java/trunk/src/org/apache/xerces/impl/xs: XMLSchemaValidator.java util/XS10TypeHelper.java
Author: mukulg Date: Thu Jan 3 14:55:20 2013 New Revision: 1428379 URL: http://svn.apache.org/viewvc?rev=1428379&view=rev Log: schema 1.0 commit: committing a minor fix to produce non null strings for XSD type names in error messages, when xsi:type attribute is used. Added: xerces/java/trunk/src/org/apache/xerces/impl/xs/util/XS10TypeHelper.java (with props) Modified: xerces/java/trunk/src/org/apache/xerces/impl/xs/XMLSchemaValidator.java Modified: xerces/java/trunk/src/org/apache/xerces/impl/xs/XMLSchemaValidator.java URL: http://svn.apache.org/viewvc/xerces/java/trunk/src/org/apache/xerces/impl/xs/XMLSchemaValidator.java?rev=1428379&r1=1428378&r2=1428379&view=diff == --- xerces/java/trunk/src/org/apache/xerces/impl/xs/XMLSchemaValidator.java (original) +++ xerces/java/trunk/src/org/apache/xerces/impl/xs/XMLSchemaValidator.java Thu Jan 3 14:55:20 2013 @@ -51,6 +51,7 @@ import org.apache.xerces.impl.xs.identit import org.apache.xerces.impl.xs.models.CMBuilder; import org.apache.xerces.impl.xs.models.CMNodeFactory; import org.apache.xerces.impl.xs.models.XSCMValidator; +import org.apache.xerces.impl.xs.util.XS10TypeHelper; import org.apache.xerces.util.AugmentationsImpl; import org.apache.xerces.util.IntStack; import org.apache.xerces.util.SymbolTable; @@ -2850,7 +2851,7 @@ public class XMLSchemaValidator if (!XSConstraints.checkTypeDerivationOk(type, fCurrentType, block)) { reportSchemaError( "cvc-elt.4.3", -new Object[] { element.rawname, xsiType, fCurrentType.getName()}); +new Object[] { element.rawname, xsiType, XS10TypeHelper.getSchemaTypeName(fCurrentType)}); } } Added: xerces/java/trunk/src/org/apache/xerces/impl/xs/util/XS10TypeHelper.java URL: http://svn.apache.org/viewvc/xerces/java/trunk/src/org/apache/xerces/impl/xs/util/XS10TypeHelper.java?rev=1428379&view=auto == --- xerces/java/trunk/src/org/apache/xerces/impl/xs/util/XS10TypeHelper.java (added) +++ xerces/java/trunk/src/org/apache/xerces/impl/xs/util/XS10TypeHelper.java Thu Jan 3 14:55:20 2013 @@ -0,0 +1,62 @@ +/* + * 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.util; + +import org.apache.xerces.impl.dv.xs.XSSimpleTypeDecl; +import org.apache.xerces.impl.xs.XSComplexTypeDecl; +import org.apache.xerces.xs.XSSimpleTypeDefinition; +import org.apache.xerces.xs.XSTypeDefinition; + +/** + * Class defining utility/helper methods to support XML Schema 1.0 implementation. + * + * @xerces.internal + * + * @author Mukul Gandhi, IBM + * @version $Id$ + */ +public class XS10TypeHelper { + +/* + * Class constructor. + */ +private XS10TypeHelper() { + // a private constructor, to prohibit instantiating this class from an outside class/application. + // this is a good practice, since all methods of this class are "static". +} + +/* + * Get name of an XSD type definition as a string value (which will typically be the value of "name" attribute of a + * type definition, or an internal name determined by the validator for anonymous types). + */ +public static String getSchemaTypeName(XSTypeDefinition typeDefn) { + +String typeNameStr = ""; +if (typeDefn instanceof XSSimpleTypeDefinition) { +typeNameStr = ((XSSimpleTypeDecl) typeDefn).getTypeName(); +} +else { +typeNameStr = ((XSComplexTypeDecl) typeDefn).getTypeName(); +} + +return typeNameStr; + +} // getSchemaTypeName + + +} // class XS10TypeHelper Propchange: xerces/java/trunk/src/org/apache/xerces/impl/xs/util/XS10TypeHelper.java -- svn:eol-style = native Propchange: xerces/java/trunk/src/org/apache/xerces/impl/xs/util/XS10TypeHelper.java -
svn commit: r1428373 - in /xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs: XMLSchemaValidator.java util/XS11TypeHelper.java
Author: mukulg Date: Thu Jan 3 14:53:36 2013 New Revision: 1428373 URL: http://svn.apache.org/viewvc?rev=1428373&view=rev Log: schema 1.1 commit: committing a minor fix to produce non null strings for XSD type names in error messages, when xsi:type attribute is used. 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/util/XS11TypeHelper.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=1428373&r1=1428372&r2=1428373&view=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 Jan 3 14:53:36 2013 @@ -3220,7 +3220,7 @@ public class XMLSchemaValidator if (!fXSConstraints.checkTypeDerivationOk(type, fCurrentType, block)) { reportSchemaError( "cvc-elt.4.3", -new Object[] { element.rawname, xsiType, fCurrentType.getName()}); +new Object[] { element.rawname, xsiType, XS11TypeHelper.getSchemaTypeName(fCurrentType)}); } } @@ -3295,7 +3295,7 @@ public class XMLSchemaValidator } if (!fXSConstraints.checkTypeDerivationOk(type, fCurrentType, block)) { errorList.add("cvc-elt.4.3"); -errorList.add(new Object[] { element.rawname, xsiType, fCurrentType.getName()}); +errorList.add(new Object[] { element.rawname, xsiType, XS11TypeHelper.getSchemaTypeName(fCurrentType)}); } } Modified: xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/util/XS11TypeHelper.java URL: http://svn.apache.org/viewvc/xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/util/XS11TypeHelper.java?rev=1428373&r1=1428372&r2=1428373&view=diff == --- xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/util/XS11TypeHelper.java (original) +++ xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/util/XS11TypeHelper.java Thu Jan 3 14:53:36 2013 @@ -266,8 +266,8 @@ public class XS11TypeHelper { /* - * Get string value of type name of an XML Schema type definition. This method is useful if XML Schema validator specific names, - * of anonymous types are also needed. + * Get name of an XSD type definition as a string value (which will typically be the value of "name" attribute of a + * type definition, or an internal name determined by the validator for anonymous types). */ public static String getSchemaTypeName(XSTypeDefinition typeDefn) { - To unsubscribe, e-mail: commits-unsubscr...@xerces.apache.org For additional commands, e-mail: commits-h...@xerces.apache.org
svn commit: r1427173 - in /xerces/java/branches/xs-1.1-tests: data/assertions/list_union/ src/org/apache/xerces/tests/
Author: mukulg Date: Mon Dec 31 16:44:46 2012 New Revision: 1427173 URL: http://svn.apache.org/viewvc?rev=1427173&view=rev Log: schema 1.1 commit: committing few new test cases for the implementation improvement done in a commit few minutes ago. Added: xerces/java/branches/xs-1.1-tests/data/assertions/list_union/listunion14_1.xml xerces/java/branches/xs-1.1-tests/data/assertions/list_union/listunion14_1.xsd xerces/java/branches/xs-1.1-tests/data/assertions/list_union/listunion14_2.xml xerces/java/branches/xs-1.1-tests/data/assertions/list_union/listunion14_2.xsd xerces/java/branches/xs-1.1-tests/data/assertions/list_union/listunion14_3.xsd xerces/java/branches/xs-1.1-tests/data/assertions/list_union/listunion14_4.xsd xerces/java/branches/xs-1.1-tests/data/assertions/list_union/listunion15_1.xml xerces/java/branches/xs-1.1-tests/data/assertions/list_union/listunion15_1.xsd xerces/java/branches/xs-1.1-tests/data/assertions/list_union/listunion15_2.xml Modified: xerces/java/branches/xs-1.1-tests/src/org/apache/xerces/tests/AssertionTests.java Added: xerces/java/branches/xs-1.1-tests/data/assertions/list_union/listunion14_1.xml URL: http://svn.apache.org/viewvc/xerces/java/branches/xs-1.1-tests/data/assertions/list_union/listunion14_1.xml?rev=1427173&view=auto == --- xerces/java/branches/xs-1.1-tests/data/assertions/list_union/listunion14_1.xml (added) +++ xerces/java/branches/xs-1.1-tests/data/assertions/list_union/listunion14_1.xml Mon Dec 31 16:44:46 2012 @@ -0,0 +1 @@ +2005-10-09 2007-05-07 2007-05-03 \ No newline at end of file Added: xerces/java/branches/xs-1.1-tests/data/assertions/list_union/listunion14_1.xsd URL: http://svn.apache.org/viewvc/xerces/java/branches/xs-1.1-tests/data/assertions/list_union/listunion14_1.xsd?rev=1427173&view=auto == --- xerces/java/branches/xs-1.1-tests/data/assertions/list_union/listunion14_1.xsd (added) +++ xerces/java/branches/xs-1.1-tests/data/assertions/list_union/listunion14_1.xsd Mon Dec 31 16:44:46 2012 @@ -0,0 +1,20 @@ +http://www.w3.org/2001/XMLSchema";> + + + + + + + + + + + + + + + + + + + \ No newline at end of file Added: xerces/java/branches/xs-1.1-tests/data/assertions/list_union/listunion14_2.xml URL: http://svn.apache.org/viewvc/xerces/java/branches/xs-1.1-tests/data/assertions/list_union/listunion14_2.xml?rev=1427173&view=auto == --- xerces/java/branches/xs-1.1-tests/data/assertions/list_union/listunion14_2.xml (added) +++ xerces/java/branches/xs-1.1-tests/data/assertions/list_union/listunion14_2.xml Mon Dec 31 16:44:46 2012 @@ -0,0 +1 @@ +100 \ No newline at end of file Added: xerces/java/branches/xs-1.1-tests/data/assertions/list_union/listunion14_2.xsd URL: http://svn.apache.org/viewvc/xerces/java/branches/xs-1.1-tests/data/assertions/list_union/listunion14_2.xsd?rev=1427173&view=auto == --- xerces/java/branches/xs-1.1-tests/data/assertions/list_union/listunion14_2.xsd (added) +++ xerces/java/branches/xs-1.1-tests/data/assertions/list_union/listunion14_2.xsd Mon Dec 31 16:44:46 2012 @@ -0,0 +1,19 @@ +http://www.w3.org/2001/XMLSchema";> + + + + + + + + + + + + + + + + + + \ No newline at end of file Added: xerces/java/branches/xs-1.1-tests/data/assertions/list_union/listunion14_3.xsd URL: http://svn.apache.org/viewvc/xerces/java/branches/xs-1.1-tests/data/assertions/list_union/listunion14_3.xsd?rev=1427173&view=auto == --- xerces/java/branches/xs-1.1-tests/data/assertions/list_union/listunion14_3.xsd (added) +++ xerces/java/branches/xs-1.1-tests/data/assertions/list_union/listunion14_3.xsd Mon Dec 31 16:44:46 2012 @@ -0,0 +1,22 @@ +http://www.w3.org/2001/XMLSchema";> + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file Added: xerces/java/branches/xs-1.1-tests/data/assertions/list_union/listunion14_4.xsd URL: http://svn.apache.org/viewvc/xerces/java/branches/xs-1.1-tests/data/assertio
svn commit: r1427171 - in /xerces/java/branches/xml-schema-1.1-dev: src/org/apache/xerces/impl/xs/ src/org/apache/xerces/impl/xs/assertion/ tools/
Author: mukulg Date: Mon Dec 31 16:41:17 2012 New Revision: 1427171 URL: http://svn.apache.org/viewvc?rev=1427171&view=rev Log: schema 1.1 commit: 1) committing few fixes to assertions implementation. assertion xpath2 context variable $value now handles better the case, when it represents a value for simpleType which is a union of an atomic type and a list. 2) a new psychopath xpath2 jar is also provided, with corresponding improvements to computing typed value of a node (the codebase at Eclipse repository was also updated). Modified: xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/XMLAssertPsychopathXPath2Impl.java xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/assertion/XSAssertionXPath2Value.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/tools/org.eclipse.wst.xml.xpath2.processor_1.2.0.jar Modified: xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/XMLAssertPsychopathXPath2Impl.java URL: http://svn.apache.org/viewvc/xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/XMLAssertPsychopathXPath2Impl.java?rev=1427171&r1=1427170&r2=1427171&view=diff == --- xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/XMLAssertPsychopathXPath2Impl.java (original) +++ xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/XMLAssertPsychopathXPath2Impl.java Mon Dec 31 16:41:17 2012 @@ -466,7 +466,7 @@ public class XMLAssertPsychopathXPath2Im /* * Evaluate assertion on a simpleType with variety xs:union. */ -private boolean evaluateAssertionOnSTUnion(QName element, XSSimpleTypeDefinition simpleTypeDefn, boolean isTypeDerivedFromUnion, XSAssertImpl assertImpl, String value, Augmentations augs) { +private boolean evaluateAssertionOnSTUnion(QName element, XSSimpleTypeDefinition simpleTypeDefn, boolean isTypeDerivedFromUnion, XSAssertImpl assertImpl, String value, Augmentations augs) throws Exception { boolean isValueValid = true; @@ -509,7 +509,7 @@ public class XMLAssertPsychopathXPath2Im if (value != null) { // complex type with simple content restorePsviInfoForXPathContext(elemPsvi); -setXDMTypedValueOf$value(fCurrentAssertDomNode, value, null, null, false, fXpath2DynamicContext); +setXDMValueOf$valueForCTWithSimpleContent(value, (XSComplexTypeDefinition)elemPsvi.getTypeDefinition(), fXpath2DynamicContext); savePsviInfoWithUntypingOfAssertRoot(elemPsvi, true); } else { // complex type with complex content. set xpath context variable $value to an empty sequence. @@ -618,12 +618,13 @@ public class XMLAssertPsychopathXPath2Im boolean isValidationFailedForUnion = true; final int memberTypesLength = memberTypes.getLength(); +int memberTypesHavingAsserts = 0; for (int memberTypeIdx = 0; memberTypeIdx < memberTypesLength; memberTypeIdx++) { XSSimpleTypeDefinition memType = (XSSimpleTypeDefinition) memberTypes.item(memberTypeIdx); - // check for assertions on types in an non-schema namespace if (!SchemaSymbols.URI_SCHEMAFORSCHEMA.equals(memType.getNamespace()) && XS11TypeHelper.simpleTypeHasAsserts(memType)) { +memberTypesHavingAsserts++; XSObjectList memberTypeFacets = memType.getMultiValueFacets(); final int memberTypeFacetsLength = memberTypeFacets.getLength(); for (int memberTypeFacetIdx = 0; memberTypeFacetIdx < memberTypeFacetsLength; memberTypeFacetIdx++) { @@ -659,13 +660,22 @@ public class XMLAssertPsychopathXPath2Im else { ((AttributePSVImpl) attrPSVI).fValue.memberType = (XSSimpleType) memType; } -return false; +isValidationFailedForUnion = false; +break; } } } +if (!isValidationFailedForUnion) { +break; +} } } +if (memberTypesHavingAsserts == 0) { + // none of the member types have asserts. therefore, validation cannot fail due to checks from this method. + isValidationFailedForUnion = false; +} + return isValidationFailedForUnion; } // isValidationFailedForSTUnion Modified: xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/assertion/XSAssertionXPath2Value.java URL: http://svn.apache.org/viewvc/xerces/java/branches/xml
svn commit: r1426378 - in /xerces/java/branches/xs-1.1-tests: data/jira_bugs/1599_1.xsd data/jira_bugs/1599_2.xsd data/jira_bugs/1599_3.xsd data/jira_bugs/1599_override.xsd src/org/apache/xerces/tests
Author: mukulg Date: Fri Dec 28 01:37:53 2012 New Revision: 1426378 URL: http://svn.apache.org/viewvc?rev=1426378&view=rev Log: committing fix for jira issue, XERCESJ-1599 along with few test cases. Added: xerces/java/branches/xs-1.1-tests/data/jira_bugs/1599_1.xsd xerces/java/branches/xs-1.1-tests/data/jira_bugs/1599_2.xsd xerces/java/branches/xs-1.1-tests/data/jira_bugs/1599_3.xsd xerces/java/branches/xs-1.1-tests/data/jira_bugs/1599_override.xsd Modified: xerces/java/branches/xs-1.1-tests/src/org/apache/xerces/tests/JiraBugsTests.java Added: xerces/java/branches/xs-1.1-tests/data/jira_bugs/1599_1.xsd URL: http://svn.apache.org/viewvc/xerces/java/branches/xs-1.1-tests/data/jira_bugs/1599_1.xsd?rev=1426378&view=auto == --- xerces/java/branches/xs-1.1-tests/data/jira_bugs/1599_1.xsd (added) +++ xerces/java/branches/xs-1.1-tests/data/jira_bugs/1599_1.xsd Fri Dec 28 01:37:53 2012 @@ -0,0 +1,15 @@ +http://www.w3.org/2001/XMLSchema"; targetNamespace="schemaNS" xmlns:ns="schemaNS"> + + + + + + + + + + + + + + \ No newline at end of file Added: xerces/java/branches/xs-1.1-tests/data/jira_bugs/1599_2.xsd URL: http://svn.apache.org/viewvc/xerces/java/branches/xs-1.1-tests/data/jira_bugs/1599_2.xsd?rev=1426378&view=auto == --- xerces/java/branches/xs-1.1-tests/data/jira_bugs/1599_2.xsd (added) +++ xerces/java/branches/xs-1.1-tests/data/jira_bugs/1599_2.xsd Fri Dec 28 01:37:53 2012 @@ -0,0 +1,15 @@ +http://www.w3.org/2001/XMLSchema"; targetNamespace="schemaNS"> + + + + + + + + + + + + + + \ No newline at end of file Added: xerces/java/branches/xs-1.1-tests/data/jira_bugs/1599_3.xsd URL: http://svn.apache.org/viewvc/xerces/java/branches/xs-1.1-tests/data/jira_bugs/1599_3.xsd?rev=1426378&view=auto == --- xerces/java/branches/xs-1.1-tests/data/jira_bugs/1599_3.xsd (added) +++ xerces/java/branches/xs-1.1-tests/data/jira_bugs/1599_3.xsd Fri Dec 28 01:37:53 2012 @@ -0,0 +1,15 @@ +http://www.w3.org/2001/XMLSchema"; targetNamespace="schemaNS"> + + + + + + + + + + + + + + \ No newline at end of file Added: xerces/java/branches/xs-1.1-tests/data/jira_bugs/1599_override.xsd URL: http://svn.apache.org/viewvc/xerces/java/branches/xs-1.1-tests/data/jira_bugs/1599_override.xsd?rev=1426378&view=auto == --- xerces/java/branches/xs-1.1-tests/data/jira_bugs/1599_override.xsd (added) +++ xerces/java/branches/xs-1.1-tests/data/jira_bugs/1599_override.xsd Fri Dec 28 01:37:53 2012 @@ -0,0 +1,11 @@ + +http://www.w3.org/2001/XMLSchema"; targetNamespace="schemaNS"> + + + + + + + + + \ No newline at end of file Modified: xerces/java/branches/xs-1.1-tests/src/org/apache/xerces/tests/JiraBugsTests.java URL: http://svn.apache.org/viewvc/xerces/java/branches/xs-1.1-tests/src/org/apache/xerces/tests/JiraBugsTests.java?rev=1426378&r1=1426377&r2=1426378&view=diff == --- xerces/java/branches/xs-1.1-tests/src/org/apache/xerces/tests/JiraBugsTests.java (original) +++ xerces/java/branches/xs-1.1-tests/src/org/apache/xerces/tests/JiraBugsTests.java Fri Dec 28 01:37:53 2012 @@ -312,5 +312,41 @@ public class JiraBugsTests extends Xerce assertTrue(false); } } + + public void testJira_1599_1() { + String schemapath = fDataDir+"/jira_bugs/1599_1.xsd"; + try { + Schema s = fSchemaFactory.newSchema(new StreamSource(schemapath)); +assertNull(fErrSysId); +assertNull(fFatErrSysId); + } catch(Exception ex) { + ex.printStackTrace(); + assertTrue(false); + } + } + + public void testJira_1599_2() { + String schemapath = fDataDir+"/jira_bugs/1599_2.xsd"; + try { + Schema s = fSchemaFactory.newSchema(new StreamSource(schemapath)); +assertNull(fErrSysId); +assertNull(fFatErrSysId); + } catch(Exception ex) { +
svn commit: r1426377 - /xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/XSDHandler.java
Author: mukulg Date: Fri Dec 28 01:37:22 2012 New Revision: 1426377 URL: http://svn.apache.org/viewvc?rev=1426377&view=rev Log: committing fix for jira issue, XERCESJ-1599 along with few test cases. Modified: xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/XSDHandler.java Modified: xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/XSDHandler.java URL: http://svn.apache.org/viewvc/xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/XSDHandler.java?rev=1426377&r1=1426376&r2=1426377&view=diff == --- xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/XSDHandler.java (original) +++ xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/XSDHandler.java Fri Dec 28 01:37:22 2012 @@ -391,6 +391,10 @@ public class XSDHandler { // objects that correspond to the documents being redefined. private Hashtable fRedefine2XSDMap = new Hashtable(); +// map between a schema document and the schema documents it is overriding. +// schema documents are represented by XSDocumentInfo objects. +private Hashtable fOverrideDependencyMap = new Hashtable(); + // map between elements and the namespace support private Hashtable fRedefine2NSSupport = new Hashtable(); @@ -997,6 +1001,7 @@ public class XSDHandler { fDoc2XSDocumentMap.put(schemaRoot, currSchemaInfo); Vector dependencies = new Vector(); +Vector overrideDependencies = new Vector(); Element rootNode = schemaRoot; Element newSchemaRoot = null; @@ -1271,6 +1276,10 @@ public class XSDHandler { // rename the right things later! fRedefine2XSDMap.put(child, newSchemaInfo); } +if (fSchemaVersion == Constants.SCHEMA_VERSION_1_1 && localName.equals(SchemaSymbols.ELT_OVERRIDE) && newSchemaInfo != null) { +// record this override dependency +overrideDependencies.addElement(newSchemaInfo); +} if (newSchemaRoot != null) { if (newSchemaInfo != null) dependencies.addElement(newSchemaInfo); @@ -1278,6 +1287,9 @@ public class XSDHandler { } } +if (fSchemaVersion == Constants.SCHEMA_VERSION_1_1) { + fOverrideDependencyMap.put(currSchemaInfo, overrideDependencies); +} fDependencyMap.put(currSchemaInfo, dependencies); return currSchemaInfo; } // end constructTrees @@ -3955,6 +3967,20 @@ public class XSDHandler { //XSDocumentInfo currSchema = (XSDocumentInfo)fDoc2XSDocumentMap.get(DOMUtil.getRoot(DOMUtil.getDocument(currElem))); XSDocumentInfo currSchema = fLocalElementDecl_schema[i]; SchemaGrammar currGrammar = fGrammarBucket.getGrammar(currSchema.fTargetNamespace); +XSDocumentInfo overridingSchema = getOverridingSchemaDocument(currSchema); +if (overridingSchema != null) { +// if this schema was overriden, augment the namespace bindings of the current schema with +// namespace bindings from the overriding schema. REVISIT: doesn't prohibit namespace bindings of +// current schema being used. +SchemaNamespaceSupport namespaceSupport = overridingSchema.fNamespaceSupport; +Enumeration prefixes = namespaceSupport.getAllPrefixes(); +while (prefixes.hasMoreElements()) { +String prefix = (String)prefixes.nextElement(); +if (!(currSchema.fNamespaceSupport.containsPrefix(prefix))) { +currSchema.fNamespaceSupport.declarePrefix(prefix, namespaceSupport.getURI(prefix)); +} +} +} fElementTraverser.traverseLocal (fParticle[i], currElem, currSchema, currGrammar, fAllContext[i], fParent[i], fLocalElemNamespaceContext[i]); // If it's an empty particle, remove it from the containing component. if (fParticle[i].fType == XSParticleDecl.PARTICLE_EMPTY) { @@ -3971,8 +3997,30 @@ public class XSDHandler { removeParticle(group, fParticle[i]); } } -} +} +/* + * Find if the current schema document is overridden by another schema document. If yes, then + * return the overriding schema document. + */ +private XSDocumentInfo getOverridingSchemaDocument(XSDocumentInfo currSchema) { + +XSDocumentInfo schemaDoc = null; + +Enumeration overridingSchemas = fOverrideDependencyMap.keys(); +while (overridingSchemas.hasMoreElements()) { +XSDocume
svn commit: r1422553 - /xerces/java/branches/xs-1.1-tests/src/org/apache/xerces/tests/XercesAbstractTestCase.java
Author: mukulg Date: Sun Dec 16 11:54:02 2012 New Revision: 1422553 URL: http://svn.apache.org/viewvc?rev=1422553&view=rev Log: doing a minor spelling correction Modified: xerces/java/branches/xs-1.1-tests/src/org/apache/xerces/tests/XercesAbstractTestCase.java Modified: xerces/java/branches/xs-1.1-tests/src/org/apache/xerces/tests/XercesAbstractTestCase.java URL: http://svn.apache.org/viewvc/xerces/java/branches/xs-1.1-tests/src/org/apache/xerces/tests/XercesAbstractTestCase.java?rev=1422553&r1=1422552&r2=1422553&view=diff == --- xerces/java/branches/xs-1.1-tests/src/org/apache/xerces/tests/XercesAbstractTestCase.java (original) +++ xerces/java/branches/xs-1.1-tests/src/org/apache/xerces/tests/XercesAbstractTestCase.java Sun Dec 16 11:54:02 2012 @@ -109,7 +109,7 @@ public class XercesAbstractTestCase exte /* -* Are error messages generated during the validation episode, as per specified in the test case. +* Are error messages generated during the validation episode, as specified in the test case. */ public boolean areErrorMessagesConsistent(List expectedMsgList) { boolean isErrorMesgsOk = true; - To unsubscribe, e-mail: commits-unsubscr...@xerces.apache.org For additional commands, e-mail: commits-h...@xerces.apache.org
svn commit: r1422538 - /xerces/java/branches/xs-1.1-tests/src/org/apache/xerces/tests/
Author: mukulg Date: Sun Dec 16 11:41:22 2012 New Revision: 1422538 URL: http://svn.apache.org/viewvc?rev=1422538&view=rev Log: trying svn keyword substitution once again. apologies for multiple commits. Modified: xerces/java/branches/xs-1.1-tests/src/org/apache/xerces/tests/AllXercesXSD11Tests.java xerces/java/branches/xs-1.1-tests/src/org/apache/xerces/tests/AssertionTests.java xerces/java/branches/xs-1.1-tests/src/org/apache/xerces/tests/AttributeTests.java xerces/java/branches/xs-1.1-tests/src/org/apache/xerces/tests/CompositorTests.java xerces/java/branches/xs-1.1-tests/src/org/apache/xerces/tests/ConditionalInclusionTests.java xerces/java/branches/xs-1.1-tests/src/org/apache/xerces/tests/FailureMesgFragments.java xerces/java/branches/xs-1.1-tests/src/org/apache/xerces/tests/GenericTests.java xerces/java/branches/xs-1.1-tests/src/org/apache/xerces/tests/IDConstraintTests.java xerces/java/branches/xs-1.1-tests/src/org/apache/xerces/tests/JiraBugsTests.java xerces/java/branches/xs-1.1-tests/src/org/apache/xerces/tests/OpenContentTests.java xerces/java/branches/xs-1.1-tests/src/org/apache/xerces/tests/OverrideTests.java xerces/java/branches/xs-1.1-tests/src/org/apache/xerces/tests/PSVIHandler.java xerces/java/branches/xs-1.1-tests/src/org/apache/xerces/tests/PSVITests.java xerces/java/branches/xs-1.1-tests/src/org/apache/xerces/tests/RedefineTests.java xerces/java/branches/xs-1.1-tests/src/org/apache/xerces/tests/SimpleTypeTests.java xerces/java/branches/xs-1.1-tests/src/org/apache/xerces/tests/SubstitutionGroupTests.java xerces/java/branches/xs-1.1-tests/src/org/apache/xerces/tests/TargetNamespaceTests.java xerces/java/branches/xs-1.1-tests/src/org/apache/xerces/tests/TypeAlternativeTests.java xerces/java/branches/xs-1.1-tests/src/org/apache/xerces/tests/XercesAbstractTestCase.java Modified: xerces/java/branches/xs-1.1-tests/src/org/apache/xerces/tests/AllXercesXSD11Tests.java URL: http://svn.apache.org/viewvc/xerces/java/branches/xs-1.1-tests/src/org/apache/xerces/tests/AllXercesXSD11Tests.java?rev=1422538&r1=1422537&r2=1422538&view=diff == --- xerces/java/branches/xs-1.1-tests/src/org/apache/xerces/tests/AllXercesXSD11Tests.java (original) +++ xerces/java/branches/xs-1.1-tests/src/org/apache/xerces/tests/AllXercesXSD11Tests.java Sun Dec 16 11:41:22 2012 @@ -24,7 +24,7 @@ import junit.framework.TestSuite; * @xerces.internal * * @author: Mukul Gandhi IBM - * @version $Id + * @version $Id$ */ public class AllXercesXSD11Tests { Modified: xerces/java/branches/xs-1.1-tests/src/org/apache/xerces/tests/AssertionTests.java URL: http://svn.apache.org/viewvc/xerces/java/branches/xs-1.1-tests/src/org/apache/xerces/tests/AssertionTests.java?rev=1422538&r1=1422537&r2=1422538&view=diff == --- xerces/java/branches/xs-1.1-tests/src/org/apache/xerces/tests/AssertionTests.java (original) +++ xerces/java/branches/xs-1.1-tests/src/org/apache/xerces/tests/AssertionTests.java Sun Dec 16 11:41:22 2012 @@ -28,7 +28,7 @@ import javax.xml.validation.Validator; * @xerces.internal * * @author: Mukul Gandhi IBM - * @version $Id + * @version $Id$ */ public class AssertionTests extends XercesAbstractTestCase { Modified: xerces/java/branches/xs-1.1-tests/src/org/apache/xerces/tests/AttributeTests.java URL: http://svn.apache.org/viewvc/xerces/java/branches/xs-1.1-tests/src/org/apache/xerces/tests/AttributeTests.java?rev=1422538&r1=1422537&r2=1422538&view=diff == --- xerces/java/branches/xs-1.1-tests/src/org/apache/xerces/tests/AttributeTests.java (original) +++ xerces/java/branches/xs-1.1-tests/src/org/apache/xerces/tests/AttributeTests.java Sun Dec 16 11:41:22 2012 @@ -28,7 +28,7 @@ import javax.xml.validation.Validator; * @xerces.internal * * @author: Mukul Gandhi IBM - * @version $Id + * @version $Id$ */ public class AttributeTests extends XercesAbstractTestCase { Modified: xerces/java/branches/xs-1.1-tests/src/org/apache/xerces/tests/CompositorTests.java URL: http://svn.apache.org/viewvc/xerces/java/branches/xs-1.1-tests/src/org/apache/xerces/tests/CompositorTests.java?rev=1422538&r1=1422537&r2=1422538&view=diff == --- xerces/java/branches/xs-1.1-tests/src/org/apache/xerces/tests/CompositorTests.java (original) +++ xerces/java/branches/xs-1.1-tests/src/org/apache/xerces/tests/CompositorTests.java Sun Dec 16 11:41:22 2012 @@ -28,7 +28,7 @@ import javax.xml.validation.Validator; * @xerces.internal * * @author: Mukul Gandhi IBM - * @version $Id + * @version $Id$ */ public class CompositorTests extends XercesAbstract
svn commit: r1422534 - /xerces/java/branches/xs-1.1-tests/src/org/apache/xerces/tests/
Author: mukulg Date: Sun Dec 16 11:33:38 2012 New Revision: 1422534 URL: http://svn.apache.org/viewvc?rev=1422534&view=rev Log: trying to fix class metadata again. I hope it gets right this time. Modified: xerces/java/branches/xs-1.1-tests/src/org/apache/xerces/tests/AllXercesXSD11Tests.java xerces/java/branches/xs-1.1-tests/src/org/apache/xerces/tests/AssertionTests.java xerces/java/branches/xs-1.1-tests/src/org/apache/xerces/tests/AttributeTests.java xerces/java/branches/xs-1.1-tests/src/org/apache/xerces/tests/CompositorTests.java xerces/java/branches/xs-1.1-tests/src/org/apache/xerces/tests/ConditionalInclusionTests.java xerces/java/branches/xs-1.1-tests/src/org/apache/xerces/tests/FailureMesgFragments.java xerces/java/branches/xs-1.1-tests/src/org/apache/xerces/tests/GenericTests.java xerces/java/branches/xs-1.1-tests/src/org/apache/xerces/tests/IDConstraintTests.java xerces/java/branches/xs-1.1-tests/src/org/apache/xerces/tests/JiraBugsTests.java xerces/java/branches/xs-1.1-tests/src/org/apache/xerces/tests/OpenContentTests.java xerces/java/branches/xs-1.1-tests/src/org/apache/xerces/tests/OverrideTests.java xerces/java/branches/xs-1.1-tests/src/org/apache/xerces/tests/PSVIHandler.java xerces/java/branches/xs-1.1-tests/src/org/apache/xerces/tests/PSVITests.java xerces/java/branches/xs-1.1-tests/src/org/apache/xerces/tests/RedefineTests.java xerces/java/branches/xs-1.1-tests/src/org/apache/xerces/tests/SimpleTypeTests.java xerces/java/branches/xs-1.1-tests/src/org/apache/xerces/tests/SubstitutionGroupTests.java xerces/java/branches/xs-1.1-tests/src/org/apache/xerces/tests/TargetNamespaceTests.java xerces/java/branches/xs-1.1-tests/src/org/apache/xerces/tests/TypeAlternativeTests.java xerces/java/branches/xs-1.1-tests/src/org/apache/xerces/tests/XercesAbstractTestCase.java Modified: xerces/java/branches/xs-1.1-tests/src/org/apache/xerces/tests/AllXercesXSD11Tests.java URL: http://svn.apache.org/viewvc/xerces/java/branches/xs-1.1-tests/src/org/apache/xerces/tests/AllXercesXSD11Tests.java?rev=1422534&r1=1422533&r2=1422534&view=diff == --- xerces/java/branches/xs-1.1-tests/src/org/apache/xerces/tests/AllXercesXSD11Tests.java (original) +++ xerces/java/branches/xs-1.1-tests/src/org/apache/xerces/tests/AllXercesXSD11Tests.java Sun Dec 16 11:33:38 2012 @@ -24,7 +24,7 @@ import junit.framework.TestSuite; * @xerces.internal * * @author: Mukul Gandhi IBM - * @version $Id: + * @version $Id */ public class AllXercesXSD11Tests { Modified: xerces/java/branches/xs-1.1-tests/src/org/apache/xerces/tests/AssertionTests.java URL: http://svn.apache.org/viewvc/xerces/java/branches/xs-1.1-tests/src/org/apache/xerces/tests/AssertionTests.java?rev=1422534&r1=1422533&r2=1422534&view=diff == --- xerces/java/branches/xs-1.1-tests/src/org/apache/xerces/tests/AssertionTests.java (original) +++ xerces/java/branches/xs-1.1-tests/src/org/apache/xerces/tests/AssertionTests.java Sun Dec 16 11:33:38 2012 @@ -28,7 +28,7 @@ import javax.xml.validation.Validator; * @xerces.internal * * @author: Mukul Gandhi IBM - * @version $Id: + * @version $Id */ public class AssertionTests extends XercesAbstractTestCase { Modified: xerces/java/branches/xs-1.1-tests/src/org/apache/xerces/tests/AttributeTests.java URL: http://svn.apache.org/viewvc/xerces/java/branches/xs-1.1-tests/src/org/apache/xerces/tests/AttributeTests.java?rev=1422534&r1=1422533&r2=1422534&view=diff == --- xerces/java/branches/xs-1.1-tests/src/org/apache/xerces/tests/AttributeTests.java (original) +++ xerces/java/branches/xs-1.1-tests/src/org/apache/xerces/tests/AttributeTests.java Sun Dec 16 11:33:38 2012 @@ -28,7 +28,7 @@ import javax.xml.validation.Validator; * @xerces.internal * * @author: Mukul Gandhi IBM - * @version $Id: + * @version $Id */ public class AttributeTests extends XercesAbstractTestCase { Modified: xerces/java/branches/xs-1.1-tests/src/org/apache/xerces/tests/CompositorTests.java URL: http://svn.apache.org/viewvc/xerces/java/branches/xs-1.1-tests/src/org/apache/xerces/tests/CompositorTests.java?rev=1422534&r1=1422533&r2=1422534&view=diff == --- xerces/java/branches/xs-1.1-tests/src/org/apache/xerces/tests/CompositorTests.java (original) +++ xerces/java/branches/xs-1.1-tests/src/org/apache/xerces/tests/CompositorTests.java Sun Dec 16 11:33:38 2012 @@ -28,7 +28,7 @@ import javax.xml.validation.Validator; * @xerces.internal * * @author: Mukul Gandhi IBM - * @version $Id: + * @version $Id */ public class CompositorTests extends XercesAbstractTestCa
svn commit: r1422528 - /xerces/java/branches/xs-1.1-tests/src/org/apache/xerces/tests/
Author: mukulg Date: Sun Dec 16 11:24:54 2012 New Revision: 1422528 URL: http://svn.apache.org/viewvc?rev=1422528&view=rev Log: adding class metadata like author name etc to schema 1.1 unit test files Modified: xerces/java/branches/xs-1.1-tests/src/org/apache/xerces/tests/AllXercesXSD11Tests.java xerces/java/branches/xs-1.1-tests/src/org/apache/xerces/tests/AssertionTests.java xerces/java/branches/xs-1.1-tests/src/org/apache/xerces/tests/AttributeTests.java xerces/java/branches/xs-1.1-tests/src/org/apache/xerces/tests/CompositorTests.java xerces/java/branches/xs-1.1-tests/src/org/apache/xerces/tests/ConditionalInclusionTests.java xerces/java/branches/xs-1.1-tests/src/org/apache/xerces/tests/FailureMesgFragments.java xerces/java/branches/xs-1.1-tests/src/org/apache/xerces/tests/GenericTests.java xerces/java/branches/xs-1.1-tests/src/org/apache/xerces/tests/IDConstraintTests.java xerces/java/branches/xs-1.1-tests/src/org/apache/xerces/tests/JiraBugsTests.java xerces/java/branches/xs-1.1-tests/src/org/apache/xerces/tests/OpenContentTests.java xerces/java/branches/xs-1.1-tests/src/org/apache/xerces/tests/OverrideTests.java xerces/java/branches/xs-1.1-tests/src/org/apache/xerces/tests/PSVIHandler.java xerces/java/branches/xs-1.1-tests/src/org/apache/xerces/tests/PSVITests.java xerces/java/branches/xs-1.1-tests/src/org/apache/xerces/tests/RedefineTests.java xerces/java/branches/xs-1.1-tests/src/org/apache/xerces/tests/SimpleTypeTests.java xerces/java/branches/xs-1.1-tests/src/org/apache/xerces/tests/SubstitutionGroupTests.java xerces/java/branches/xs-1.1-tests/src/org/apache/xerces/tests/TargetNamespaceTests.java xerces/java/branches/xs-1.1-tests/src/org/apache/xerces/tests/TypeAlternativeTests.java xerces/java/branches/xs-1.1-tests/src/org/apache/xerces/tests/XercesAbstractTestCase.java Modified: xerces/java/branches/xs-1.1-tests/src/org/apache/xerces/tests/AllXercesXSD11Tests.java URL: http://svn.apache.org/viewvc/xerces/java/branches/xs-1.1-tests/src/org/apache/xerces/tests/AllXercesXSD11Tests.java?rev=1422528&r1=1422527&r2=1422528&view=diff == --- xerces/java/branches/xs-1.1-tests/src/org/apache/xerces/tests/AllXercesXSD11Tests.java (original) +++ xerces/java/branches/xs-1.1-tests/src/org/apache/xerces/tests/AllXercesXSD11Tests.java Sun Dec 16 11:24:54 2012 @@ -20,6 +20,12 @@ package org.apache.xerces.tests; import junit.framework.Test; import junit.framework.TestSuite; +/** + * @xerces.internal + * + * @author: Mukul Gandhi IBM + * @version $Id: + */ public class AllXercesXSD11Tests { public static Test suite() { Modified: xerces/java/branches/xs-1.1-tests/src/org/apache/xerces/tests/AssertionTests.java URL: http://svn.apache.org/viewvc/xerces/java/branches/xs-1.1-tests/src/org/apache/xerces/tests/AssertionTests.java?rev=1422528&r1=1422527&r2=1422528&view=diff == --- xerces/java/branches/xs-1.1-tests/src/org/apache/xerces/tests/AssertionTests.java (original) +++ xerces/java/branches/xs-1.1-tests/src/org/apache/xerces/tests/AssertionTests.java Sun Dec 16 11:24:54 2012 @@ -24,6 +24,12 @@ import javax.xml.transform.stream.Stream import javax.xml.validation.Schema; import javax.xml.validation.Validator; +/** + * @xerces.internal + * + * @author: Mukul Gandhi IBM + * @version $Id: + */ public class AssertionTests extends XercesAbstractTestCase { public AssertionTests(String name) { Modified: xerces/java/branches/xs-1.1-tests/src/org/apache/xerces/tests/AttributeTests.java URL: http://svn.apache.org/viewvc/xerces/java/branches/xs-1.1-tests/src/org/apache/xerces/tests/AttributeTests.java?rev=1422528&r1=1422527&r2=1422528&view=diff == --- xerces/java/branches/xs-1.1-tests/src/org/apache/xerces/tests/AttributeTests.java (original) +++ xerces/java/branches/xs-1.1-tests/src/org/apache/xerces/tests/AttributeTests.java Sun Dec 16 11:24:54 2012 @@ -24,6 +24,12 @@ import javax.xml.transform.stream.Stream import javax.xml.validation.Schema; import javax.xml.validation.Validator; +/** + * @xerces.internal + * + * @author: Mukul Gandhi IBM + * @version $Id: + */ public class AttributeTests extends XercesAbstractTestCase { public AttributeTests(String name) { Modified: xerces/java/branches/xs-1.1-tests/src/org/apache/xerces/tests/CompositorTests.java URL: http://svn.apache.org/viewvc/xerces/java/branches/xs-1.1-tests/src/org/apache/xerces/tests/CompositorTests.java?rev=1422528&r1=1422527&r2=1422528&view=diff == --- xerces/java/branches/xs-1.1-tests/src/org/apache/xerces/tests/CompositorTests.java (original) +
svn commit: r1422490 [10/13] - in /xerces/java/branches/xs-1.1-tests: ./ data/ data/assertions/ data/assertions/ST/ data/assertions/ST/list/ data/assertions/attributes/ data/assertions/defaultValues/
Added: xerces/java/branches/xs-1.1-tests/data/version-control/test49.xsd URL: http://svn.apache.org/viewvc/xerces/java/branches/xs-1.1-tests/data/version-control/test49.xsd?rev=1422490&view=auto == --- xerces/java/branches/xs-1.1-tests/data/version-control/test49.xsd (added) +++ xerces/java/branches/xs-1.1-tests/data/version-control/test49.xsd Sun Dec 16 09:12:49 2012 @@ -0,0 +1,46 @@ + +http://www.w3.org/2001/XMLSchema"; + xmlns:vc="http://www.w3.org/2007/XMLSchema-versioning";> + + + + + + + + + This element declaration is available to XML Schema engine only in XSD 1.0 mode. + + + + + + + This element declaration is available to XML Schema engine only in XSD 1.1 + (and future versions) mode. + + + + + + + + + + + + + + + + http://xerces.apache.org";> + + + + + + + + + + \ No newline at end of file Propchange: xerces/java/branches/xs-1.1-tests/data/version-control/test49.xsd -- svn:eol-style = native Propchange: xerces/java/branches/xs-1.1-tests/data/version-control/test49.xsd -- svn:keywords = Author Date Id Revision Added: xerces/java/branches/xs-1.1-tests/data/version-control/test5.xsd URL: http://svn.apache.org/viewvc/xerces/java/branches/xs-1.1-tests/data/version-control/test5.xsd?rev=1422490&view=auto == --- xerces/java/branches/xs-1.1-tests/data/version-control/test5.xsd (added) +++ xerces/java/branches/xs-1.1-tests/data/version-control/test5.xsd Sun Dec 16 09:12:49 2012 @@ -0,0 +1,13 @@ + +http://www.w3.org/2007/XMLSchema-versioning"; xmlns:xs="http://www.w3.org/2001/XMLSchema";> + + + + + + + + + + + Propchange: xerces/java/branches/xs-1.1-tests/data/version-control/test5.xsd -- svn:eol-style = native Propchange: xerces/java/branches/xs-1.1-tests/data/version-control/test5.xsd -- svn:keywords = Author Date Id Revision Added: xerces/java/branches/xs-1.1-tests/data/version-control/test6.xsd URL: http://svn.apache.org/viewvc/xerces/java/branches/xs-1.1-tests/data/version-control/test6.xsd?rev=1422490&view=auto == --- xerces/java/branches/xs-1.1-tests/data/version-control/test6.xsd (added) +++ xerces/java/branches/xs-1.1-tests/data/version-control/test6.xsd Sun Dec 16 09:12:49 2012 @@ -0,0 +1,20 @@ +http://www.w3.org/2001/XMLSchema"; + xmlns:vc="http://www.w3.org/2007/XMLSchema-versioning";> + + + + + + + + + + + + + + + + + + \ No newline at end of file Propchange: xerces/java/branches/xs-1.1-tests/data/version-control/test6.xsd -- svn:eol-style = native Propchange: xerces/java/branches/xs-1.1-tests/data/version-control/test6.xsd -- svn:keywords = Author Date Id Revision Added: xerces/java/branches/xs-1.1-tests/data/version-control/test7.xsd URL: http://svn.apache.org/viewvc/xerces/java/branches/xs-1.1-tests/data/version-control/test7.xsd?rev=1422490&view=auto == --- xerces/java/branches/xs-1.1-tests/data/version-control/test7.xsd (added) +++ xerces/java/branches/xs-1.1
svn commit: r1422485 - /xerces/java/branches/xs-1.1-tests/
Author: mukulg Date: Sun Dec 16 08:44:11 2012 New Revision: 1422485 URL: http://svn.apache.org/viewvc?rev=1422485&view=rev Log: adding a folder xs-1.1-tests for copying a unit test suite, related to XML Schema 1.1 functionality. Added: xerces/java/branches/xs-1.1-tests/ - To unsubscribe, e-mail: commits-unsubscr...@xerces.apache.org For additional commands, e-mail: commits-h...@xerces.apache.org
svn commit: r1420674 - /xerces/java/branches/xml-schema-1.1-dev/tools/org.eclipse.wst.xml.xpath2.processor_1.2.0.jar
Author: mukulg Date: Wed Dec 12 13:53:07 2012 New Revision: 1420674 URL: http://svn.apache.org/viewvc?rev=1420674&view=rev Log: schema 1.1 commit: committing minor improvements to xpath2 fn:max and fn:min function implementations. now they are able to accept element and attribute node sequences (i.e, now we allow atomization of the input to these functions, as per the rules specified in XPath 2.0 spec). This now allows an assertion like following to work fine, The corresponding changes were also committed to the Eclipse repository. Modified: xerces/java/branches/xml-schema-1.1-dev/tools/org.eclipse.wst.xml.xpath2.processor_1.2.0.jar Modified: xerces/java/branches/xml-schema-1.1-dev/tools/org.eclipse.wst.xml.xpath2.processor_1.2.0.jar URL: http://svn.apache.org/viewvc/xerces/java/branches/xml-schema-1.1-dev/tools/org.eclipse.wst.xml.xpath2.processor_1.2.0.jar?rev=1420674&r1=1420673&r2=1420674&view=diff == Binary files - no diff available. - To unsubscribe, e-mail: commits-unsubscr...@xerces.apache.org For additional commands, e-mail: commits-h...@xerces.apache.org
svn commit: r1414220 - /xerces/java/branches/xml-schema-1.1-dev/tools/org.eclipse.wst.xml.xpath2.processor_1.2.0.jar
Author: mukulg Date: Tue Nov 27 15:06:55 2012 New Revision: 1414220 URL: http://svn.apache.org/viewvc?rev=1414220&view=rev Log: committing an improved psychopath xpath2 jar. this has improvements to fn:max and fn:min function implementations. the corresponding improvements were also committed to the Eclipse repository. Modified: xerces/java/branches/xml-schema-1.1-dev/tools/org.eclipse.wst.xml.xpath2.processor_1.2.0.jar Modified: xerces/java/branches/xml-schema-1.1-dev/tools/org.eclipse.wst.xml.xpath2.processor_1.2.0.jar URL: http://svn.apache.org/viewvc/xerces/java/branches/xml-schema-1.1-dev/tools/org.eclipse.wst.xml.xpath2.processor_1.2.0.jar?rev=1414220&r1=1414219&r2=1414220&view=diff == Binary files - no diff available. - To unsubscribe, e-mail: commits-unsubscr...@xerces.apache.org For additional commands, e-mail: commits-h...@xerces.apache.org
svn commit: r1413712 - /xerces/java/branches/xml-schema-1.1-dev/tools/org.eclipse.wst.xml.xpath2.processor_1.2.0.jar
Author: mukulg Date: Mon Nov 26 16:47:10 2012 New Revision: 1413712 URL: http://svn.apache.org/viewvc?rev=1413712&view=rev Log: committing an improved psychopath xpath2 jar. this has following improvements, 1) minor improvements to fn:distinct-values and fn:deep-equal function implementations 2) improvements to comparison 0 = -0 for xs:float and xs:double the corresponding improvements were also committed to the Eclipse repository. Modified: xerces/java/branches/xml-schema-1.1-dev/tools/org.eclipse.wst.xml.xpath2.processor_1.2.0.jar Modified: xerces/java/branches/xml-schema-1.1-dev/tools/org.eclipse.wst.xml.xpath2.processor_1.2.0.jar URL: http://svn.apache.org/viewvc/xerces/java/branches/xml-schema-1.1-dev/tools/org.eclipse.wst.xml.xpath2.processor_1.2.0.jar?rev=1413712&r1=1413711&r2=1413712&view=diff == Binary files - no diff available. - To unsubscribe, e-mail: commits-unsubscr...@xerces.apache.org For additional commands, e-mail: commits-h...@xerces.apache.org
svn commit: r1413119 - /xerces/java/branches/xml-schema-1.1-dev/tools/org.eclipse.wst.xml.xpath2.processor_1.2.0.jar
Author: mukulg Date: Sat Nov 24 02:52:31 2012 New Revision: 1413119 URL: http://svn.apache.org/viewvc?rev=1413119&view=rev Log: committing an improved psychopath xpath2 jar. this has improvement to fn:index-of function implementation. psychopath codebase at Eclipse repository was also updated with these changes. Modified: xerces/java/branches/xml-schema-1.1-dev/tools/org.eclipse.wst.xml.xpath2.processor_1.2.0.jar Modified: xerces/java/branches/xml-schema-1.1-dev/tools/org.eclipse.wst.xml.xpath2.processor_1.2.0.jar URL: http://svn.apache.org/viewvc/xerces/java/branches/xml-schema-1.1-dev/tools/org.eclipse.wst.xml.xpath2.processor_1.2.0.jar?rev=1413119&r1=1413118&r2=1413119&view=diff == Binary files - no diff available. - To unsubscribe, e-mail: commits-unsubscr...@xerces.apache.org For additional commands, e-mail: commits-h...@xerces.apache.org
svn commit: r1411312 - /xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/XMLSchemaValidator.java
Author: mukulg Date: Mon Nov 19 17:07:17 2012 New Revision: 1411312 URL: http://svn.apache.org/viewvc?rev=1411312&view=rev Log: committing an improvement as suggested in latest comment on jira issue XERCESJ-1594. 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=1411312&r1=1411311&r2=1411312&view=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 Mon Nov 19 17:07:17 2012 @@ -2749,13 +2749,13 @@ public class XMLSchemaValidator && id.getCategory() == IdentityConstraint.IC_KEYREF) { ValueStoreBase values = fValueStoreCache.getValueStoreFor(id, selMatcher.getInitialDepth()); -// report error if not all fields are present -if (values.fValuesCount != values.fFieldCount) { -reportSchemaError("KeyRefNotEnoughValues", new Object[] { element.rawname, values.getIdentityConstraint().getName() }); -} -if (values != null) {// nothing to do if nothing matched -values.endDocumentFragment(); -} +if (values != null) { +values.endDocumentFragment(); // nothing to do if nothing matched +// report error if not all fields are present +if (values.fValuesCount != values.fFieldCount) { +reportSchemaError("KeyRefNotEnoughValues", new Object[] { element.rawname, values.getIdentityConstraint().getName() }); +} +} } } } - To unsubscribe, e-mail: commits-unsubscr...@xerces.apache.org For additional commands, e-mail: commits-h...@xerces.apache.org
svn commit: r1410698 - in /xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl: msg/XMLSchemaMessages.properties xs/XMLSchemaValidator.java
Author: mukulg Date: Sat Nov 17 05:27:30 2012 New Revision: 1410698 URL: http://svn.apache.org/viewvc?rev=1410698&view=rev Log: committing fix for jira issue XERCESJ-1594. 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/XMLSchemaValidator.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=1410698&r1=1410697&r2=1410698&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 Sat Nov 17 05:27:30 2012 @@ -44,6 +44,7 @@ KeyRefOutOfScope = Identity Constraint error: the keyref identity constraint \"{0}\" refers to a key or unique that is out of scope. KeyRefReferNotFound = Key reference declaration \"{0}\" refers to unknown key with name \"{1}\". UnknownField = Internal identity constraint error; unknown field \"{0}\" for identity constraint \"{2}\" specified for element \"{1}\". +KeyRefNotEnoughValues = cvc-identity-constraint.4.3.b: Not enough values specified for identity constraint specified for element \"{0}\". # Ideally, we should only use the following error keys, not the ones under # "Identity constraints". And we should cover all of the following errors. 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=1410698&r1=1410697&r2=1410698&view=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 Sat Nov 17 05:27:30 2012 @@ -2749,18 +2749,13 @@ public class XMLSchemaValidator && id.getCategory() == IdentityConstraint.IC_KEYREF) { ValueStoreBase values = fValueStoreCache.getValueStoreFor(id, selMatcher.getInitialDepth()); -// nothing to do if nothing matched, or if not all -// fields are present. -if (values != null && values.fValuesCount == values.fFieldCount) { -values.endDocumentFragment(); +// report error if not all fields are present +if (values.fValuesCount != values.fFieldCount) { +reportSchemaError("KeyRefNotEnoughValues", new Object[] { element.rawname, values.getIdentityConstraint().getName() }); } -else if (values != null) { -IdentityConstraint idcConstraint = values.getIdentityConstraint(); -if (fValueStoreCache.fGlobalIDConstraintMap.get(((KeyRef)idcConstraint).getKey()) == null) { -reportSchemaError("KeyRefOutOfScope", new Object[] { idcConstraint.getName() }); -} +if (values != null) {// nothing to do if nothing matched +values.endDocumentFragment(); } - } } } - To unsubscribe, e-mail: commits-unsubscr...@xerces.apache.org For additional commands, e-mail: commits-h...@xerces.apache.org
svn commit: r1409237 - /xerces/java/branches/xml-schema-1.1-dev/tools/org.eclipse.wst.xml.xpath2.processor_1.2.0.jar
Author: mukulg Date: Wed Nov 14 15:51:57 2012 New Revision: 1409237 URL: http://svn.apache.org/viewvc?rev=1409237&view=rev Log: schema 1.1 commit: committing a new psychopath xpath2 engine jar file. this has few enhancements for XPath 2.0 value comparison operators. previously an expression like 1 eq '1' produced a true result. this now produces a dynamic error XPTY0004 as per the XPath 2.0 spec. the implementation of operators lt and gt were also enhanced similarly. I observed that operators le, ge and ne worked fine previously. I discovered this error, when I was trying to do xpath2 deep-equal(..) on xs:string and xs:integer sequences (a related bug in deep-equal is also now solved, due to these enhancements). PS: the psychopath engine changes were also committed on the Eclipse repository. Modified: xerces/java/branches/xml-schema-1.1-dev/tools/org.eclipse.wst.xml.xpath2.processor_1.2.0.jar Modified: xerces/java/branches/xml-schema-1.1-dev/tools/org.eclipse.wst.xml.xpath2.processor_1.2.0.jar URL: http://svn.apache.org/viewvc/xerces/java/branches/xml-schema-1.1-dev/tools/org.eclipse.wst.xml.xpath2.processor_1.2.0.jar?rev=1409237&r1=1409236&r2=1409237&view=diff == Binary files - no diff available. - To unsubscribe, e-mail: commits-unsubscr...@xerces.apache.org For additional commands, e-mail: commits-h...@xerces.apache.org
svn commit: r1407196 - /xerces/java/branches/xml-schema-1.1-dev/tools/org.eclipse.wst.xml.xpath2.processor_1.2.0.jar
Author: mukulg Date: Thu Nov 8 18:08:10 2012 New Revision: 1407196 URL: http://svn.apache.org/viewvc?rev=1407196&view=rev Log: schema 1.1 commit: committing a new PsychoPath XPath 2.0 JAR. this has improved implementation of computing typed value of element nodes with element-only content model (please refer to following eclipse bug, https://bugs.eclipse.org/bugs/show_bug.cgi?id=393904). Modified: xerces/java/branches/xml-schema-1.1-dev/tools/org.eclipse.wst.xml.xpath2.processor_1.2.0.jar Modified: xerces/java/branches/xml-schema-1.1-dev/tools/org.eclipse.wst.xml.xpath2.processor_1.2.0.jar URL: http://svn.apache.org/viewvc/xerces/java/branches/xml-schema-1.1-dev/tools/org.eclipse.wst.xml.xpath2.processor_1.2.0.jar?rev=1407196&r1=1407195&r2=1407196&view=diff == Binary files - no diff available. - To unsubscribe, e-mail: commits-unsubscr...@xerces.apache.org For additional commands, e-mail: commits-h...@xerces.apache.org
svn commit: r1396551 - in /xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers: XSDAttributeGroupTraverser.java XSDGroupTraverser.java
Author: mukulg Date: Wed Oct 10 11:42:43 2012 New Revision: 1396551 URL: http://svn.apache.org/viewvc?rev=1396551&view=rev Log: committing fix for jira issue, XERCESJ-1591 Modified: xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/XSDAttributeGroupTraverser.java xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/XSDGroupTraverser.java Modified: xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/XSDAttributeGroupTraverser.java URL: http://svn.apache.org/viewvc/xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/XSDAttributeGroupTraverser.java?rev=1396551&r1=1396550&r2=1396551&view=diff == --- xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/XSDAttributeGroupTraverser.java (original) +++ xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/XSDAttributeGroupTraverser.java Wed Oct 10 11:42:43 2012 @@ -179,7 +179,8 @@ class XSDAttributeGroupTraverser extends attrGrp.fAnnotations = annotations; // make an entry in global declarations. -if (grammar.getGlobalAttributeGroupDecl(attrGrp.fName) == null) { +if (grammar.getGlobalAttributeGroupDecl(attrGrp.fName) == null || + DOMUtil.getLocalName(DOMUtil.getParent(elmNode)).equals(SchemaSymbols.ELT_REDEFINE)) { grammar.addGlobalAttributeGroupDecl(attrGrp); } Modified: xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/XSDGroupTraverser.java URL: http://svn.apache.org/viewvc/xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/XSDGroupTraverser.java?rev=1396551&r1=1396550&r2=1396551&view=diff == --- xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/XSDGroupTraverser.java (original) +++ xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/XSDGroupTraverser.java Wed Oct 10 11:42:43 2012 @@ -221,8 +221,10 @@ class XSDGroupTraverser extends XSDAbst annotations = XSObjectListImpl.EMPTY_LIST; } group.fAnnotations = annotations; + // Add group declaration to grammar -if (grammar.getGlobalGroupDecl(group.fName) == null) { +if (grammar.getGlobalGroupDecl(group.fName) == null || + DOMUtil.getLocalName(DOMUtil.getParent(elmNode)).equals(SchemaSymbols.ELT_REDEFINE)) { grammar.addGlobalGroupDecl(group); } - To unsubscribe, e-mail: commits-unsubscr...@xerces.apache.org For additional commands, e-mail: commits-h...@xerces.apache.org
svn commit: r1396487 - in /xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers: XSDComplexTypeTraverser.java XSDSimpleTypeTraverser.java
Author: mukulg Date: Wed Oct 10 07:00:56 2012 New Revision: 1396487 URL: http://svn.apache.org/viewvc?rev=1396487&view=rev Log: committing additional fix for jira issue, XERCESJ-1584 (as reported in the latest comment) Modified: 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/XSDSimpleTypeTraverser.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=1396487&r1=1396486&r2=1396487&view=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 Wed Oct 10 07:00:56 2012 @@ -214,17 +214,15 @@ class XSDComplexTypeTraverser extends X if (complexTypeName == null) { reportSchemaError("s4s-att-must-appear", new Object[]{SchemaSymbols.ELT_COMPLEXTYPE, SchemaSymbols.ATT_NAME}, complexTypeNode); type = null; -} else { - -// XML Schema 1.1 -// If parent of complex type is redefine, then we need to set the -// context of the redefined complex type -if (fSchemaHandler.fSchemaVersion == Constants.SCHEMA_VERSION_1_1) { -Element parent = DOMUtil.getParent(complexTypeNode); -if (DOMUtil.getLocalName(parent).equals(SchemaSymbols.ELT_REDEFINE)) { -((XSComplexTypeDecl)type.getBaseType()).setContext(type); -grammar.addGlobalComplexTypeDecl(type); +} else { +if (DOMUtil.getLocalName(DOMUtil.getParent(complexTypeNode)).equals(SchemaSymbols.ELT_REDEFINE)) { +if (fSchemaHandler.fSchemaVersion == Constants.SCHEMA_VERSION_1_1) { + // XML Schema 1.1 + // If parent of complex type is redefine, then we need to set the + // context of the redefined complex type + ((XSComplexTypeDecl)type.getBaseType()).setContext(type); } +grammar.addGlobalComplexTypeDecl(type); } if (grammar.getGlobalTypeDecl(type.getName()) == null) { 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=1396487&r1=1396486&r2=1396487&view=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 Wed Oct 10 07:00:56 2012 @@ -108,22 +108,20 @@ class XSDSimpleTypeTraverser extends XSD } // don't add global components without name to the grammar -if (type != null) { - -// XML Schema 1.1 -// If parent is redefine, then we need to set the -// context of the redefined simple type -if (fSchemaHandler.fSchemaVersion == Constants.SCHEMA_VERSION_1_1) { -Element parent = DOMUtil.getParent(elmNode); -if (DOMUtil.getLocalName(parent).equals(SchemaSymbols.ELT_REDEFINE)) { +if (type != null) { +if (DOMUtil.getLocalName(DOMUtil.getParent(elmNode)).equals(SchemaSymbols.ELT_REDEFINE)) { +if (fSchemaHandler.fSchemaVersion == Constants.SCHEMA_VERSION_1_1) { +// XML Schema 1.1 +// If parent is redefine, then we need to set the +// context of the redefined simple type final XSTypeDefinition baseType = type.getBaseType(); if (baseType instanceof XSSimpleTypeDecl) { -((XSSimpleTypeDecl)baseType).setContext(type); -grammar.addGlobalSimpleTypeDecl(type); +((XSSimpleTypeDecl)baseType).setContext(type); } } +grammar.addGlobalSimpleTypeDecl(type); } - + if (grammar.getGlobalTypeDecl(type.getName()) == null) {
svn commit: r1396474 - in /xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers: XSDComplexTypeTraverser.java XSDSimpleTypeTraverser.java
Author: mukulg Date: Wed Oct 10 05:26:37 2012 New Revision: 1396474 URL: http://svn.apache.org/viewvc?rev=1396474&view=rev Log: committing fix for jira issue, XERCESJ-1584 Modified: 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/XSDSimpleTypeTraverser.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=1396474&r1=1396473&r2=1396474&view=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 Wed Oct 10 05:26:37 2012 @@ -223,6 +223,7 @@ class XSDComplexTypeTraverser extends X Element parent = DOMUtil.getParent(complexTypeNode); if (DOMUtil.getLocalName(parent).equals(SchemaSymbols.ELT_REDEFINE)) { ((XSComplexTypeDecl)type.getBaseType()).setContext(type); +grammar.addGlobalComplexTypeDecl(type); } } 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=1396474&r1=1396473&r2=1396474&view=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 Wed Oct 10 05:26:37 2012 @@ -119,6 +119,7 @@ class XSDSimpleTypeTraverser extends XSD final XSTypeDefinition baseType = type.getBaseType(); if (baseType instanceof XSSimpleTypeDecl) { ((XSSimpleTypeDecl)baseType).setContext(type); +grammar.addGlobalSimpleTypeDecl(type); } } } - To unsubscribe, e-mail: commits-unsubscr...@xerces.apache.org For additional commands, e-mail: commits-h...@xerces.apache.org
svn commit: r1392722 - in /xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl: msg/XMLSchemaMessages.properties xs/XMLSchemaValidator.java
Author: mukulg Date: Tue Oct 2 03:34:31 2012 New Revision: 1392722 URL: http://svn.apache.org/viewvc?rev=1392722&view=rev Log: committing an improvement, as per latest suggestion in bug report XERCESJ-1585 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/XMLSchemaValidator.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=1392722&r1=1392721&r2=1392722&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 Tue Oct 2 03:34:31 2012 @@ -40,7 +40,8 @@ KeyMatchesNillable = cvc-identity-constraint.4.2.3: Element \"{0}\" has the key \"{1}\" which matches an element which has nillable set to true. KeyNotEnoughValues = cvc-identity-constraint.4.2.1.b: Not enough values specified for identity constraint specified for element \"{0}\". KeyNotFound = cvc-identity-constraint.4.3: Key ''{0}'' with value ''{1}'' not found for identity constraint of element ''{2}''. -KeyRefOutOfScope = Identity Constraint error: identity constraint \"{0}\" has a keyref which refers to a key or unique that is out of scope. +## KeyRefOutOfScope = Identity Constraint error: identity constraint \"{0}\" has a keyref which refers to a key or unique that is out of scope. +KeyRefOutOfScope = Identity Constraint error: the keyref identity constraint \"{0}\" refers to a key or unique that is out of scope. KeyRefReferNotFound = Key reference declaration \"{0}\" refers to unknown key with name \"{1}\". UnknownField = Internal identity constraint error; unknown field \"{0}\" for identity constraint \"{2}\" specified for element \"{1}\". 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=1392722&r1=1392721&r2=1392722&view=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 Tue Oct 2 03:34:31 2012 @@ -2757,7 +2757,7 @@ public class XMLSchemaValidator else if (values != null) { IdentityConstraint idcConstraint = values.getIdentityConstraint(); if (fValueStoreCache.fGlobalIDConstraintMap.get(((KeyRef)idcConstraint).getKey()) == null) { -reportSchemaError("KeyRefOutOfScope", new Object[] { idcConstraint.toString() }); +reportSchemaError("KeyRefOutOfScope", new Object[] { idcConstraint.getName() }); } } @@ -4767,7 +4767,7 @@ public class XMLSchemaValidator if (fKeyValueStore == null) { // report error String code = "KeyRefOutOfScope"; -String value = fIdentityConstraint.toString(); +String value = fIdentityConstraint.getName(); reportSchemaError(code, new Object[] { value }); return; } - To unsubscribe, e-mail: commits-unsubscr...@xerces.apache.org For additional commands, e-mail: commits-h...@xerces.apache.org
svn commit: r1388740 - /xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/XMLSchemaValidator.java
Author: mukulg Date: Sat Sep 22 06:31:17 2012 New Revision: 1388740 URL: http://svn.apache.org/viewvc?rev=1388740&view=rev Log: committing a fix for jira issue, XERCESJ-1585 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=1388740&r1=1388739&r2=1388740&view=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 Sat Sep 22 06:31:17 2012 @@ -2751,8 +2751,16 @@ public class XMLSchemaValidator fValueStoreCache.getValueStoreFor(id, selMatcher.getInitialDepth()); // nothing to do if nothing matched, or if not all // fields are present. -if (values != null && values.fValuesCount == values.fFieldCount) +if (values != null && values.fValuesCount == values.fFieldCount) { values.endDocumentFragment(); +} +else if (values != null) { +IdentityConstraint idcConstraint = values.getIdentityConstraint(); +if (fValueStoreCache.fGlobalIDConstraintMap.get(((KeyRef)idcConstraint).getKey()) == null) { +reportSchemaError("KeyRefOutOfScope", new Object[] { idcConstraint.toString() }); +} +} + } } } @@ -4638,6 +4646,10 @@ public class XMLSchemaValidator return fItemValueType; } +private IdentityConstraint getIdentityConstraint() { +return fIdentityConstraint; +} + } // class ValueStoreBase /** - To unsubscribe, e-mail: commits-unsubscr...@xerces.apache.org For additional commands, e-mail: commits-h...@xerces.apache.org
svn commit: r1381986 - /xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/XSAttributeChecker.java
Author: mukulg Date: Fri Sep 7 12:03:52 2012 New Revision: 1381986 URL: http://svn.apache.org/viewvc?rev=1381986&view=rev Log: committing fix for jira issue, XERCESJ-1577 Modified: xerces/java/branches/xml-schema-1.1-dev/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=1381986&r1=1381985&r2=1381986&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 Fri Sep 7 12:03:52 2012 @@ -1611,21 +1611,20 @@ public class XSAttributeChecker { StringTokenizer st = new StringTokenizer(attrVal, " \n\t\r"); while (st.hasMoreTokens()) { Object avalue = dv.validate(st.nextToken(), schemaDoc.fValidationContext, null); + modifyQNameForChameleonProcessing(schemaDoc, avalue); ((Vector)attrValues[ATTIDX_SUBSGROUP]).addElement(avalue); } } else { Object avalue = dv.validate(attrVal, schemaDoc.fValidationContext, null); +modifyQNameForChameleonProcessing(schemaDoc, avalue); ((Vector)attrValues[ATTIDX_SUBSGROUP]).addElement(avalue); } } else { -Object avalue = dv.validate(attrVal, schemaDoc.fValidationContext, null); -// kludge to handle chameleon includes/redefines... +Object avalue = dv.validate(attrVal, schemaDoc.fValidationContext, null); if (oneAttr.dvIndex == DT_QNAME) { -QName qname = (QName)avalue; -if(qname.prefix == XMLSymbols.EMPTY_STRING && qname.uri == null && schemaDoc.fIsChameleonSchema) -qname.uri = schemaDoc.fTargetNamespace; + modifyQNameForChameleonProcessing(schemaDoc, avalue); } attrValues[oneAttr.valueIndex] = avalue; } @@ -1687,6 +1686,21 @@ public class XSAttributeChecker { return attrValues; } +/* + * If chameleon pre-processing is required, then this method would modify the QName value appropriately. + * + * @param schemaDoc metadata about the schema document + * @param qnameVal validated QName value + * + */ +private void modifyQNameForChameleonProcessing(XSDocumentInfo schemaDoc, Object qnameVal) { +// kludge to handle chameleon includes/redefines... +QName qname = (QName)qnameVal; +if(qname.prefix == XMLSymbols.EMPTY_STRING && qname.uri == null && schemaDoc.fIsChameleonSchema) { + qname.uri = schemaDoc.fTargetNamespace; +} +} + private Object validate(Object[] attrValues, String attr, String ivalue, int dvIndex, XSDocumentInfo schemaDoc) throws InvalidDatatypeValueException { if (ivalue == null) - To unsubscribe, e-mail: commits-unsubscr...@xerces.apache.org For additional commands, e-mail: commits-h...@xerces.apache.org
svn commit: r1381242 - /xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/XSDHandler.java
Author: mukulg Date: Wed Sep 5 16:49:46 2012 New Revision: 1381242 URL: http://svn.apache.org/viewvc?rev=1381242&view=rev Log: committing a new fix for jira issue, XERCESJ-1578 Modified: xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/XSDHandler.java Modified: xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/XSDHandler.java URL: http://svn.apache.org/viewvc/xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/XSDHandler.java?rev=1381242&r1=1381241&r2=1381242&view=diff == --- xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/XSDHandler.java (original) +++ xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/XSDHandler.java Wed Sep 5 16:49:46 2012 @@ -1214,7 +1214,7 @@ public class XSDHandler { schemaNamespace = currSchemaInfo.fTargetNamespace; if (fSchemaVersion == Constants.SCHEMA_VERSION_1_1) { if (refType == XSDDescription.CONTEXT_OVERRIDE) { -if (newSchemaRoot != null && isValidTargetUriForIncludeOrOverride(schemaSource, locationHint)) { +if (newSchemaRoot != null && isValidTargetUriForIncludeOrOverride(schemaId, locationHint)) { final Element transformedSchemaRoot = (Element) fOverrideHandler.transform(schemaId, child, newSchemaRoot); // Either we had a collision where the transformed @@ -1240,7 +1240,7 @@ public class XSDHandler { fOverrideHandler.checkSchemaRoot(schemaId, child, newSchemaRoot); } } -else if (refType == XSDDescription.CONTEXT_INCLUDE && !isValidTargetUriForIncludeOrOverride(schemaSource, locationHint)) { +else if (refType == XSDDescription.CONTEXT_INCLUDE && !isValidTargetUriForIncludeOrOverride(schemaId, locationHint)) { fLastSchemaWasDuplicate = true; } } @@ -1286,18 +1286,15 @@ public class XSDHandler { * Check if the target URI for or is correct. It must not be absent, and it should not point * to the parent schema document. */ -private boolean isValidTargetUriForIncludeOrOverride(XMLInputSource schemaSource, String locationHint) { +private boolean isValidTargetUriForIncludeOrOverride(String schemaId, String locationHint) { boolean isUriValid = true; - try { - String expandedSystemId = XMLEntityManager.expandSystemId(schemaSource.getSystemId(), schemaSource.getBaseSystemId(), false); - String expandedLoctionHint = XMLEntityManager.expandSystemId(locationHint, locationHint, false); - isUriValid = !("".equals(expandedSystemId) || ((expandedLoctionHint != null) ? expandedLoctionHint.equals(expandedSystemId) : true)); + String expandedLoctionHint = XMLEntityManager.expandSystemId(locationHint, fSchemaGrammarDescription.getBaseSystemId(), false); + isUriValid = !("".equals(schemaId) || ((expandedLoctionHint != null) ? expandedLoctionHint.equals(schemaId) : true)); } catch (MalformedURIException ex) { isUriValid = false; } - return isUriValid; } // isValidTargetUriForIncludeOrOverride - To unsubscribe, e-mail: commits-unsubscr...@xerces.apache.org For additional commands, e-mail: commits-h...@xerces.apache.org
svn commit: r1380272 - /xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/XSDHandler.java
Author: mukulg Date: Mon Sep 3 15:23:58 2012 New Revision: 1380272 URL: http://svn.apache.org/viewvc?rev=1380272&view=rev Log: committing a fix for latest issue reported for Jira issue, XERCESJ-1578. Modified: xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/XSDHandler.java Modified: xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/XSDHandler.java URL: http://svn.apache.org/viewvc/xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/XSDHandler.java?rev=1380272&r1=1380271&r2=1380272&view=diff == --- xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/XSDHandler.java (original) +++ xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/XSDHandler.java Mon Sep 3 15:23:58 2012 @@ -861,7 +861,7 @@ public class XSDHandler { // This method does several things: // It constructs an instance of an XSDocumentInfo object using the -// schemaRoot node. Then, for each , +// schemaRoot node. Then, for each , , // , and children, it attempts to resolve the // requested schema document, initiates a DOM parse, and calls // itself recursively on that document's root. It also records in @@ -1181,7 +1181,6 @@ public class XSDHandler { } // pass the systemId of the current document as the base systemId boolean mustResolve = false; -boolean isOverride = false; refType = XSDDescription.CONTEXT_INCLUDE; if (localName.equals(SchemaSymbols.ELT_REDEFINE)) { mustResolve = nonAnnotationContent(child); @@ -1190,7 +1189,6 @@ public class XSDHandler { else if (localName.equals(SchemaSymbols.ELT_OVERRIDE)){ mustResolve = nonAnnotationContent(child); refType = XSDDescription.CONTEXT_OVERRIDE; -isOverride = true; } fSchemaGrammarDescription.reset(); fSchemaGrammarDescription.setContextType(refType); @@ -1215,30 +1213,35 @@ public class XSDHandler { newSchemaRoot = resolveSchema(schemaSource, fSchemaGrammarDescription, mustResolve, child); schemaNamespace = currSchemaInfo.fTargetNamespace; if (fSchemaVersion == Constants.SCHEMA_VERSION_1_1) { -if (isOverride && newSchemaRoot != null && isValidTargetUriForOverride(schemaSource, locationHint)) { -final Element transformedSchemaRoot = (Element) fOverrideHandler.transform(schemaId, child, newSchemaRoot); +if (refType == XSDDescription.CONTEXT_OVERRIDE) { +if (newSchemaRoot != null && isValidTargetUriForIncludeOrOverride(schemaSource, locationHint)) { +final Element transformedSchemaRoot = (Element) fOverrideHandler.transform(schemaId, child, newSchemaRoot); + +// Either we had a collision where the transformed +// schema has global components or we hit a +// transformation cycle +if (transformedSchemaRoot == null) { +fLastSchemaWasDuplicate = true; +} +// In case of a collision where the transformed +// schema has no global components, the override +// transformer will return the new transformed +// schema. We need to process that new schema, +// so we set the duplicate schema flag to false -// Either we had a collision where the transformed -// schema has global components or we hit a -// transformation cycle -if (transformedSchemaRoot == null) { -fLastSchemaWasDuplicate = true; -} -// In case of a collision where the transformed -// schema has no global components, the override -// transformer will return the new transformed -// schema. We need to process that new schema, -// so we set the duplicate schema flag to false +else if (fLastSchemaWasDuplicate && transformedSchemaRoot != newSchemaRoot) { +fLastSchemaWasDuplicate = false; +
svn commit: r1378976 - /xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/XSDHandler.java
Author: mukulg Date: Thu Aug 30 15:04:33 2012 New Revision: 1378976 URL: http://svn.apache.org/viewvc?rev=1378976&view=rev Log: committing the fix for recent issue reported for jira issue, XERCESJ-1578. Modified: xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/XSDHandler.java Modified: xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/XSDHandler.java URL: http://svn.apache.org/viewvc/xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/XSDHandler.java?rev=1378976&r1=1378975&r2=1378976&view=diff == --- xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/XSDHandler.java (original) +++ xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/XSDHandler.java Thu Aug 30 15:04:33 2012 @@ -1215,7 +1215,7 @@ public class XSDHandler { newSchemaRoot = resolveSchema(schemaSource, fSchemaGrammarDescription, mustResolve, child); schemaNamespace = currSchemaInfo.fTargetNamespace; if (fSchemaVersion == Constants.SCHEMA_VERSION_1_1) { -if (isOverride && newSchemaRoot != null && schemaSource.getSystemId() != "") { +if (isOverride && newSchemaRoot != null && isValidTargetUriForOverride(schemaSource, locationHint)) { final Element transformedSchemaRoot = (Element) fOverrideHandler.transform(schemaId, child, newSchemaRoot); // Either we had a collision where the transformed @@ -1278,6 +1278,14 @@ public class XSDHandler { fDependencyMap.put(currSchemaInfo, dependencies); return currSchemaInfo; } // end constructTrees + +/* + * Check if the target URI for is correct. It must not be absent, and it should not point to the parent + * schema document (otherwise, this would result in an un-terminating recursion). + */ +private boolean isValidTargetUriForOverride(XMLInputSource schemaSource, String locationHint) { +return schemaSource.getSystemId() != "" && ((locationHint != null) ? (schemaSource.getSystemId() != locationHint) : true); +} private boolean isExistingGrammar(XSDDescription desc, boolean ignoreConflict) { SchemaGrammar sg = fGrammarBucket.getGrammar(desc.getTargetNamespace()); - To unsubscribe, e-mail: commits-unsubscr...@xerces.apache.org For additional commands, e-mail: commits-h...@xerces.apache.org
svn commit: r1377318 - /xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/XSDHandler.java
Author: mukulg Date: Sat Aug 25 16:27:22 2012 New Revision: 1377318 URL: http://svn.apache.org/viewvc?rev=1377318&view=rev Log: committing fix for jira issue, XERCESJ-1578 Modified: xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/XSDHandler.java Modified: xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/XSDHandler.java URL: http://svn.apache.org/viewvc/xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/XSDHandler.java?rev=1377318&r1=1377317&r2=1377318&view=diff == --- xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/XSDHandler.java (original) +++ xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/XSDHandler.java Sat Aug 25 16:27:22 2012 @@ -1212,10 +1212,10 @@ public class XSDHandler { // the existing global components boolean alreadyTraversed = (fNamespaceGrowth) ? sg.getDocumentLocations().contains(schemaId) : false; if (!alreadyTraversed) { -newSchemaRoot = resolveSchema(schemaSource, fSchemaGrammarDescription, mustResolve, child); +newSchemaRoot = resolveSchema(schemaSource, fSchemaGrammarDescription, mustResolve, child); schemaNamespace = currSchemaInfo.fTargetNamespace; if (fSchemaVersion == Constants.SCHEMA_VERSION_1_1) { -if (isOverride && newSchemaRoot != null) { +if (isOverride && newSchemaRoot != null && schemaSource.getSystemId() != "") { final Element transformedSchemaRoot = (Element) fOverrideHandler.transform(schemaId, child, newSchemaRoot); // Either we had a collision where the transformed - To unsubscribe, e-mail: commits-unsubscr...@xerces.apache.org For additional commands, e-mail: commits-h...@xerces.apache.org
svn commit: r1369297 - /xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/util/XS11TypeHelper.java
Author: mukulg Date: Sat Aug 4 11:17:51 2012 New Revision: 1369297 URL: http://svn.apache.org/viewvc?rev=1369297&view=rev Log: doing an improvement to one of the schema 1.1 implementation classes. Modified: xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/util/XS11TypeHelper.java Modified: xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/util/XS11TypeHelper.java URL: http://svn.apache.org/viewvc/xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/util/XS11TypeHelper.java?rev=1369297&r1=1369296&r2=1369297&view=diff == --- xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/util/XS11TypeHelper.java (original) +++ xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/util/XS11TypeHelper.java Sat Aug 4 11:17:51 2012 @@ -44,14 +44,23 @@ import org.eclipse.wst.xml.xpath2.proces import org.eclipse.wst.xml.xpath2.processor.internal.types.AnyType; /** - * Class defining utility/helper methods related to XML schema types. + * Class defining utility/helper methods to support XML Schema 1.1 implementation. * * @xerces.internal * * @author Mukul Gandhi, IBM * @version $Id$ */ -public class XS11TypeHelper { +public class XS11TypeHelper { + + +/* + * Class constructor. + */ +private XS11TypeHelper() { + // a private constructor, to prohibit instantiating this class from an outside class/application. + // this is a good practice, since all methods of this class are "static". +} /* * Checks if the two schema type components are identical. - To unsubscribe, e-mail: commits-unsubscr...@xerces.apache.org For additional commands, e-mail: commits-h...@xerces.apache.org
svn commit: r1367485 - /xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/models/XSDFACM.java
Author: mukulg Date: Tue Jul 31 10:55:40 2012 New Revision: 1367485 URL: http://svn.apache.org/viewvc?rev=1367485&view=rev Log: committing fix for jira issue, XERCESJ-1575 Modified: xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/models/XSDFACM.java Modified: xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/models/XSDFACM.java URL: http://svn.apache.org/viewvc/xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/models/XSDFACM.java?rev=1367485&r1=1367484&r2=1367485&view=diff == --- xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/models/XSDFACM.java (original) +++ xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/models/XSDFACM.java Tue Jul 31 10:55:40 2012 @@ -1475,26 +1475,28 @@ public class XSDFACM return; } // If base has max=unbounded, then there's enough space for "need" -if (base.fCountingStates[d[0]].maxOccurs == SchemaSymbols.OCCURRENCE_UNBOUNDED) { -d[2] += need; -if (b[2] + need > base.fCountingStates[d[0]].minOccurs) { -// Avoid setting count bigger than min if max is unbounded. -// It makes no difference. Not exceeding min means fewer -// distinct states, so shorter state-pairs in the list. -b[2] = base.fCountingStates[d[0]].minOccurs; +if (base.fCountingStates[d[0]] != null) { +if (base.fCountingStates[d[0]].maxOccurs == SchemaSymbols.OCCURRENCE_UNBOUNDED) { +d[2] += need; +if (b[2] + need > base.fCountingStates[d[0]].minOccurs) { +// Avoid setting count bigger than min if max is unbounded. +// It makes no difference. Not exceeding min means fewer +// distinct states, so shorter state-pairs in the list. +b[2] = base.fCountingStates[d[0]].minOccurs; +} +else { +b[2] += need; +} } else { +// If base doesn't have sufficient space, lower "need" +if (need > base.fCountingStates[d[0]].maxOccurs - b[2]) { +need = base.fCountingStates[d[0]].maxOccurs - b[2]; +} b[2] += need; +d[2] += need; } } -else { -// If base doesn't have sufficient space, lower "need" -if (need > base.fCountingStates[d[0]].maxOccurs - b[2]) { -need = base.fCountingStates[d[0]].maxOccurs - b[2]; -} -b[2] += need; -d[2] += need; -} } private void optimizeForAllBase(XS11AllCM base, int[] b, int[] d, int need, int indexb) { // Need to have seen an element, to be safe. - To unsubscribe, e-mail: commits-unsubscr...@xerces.apache.org For additional commands, e-mail: commits-h...@xerces.apache.org
svn commit: r1364043 - /xerces/java/branches/xml-schema-1.1-dev/docs/faq-xs.xml
Author: mukulg Date: Sat Jul 21 08:22:53 2012 New Revision: 1364043 URL: http://svn.apache.org/viewvc?rev=1364043&view=rev Log: writing few details to the Xerces faq documentation section Modified: xerces/java/branches/xml-schema-1.1-dev/docs/faq-xs.xml Modified: xerces/java/branches/xml-schema-1.1-dev/docs/faq-xs.xml URL: http://svn.apache.org/viewvc/xerces/java/branches/xml-schema-1.1-dev/docs/faq-xs.xml?rev=1364043&r1=1364042&r2=1364043&view=diff == --- xerces/java/branches/xml-schema-1.1-dev/docs/faq-xs.xml (original) +++ xerces/java/branches/xml-schema-1.1-dev/docs/faq-xs.xml Sat Jul 21 08:22:53 2012 @@ -71,6 +71,23 @@ v.validate(instanceDocument); Schema grammar. + + +How does the XML Schema processor treat entities and CDATA sections? + + According to the XML Infoset the infoset items contributing to the + [character + information item] are: characters in the document, whether literally, as + a character reference, or within a CDATA section, or within Entity + Reference. The XML Schema specification + "requires as a precondition for assessment + an information set as defined in [XML-Infoset]" + (Appendix D) and thus Xerces might attempt to normalize data in an entity + reference or CDATA section. To preserve character data within entity references and + CDATA sections, + turn off http://apache.org/xml/features/validation/schema/normalized-value feature. + + How Xerces-J uses an XPath 2.0 engine for XML Schema 1.1 assertions and CTAs? @@ -94,24 +111,31 @@ v.validate(instanceDocument); - -How does the XML Schema processor treat entities and CDATA sections? - - According to the XML Infoset the infoset items contributing to the - [character - information item] are: characters in the document, whether literally, as - a character reference, or within a CDATA section, or within Entity - Reference. The XML Schema specification - "requires as a precondition for assessment - an information set as defined in [XML-Infoset]" - (Appendix D) and thus Xerces might attempt to normalize data in an entity - reference or CDATA section. To preserve character data within entity references and - CDATA sections, - turn off http://apache.org/xml/features/validation/schema/normalized-value feature. - - + + How to specify a user defined error message, when an XML Schema 1.1 assertion returns a 'false' result? + +By default when an XSD 1.1 assertion fails, the Xerces XML Schema validator would produce a default error message, +which would say that which element or attribute was not validated successfully by an assertion and the schema type involved +during validation. It is however possible to, specify an user-defined error message for assertion failures. This is done by +specifying an attribute "message" in the XML namespace 'http://xerces.apache.org' on an xs:assert or xs:assertion +element in the schema. The value of attribute "message" is the text of user-defined assertion error message, which is produced by +the Xerces XML Schema validator when an assertion fails. + + +In case of use of the XML Schema xs:assertion facet within simple types, if a user defined error message is used, if a user wants +it is further possible to dynamically construct the assertion error message by fetching the value of XPath 2.0 context variable +$value into the assertion error message. Following is an example of such an assertion error message: +xerces:message="The number {$value} is not divisible by 2". With such a specification of assertion error message, +a value from XML instance document is assigned to a variable placeholder {$value} (which is a key word). Therefore at +runtime, an assertion message for this example would be produced as follows, "The number 3 is not divisible by 2" +(the value 3 was assigned to the variable reference {$value}). + + + User-defined error messages for assertion failures are not a standard feature of the XML Schema 1.1 specification, and + are a Xerces extension to help XML Schema document authors to specify a problem domain specific error messages. + + - Does Xerces provide access to the post schema validation infoset (PSVI)? - To unsubscribe, e-mail: commits-unsubscr...@xerces.apache.org For additional commands, e-mail: commits-h...@xerces.apache.org
svn commit: r1363914 - /xerces/java/branches/xml-schema-1.1-dev/docs/features.xml
Author: mukulg Date: Fri Jul 20 19:45:19 2012 New Revision: 1363914 URL: http://svn.apache.org/viewvc?rev=1363914&view=rev Log: committing minor improvements to documentation Modified: xerces/java/branches/xml-schema-1.1-dev/docs/features.xml Modified: xerces/java/branches/xml-schema-1.1-dev/docs/features.xml URL: http://svn.apache.org/viewvc/xerces/java/branches/xml-schema-1.1-dev/docs/features.xml?rev=1363914&r1=1363913&r2=1363914&view=diff == --- xerces/java/branches/xml-schema-1.1-dev/docs/features.xml (original) +++ xerces/java/branches/xml-schema-1.1-dev/docs/features.xml Fri Jul 20 19:45:19 2012 @@ -332,8 +332,8 @@ catch (SAXException e) { - Enable comment and PI checking during the XSD 1.1 assert evaluation. - Disable comment and PI checking during the XSD 1.1 assert evaluation. + Enable comments and PIs in XDM model, for XSD 1.1 assertion processing. + Disable comments and PIs in XDM model, for XSD 1.1 assertion processing. - To unsubscribe, e-mail: commits-unsubscr...@xerces.apache.org For additional commands, e-mail: commits-h...@xerces.apache.org
svn commit: r1363110 - /xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/XMLSchemaValidator.java
Author: mukulg Date: Wed Jul 18 20:58:25 2012 New Revision: 1363110 URL: http://svn.apache.org/viewvc?rev=1363110&view=rev Log: committing fix for Jira issue, XERCESJ-1573. resetting an assertions validator after a validation episode to avoid memory leaks if the JAXP Validator object is reused for subsequent validations. 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=1363110&r1=1363109&r2=1363110&view=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 Wed Jul 18 20:58:25 2012 @@ -784,7 +784,8 @@ public class XMLSchemaValidator fDocumentHandler.startDocument(locator, encoding, namespaceContext, augs); } -fNamespaceContext = namespaceContext; +fNamespaceContext = namespaceContext; +fAssertionValidator = new XSDAssertionValidator(this); } // startDocument(XMLLocator,String) @@ -1025,6 +1026,7 @@ public class XMLSchemaValidator fDocumentHandler.endDocument(augs); } fLocator = null; +fAssertionValidator = null; } // endDocument(Augmentations) @@ -1429,8 +1431,7 @@ public class XMLSchemaValidator fState4XsiType.setExtraChecking(false); fState4ApplyDefault.setFacetChecking(false); fSchemaVersion = fSchemaLoader.getSchemaVersion(); -fXSConstraints = fSchemaLoader.getXSConstraints(); -fAssertionValidator = new XSDAssertionValidator(this); +fXSConstraints = fSchemaLoader.getXSConstraints(); fTypeAlternativeValidator = new XSDTypeAlternativeValidator(); } // () - To unsubscribe, e-mail: commits-unsubscr...@xerces.apache.org For additional commands, e-mail: commits-h...@xerces.apache.org
svn commit: r1361337 - /xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/XSDHandler.java
Author: mukulg Date: Fri Jul 13 18:59:31 2012 New Revision: 1361337 URL: http://svn.apache.org/viewvc?rev=1361337&view=rev Log: committing fix for jira issue, XERCESJ-1568 Modified: xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/XSDHandler.java Modified: xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/XSDHandler.java URL: http://svn.apache.org/viewvc/xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/XSDHandler.java?rev=1361337&r1=1361336&r2=1361337&view=diff == --- xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/XSDHandler.java (original) +++ xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/XSDHandler.java Fri Jul 13 18:59:31 2012 @@ -1215,7 +1215,7 @@ public class XSDHandler { newSchemaRoot = resolveSchema(schemaSource, fSchemaGrammarDescription, mustResolve, child); schemaNamespace = currSchemaInfo.fTargetNamespace; if (fSchemaVersion == Constants.SCHEMA_VERSION_1_1) { -if (isOverride) { +if (isOverride && newSchemaRoot != null) { final Element transformedSchemaRoot = (Element) fOverrideHandler.transform(schemaId, child, newSchemaRoot); // Either we had a collision where the transformed - To unsubscribe, e-mail: commits-unsubscr...@xerces.apache.org For additional commands, e-mail: commits-h...@xerces.apache.org
svn commit: r1360925 - /xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/XSDAbstractTraverser.java
Author: mukulg Date: Thu Jul 12 20:47:00 2012 New Revision: 1360925 URL: http://svn.apache.org/viewvc?rev=1360925&view=rev Log: committing a fix for jira issue XERCESJ-1569 Modified: xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/XSDAbstractTraverser.java Modified: xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/XSDAbstractTraverser.java URL: http://svn.apache.org/viewvc/xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/XSDAbstractTraverser.java?rev=1360925&r1=1360924&r2=1360925&view=diff == --- xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/XSDAbstractTraverser.java (original) +++ xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/XSDAbstractTraverser.java Thu Jul 12 20:47:00 2012 @@ -466,7 +466,7 @@ abstract class XSDAbstractTraverser { } } // process 'assertion' facet. introduced in XML Schema 1.1 -else if (facet.equals(SchemaSymbols.ELT_ASSERTION)) { +else if (facet.equals(SchemaSymbols.ELT_ASSERTION) && fSchemaHandler.fSchemaVersion == Constants.SCHEMA_VERSION_1_1) { attrs = fAttrChecker.checkAttributes(content, false, schemaDoc); String testStr = (String) attrs[XSAttributeChecker.ATTIDX_XPATH]; String xpathDefaultNamespace = (String) attrs[XSAttributeChecker.ATTIDX_XPATHDEFAULTNS]; - To unsubscribe, e-mail: commits-unsubscr...@xerces.apache.org For additional commands, e-mail: commits-h...@xerces.apache.org
svn commit: r1360009 - in /xerces/java/branches/xml-schema-1.1-dev: samples/xs/XSSerializer.java src/org/apache/xerces/impl/xs/XMLAssertPsychopathXPath2Impl.java
Author: mukulg Date: Wed Jul 11 04:45:17 2012 New Revision: 1360009 URL: http://svn.apache.org/viewvc?rev=1360009&view=rev Log: doing minor refactoring and improving javadocs Modified: xerces/java/branches/xml-schema-1.1-dev/samples/xs/XSSerializer.java xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/XMLAssertPsychopathXPath2Impl.java Modified: xerces/java/branches/xml-schema-1.1-dev/samples/xs/XSSerializer.java URL: http://svn.apache.org/viewvc/xerces/java/branches/xml-schema-1.1-dev/samples/xs/XSSerializer.java?rev=1360009&r1=1360008&r2=1360009&view=diff == --- xerces/java/branches/xml-schema-1.1-dev/samples/xs/XSSerializer.java (original) +++ xerces/java/branches/xml-schema-1.1-dev/samples/xs/XSSerializer.java Wed Jul 11 04:45:17 2012 @@ -70,7 +70,7 @@ import org.xml.sax.InputSource; /** * XSModel serialization utility. - * This utility serializes the Xerces XSModel into lexical, XSD syntax. + * This utility serializes the Xerces XSModel instance into lexical, XSD syntax. * * @author Mukul Gandhi, IBM * @version $Id$ @@ -87,7 +87,7 @@ public class XSSerializer { * * An entry point to test this utility. * - * The XSModel could be synthesized by any means (for example, by direct + * The XSModel could be synthesized by various means (for example, by direct * API calls to Xerces Schema API, methods) -- in which case, the method * "serialize" will be used directly, passing in the XSModel object. */ Modified: xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/XMLAssertPsychopathXPath2Impl.java URL: http://svn.apache.org/viewvc/xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/XMLAssertPsychopathXPath2Impl.java?rev=1360009&r1=1360008&r2=1360009&view=diff == --- xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/XMLAssertPsychopathXPath2Impl.java (original) +++ xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/XMLAssertPsychopathXPath2Impl.java Wed Jul 11 04:45:17 2012 @@ -194,8 +194,8 @@ public class XMLAssertPsychopathXPath2Im if (attrSimpleType != null) { List attrAssertList = fXmlSchemaValidator.getAssertionValidator().getAssertsFromSimpleType(attrSimpleType); if (attrAssertList != null) { -boolean isTypeDerivedFromList = ((XSSimpleType) attrSimpleType.getBaseType()).getVariety() == XSSimpleType.VARIETY_LIST; -boolean isTypeDerivedFromUnion = ((XSSimpleType) attrSimpleType.getBaseType()).getVariety() == XSSimpleType.VARIETY_UNION; +boolean isTypeDerivedFromList = isTypeDerivedFromSTList(attrSimpleType); +boolean isTypeDerivedFromUnion = isTypeDerivedFromSTUnion(attrSimpleType); for (int assertIdx = 0; assertIdx < attrAssertList.size(); assertIdx++) { XSAssertImpl assertImpl = (XSAssertImpl)attrAssertList.get(assertIdx); assertImpl.setAttrName(attrQname.localpart); @@ -345,8 +345,8 @@ public class XMLAssertPsychopathXPath2Im private void evaluateAssertionsFromASimpleType(QName element, List assertions, String value, Augmentations augs) throws Exception { XSSimpleTypeDefinition simpleTypeDefn = (XSSimpleTypeDefinition) ((ElementPSVI) augs.getItem(Constants.ELEMENT_PSVI)).getTypeDefinition(); -boolean isTypeDerivedFromList = ((XSSimpleType) simpleTypeDefn.getBaseType()).getVariety() == XSSimpleType.VARIETY_LIST; -boolean isTypeDerivedFromUnion = ((XSSimpleType) simpleTypeDefn.getBaseType()).getVariety() == XSSimpleType.VARIETY_UNION; +boolean isTypeDerivedFromList = isTypeDerivedFromSTList(simpleTypeDefn); +boolean isTypeDerivedFromUnion = isTypeDerivedFromSTUnion(simpleTypeDefn); Vector assertList = (Vector) assertions; for (int assertIdx = 0; assertIdx < assertList.size(); assertIdx++) { @@ -546,8 +546,8 @@ public class XMLAssertPsychopathXPath2Im // reassign value to simple type instance simpleTypeDefn = (XSSimpleTypeDefinition)complexTypeDef.getBaseType(); } -boolean isTypeDerivedFromList = ((XSSimpleType) simpleTypeDefn.getBaseType()).getVariety() == XSSimpleType.VARIETY_LIST; -boolean isTypeDerivedFromUnion = ((XSSimpleType) simpleTypeDefn.getBaseType()).getVariety() == XSSimpleType.VARIETY_UNION; +boolean isTypeDerivedFromList = isTypeDerivedFromSTList(simpleTypeDefn); +boolean isTypeDerivedFromUnion = isTypeDerivedFromSTUnion(simpleTypeDefn);
svn commit: r1356945 - /xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/XMLSchemaValidator.java
Author: mukulg Date: Tue Jul 3 21:07:23 2012 New Revision: 1356945 URL: http://svn.apache.org/viewvc?rev=1356945&view=rev Log: schema 1.1 fix: committing a fix for issue discussed here, http://markmail.org/message/oeq67cywvut5gqjx (in certain cases, errors generated during XML Schema validation were not propagated up the stack). 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=1356945&r1=1356944&r2=1356945&view=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 Tue Jul 3 21:07:23 2012 @@ -53,15 +53,15 @@ import org.apache.xerces.impl.xs.models. import org.apache.xerces.impl.xs.models.CMNodeFactory; import org.apache.xerces.impl.xs.models.XSCMValidator; import org.apache.xerces.impl.xs.util.ObjectListImpl; -import org.apache.xerces.impl.xs.util.XSObjectListImpl; import org.apache.xerces.impl.xs.util.XS11TypeHelper; +import org.apache.xerces.impl.xs.util.XSObjectListImpl; import org.apache.xerces.util.AugmentationsImpl; import org.apache.xerces.util.IntStack; import org.apache.xerces.util.SymbolTable; +import org.apache.xerces.util.URI.MalformedURIException; import org.apache.xerces.util.XMLAttributesImpl; import org.apache.xerces.util.XMLChar; import org.apache.xerces.util.XMLSymbols; -import org.apache.xerces.util.URI.MalformedURIException; import org.apache.xerces.xni.Augmentations; import org.apache.xerces.xni.NamespaceContext; import org.apache.xerces.xni.QName; @@ -80,6 +80,7 @@ import org.apache.xerces.xni.parser.XMLD import org.apache.xerces.xni.parser.XMLDocumentSource; import org.apache.xerces.xni.parser.XMLEntityResolver; import org.apache.xerces.xni.parser.XMLInputSource; +import org.apache.xerces.xni.parser.XMLParseException; import org.apache.xerces.xs.AttributePSVI; import org.apache.xerces.xs.ElementPSVI; import org.apache.xerces.xs.ShortList; @@ -2620,7 +2621,7 @@ public class XMLSchemaValidator fAssertionValidator.handleStartElement(element, attributes); } catch(Exception ex) { -throw new XNIException(ex.getMessage(), ex); +throw new XMLParseException(fLocator, ex.getMessage()); } } // assertionValidatorStartElementDelegate @@ -2763,7 +2764,7 @@ public class XMLSchemaValidator assertionValidatorEndElementDelegate(element); } catch(Exception ex) { - // NO OP + throw new XMLParseException(fLocator, ex.getMessage()); } } - To unsubscribe, e-mail: commits-unsubscr...@xerces.apache.org For additional commands, e-mail: commits-h...@xerces.apache.org
svn commit: r1350903 - /xerces/java/branches/xml-schema-1.1-dev/tools/org.eclipse.wst.xml.xpath2.processor_1.2.0.jar
Author: mukulg Date: Sat Jun 16 10:11:46 2012 New Revision: 1350903 URL: http://svn.apache.org/viewvc?rev=1350903&view=rev Log: doing few minor corrections to the previous commit, related to casts of xs:dateTime to node references Modified: xerces/java/branches/xml-schema-1.1-dev/tools/org.eclipse.wst.xml.xpath2.processor_1.2.0.jar Modified: xerces/java/branches/xml-schema-1.1-dev/tools/org.eclipse.wst.xml.xpath2.processor_1.2.0.jar URL: http://svn.apache.org/viewvc/xerces/java/branches/xml-schema-1.1-dev/tools/org.eclipse.wst.xml.xpath2.processor_1.2.0.jar?rev=1350903&r1=1350902&r2=1350903&view=diff == Binary files - no diff available. - To unsubscribe, e-mail: commits-unsubscr...@xerces.apache.org For additional commands, e-mail: commits-h...@xerces.apache.org
svn commit: r1350884 - /xerces/java/branches/xml-schema-1.1-dev/tools/org.eclipse.wst.xml.xpath2.processor_1.2.0.jar
Author: mukulg Date: Sat Jun 16 08:34:02 2012 New Revision: 1350884 URL: http://svn.apache.org/viewvc?rev=1350884&view=rev Log: schema 1.1 commit: fixes to PsychoPath XPath2 engine codebase, for xs:dateTime casts on node reference. here's an email thread which describes the context of this issue, http://markmail.org/message/ov5jyue4rdqwjeri. the corresponding commit was also made at PsychoPath engine's eclipse codebase. Modified: xerces/java/branches/xml-schema-1.1-dev/tools/org.eclipse.wst.xml.xpath2.processor_1.2.0.jar Modified: xerces/java/branches/xml-schema-1.1-dev/tools/org.eclipse.wst.xml.xpath2.processor_1.2.0.jar URL: http://svn.apache.org/viewvc/xerces/java/branches/xml-schema-1.1-dev/tools/org.eclipse.wst.xml.xpath2.processor_1.2.0.jar?rev=1350884&r1=1350883&r2=1350884&view=diff == Binary files - no diff available. - To unsubscribe, e-mail: commits-unsubscr...@xerces.apache.org For additional commands, e-mail: commits-h...@xerces.apache.org
svn commit: r1350861 - /xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/assertion/XSAssertionXPath2ValueImpl.java
Author: mukulg Date: Sat Jun 16 04:47:51 2012 New Revision: 1350861 URL: http://svn.apache.org/viewvc?rev=1350861&view=rev Log: committing fix for Jira issue, XERCESJ-1559 Modified: xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/assertion/XSAssertionXPath2ValueImpl.java 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=1350861&r1=1350860&r2=1350861&view=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 Sat Jun 16 04:47:51 2012 @@ -30,7 +30,6 @@ import org.apache.xerces.util.XMLChar; import org.apache.xerces.xs.ElementPSVI; import org.apache.xerces.xs.XSComplexTypeDefinition; import org.apache.xerces.xs.XSConstants; -import org.apache.xerces.xs.XSElementDeclaration; import org.apache.xerces.xs.XSObjectList; import org.apache.xerces.xs.XSSimpleTypeDefinition; import org.apache.xerces.xs.XSTypeDefinition; @@ -45,7 +44,8 @@ import org.w3c.dom.Node; import org.w3c.dom.NodeList; /** - * This class defines a set of methods to work with XPath 2.0 dynamic context variable "$value" that is needed for assertions evaluation. + * This class defines a set of methods to work with XPath 2.0 dynamic context + * variable "$value", that is needed for assertions evaluation. * * @xerces.internal * @@ -82,9 +82,8 @@ public class XSAssertionXPath2ValueImpl String strValueOf$value = ""; if (textChildCount == effectiveChildNodeCount) { -// the DOM tree we are inspecting has simple content. therefore we can find the desired string value. -XSElementDeclaration elemDecl = pElemPSVI.getElementDeclaration(); -if ((elemDecl.getTypeDefinition()).derivedFrom(SchemaSymbols.URI_SCHEMAFORSCHEMA, SchemaSymbols.ATTVAL_STRING, XSConstants.DERIVATION_RESTRICTION)) { +// the DOM tree we are inspecting has simple content. therefore we can find the desired string value. +if ((pElemPSVI.getTypeDefinition()).derivedFrom(SchemaSymbols.URI_SCHEMAFORSCHEMA, SchemaSymbols.ATTVAL_STRING, XSConstants.DERIVATION_RESTRICTION)) { // if element's schema type is derived by restriction from xs:string, white-space normalization is not needed for the // string value for context variable $value. strValueOf$value = textValueContents.toString(); - To unsubscribe, e-mail: commits-unsubscr...@xerces.apache.org For additional commands, e-mail: commits-h...@xerces.apache.org
svn commit: r1342425 - /xerces/java/branches/xml-schema-1.1-dev/tools/org.eclipse.wst.xml.xpath2.processor_1.2.0.jar
Author: mukulg Date: Thu May 24 20:33:40 2012 New Revision: 1342425 URL: http://svn.apache.org/viewvc?rev=1342425&view=rev Log: related to commit for jira issue XERCESJ-1562, doing additional improvements related to {xs:dateTime - xs:dayTimeDuration} subtraction operations with the PsychoPath XPath2 engine. Modified: xerces/java/branches/xml-schema-1.1-dev/tools/org.eclipse.wst.xml.xpath2.processor_1.2.0.jar Modified: xerces/java/branches/xml-schema-1.1-dev/tools/org.eclipse.wst.xml.xpath2.processor_1.2.0.jar URL: http://svn.apache.org/viewvc/xerces/java/branches/xml-schema-1.1-dev/tools/org.eclipse.wst.xml.xpath2.processor_1.2.0.jar?rev=1342425&r1=1342424&r2=1342425&view=diff == Binary files - no diff available. - To unsubscribe, e-mail: commits-unsubscr...@xerces.apache.org For additional commands, e-mail: commits-h...@xerces.apache.org
svn commit: r1341644 - /xerces/java/branches/xml-schema-1.1-dev/tools/org.eclipse.wst.xml.xpath2.processor_1.2.0.jar
Author: mukulg Date: Tue May 22 21:31:36 2012 New Revision: 1341644 URL: http://svn.apache.org/viewvc?rev=1341644&view=rev Log: committing a slight additional fix to PsychoPath XPath engine, related to the earlier fix committed few minutes ago. Modified: xerces/java/branches/xml-schema-1.1-dev/tools/org.eclipse.wst.xml.xpath2.processor_1.2.0.jar Modified: xerces/java/branches/xml-schema-1.1-dev/tools/org.eclipse.wst.xml.xpath2.processor_1.2.0.jar URL: http://svn.apache.org/viewvc/xerces/java/branches/xml-schema-1.1-dev/tools/org.eclipse.wst.xml.xpath2.processor_1.2.0.jar?rev=1341644&r1=1341643&r2=1341644&view=diff == Binary files - no diff available. - To unsubscribe, e-mail: commits-unsubscr...@xerces.apache.org For additional commands, e-mail: commits-h...@xerces.apache.org
svn commit: r1341615 - /xerces/java/branches/xml-schema-1.1-dev/tools/org.eclipse.wst.xml.xpath2.processor_1.2.0.jar
Author: mukulg Date: Tue May 22 20:33:07 2012 New Revision: 1341615 URL: http://svn.apache.org/viewvc?rev=1341615&view=rev Log: providing fixes for the jira issue, https://issues.apache.org/jira/browse/XERCESJ-1562. this required some fixes in the PsychoPath XPath2 engine (ref, eclipse bug report https://bugs.eclipse.org/bugs/show_bug.cgi?id=380326). Modified: xerces/java/branches/xml-schema-1.1-dev/tools/org.eclipse.wst.xml.xpath2.processor_1.2.0.jar Modified: xerces/java/branches/xml-schema-1.1-dev/tools/org.eclipse.wst.xml.xpath2.processor_1.2.0.jar URL: http://svn.apache.org/viewvc/xerces/java/branches/xml-schema-1.1-dev/tools/org.eclipse.wst.xml.xpath2.processor_1.2.0.jar?rev=1341615&r1=1341614&r2=1341615&view=diff == Binary files - no diff available. - To unsubscribe, e-mail: commits-unsubscr...@xerces.apache.org For additional commands, e-mail: commits-h...@xerces.apache.org
svn commit: r1333217 - /xerces/java/trunk/src/org/apache/xerces/impl/xs/XMLSchemaValidator.java
Author: mukulg Date: Wed May 2 21:25:19 2012 New Revision: 1333217 URL: http://svn.apache.org/viewvc?rev=1333217&view=rev Log: reversing previous changes, as per new comments for jira issue XERCESJ-1559 Modified: xerces/java/trunk/src/org/apache/xerces/impl/xs/XMLSchemaValidator.java Modified: xerces/java/trunk/src/org/apache/xerces/impl/xs/XMLSchemaValidator.java URL: http://svn.apache.org/viewvc/xerces/java/trunk/src/org/apache/xerces/impl/xs/XMLSchemaValidator.java?rev=1333217&r1=1333216&r2=1333217&view=diff == --- xerces/java/trunk/src/org/apache/xerces/impl/xs/XMLSchemaValidator.java (original) +++ xerces/java/trunk/src/org/apache/xerces/impl/xs/XMLSchemaValidator.java Wed May 2 21:25:19 2012 @@ -2106,14 +2106,6 @@ public class XMLSchemaValidator xsiType = attributes.getValue(SchemaSymbols.URI_XSI, SchemaSymbols.XSI_TYPE); } -if (fCurrentType == null && xsiType != null && fElementDepth == 0) { -fXSIErrorReporter.fErrorReporter.reportError( -XSMessageFormatter.SCHEMA_DOMAIN, -"cvc-elt.1.a", -new Object[] { element.rawname }, -XMLErrorReporter.SEVERITY_ERROR); -} - // if no decl/type found for the current element if (fCurrentType == null && xsiType == null) { // if this is the validation root, report an error, because - To unsubscribe, e-mail: commits-unsubscr...@xerces.apache.org For additional commands, e-mail: commits-h...@xerces.apache.org
svn commit: r1333216 - /xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/XMLSchemaValidator.java
Author: mukulg Date: Wed May 2 21:24:36 2012 New Revision: 1333216 URL: http://svn.apache.org/viewvc?rev=1333216&view=rev Log: reversing previous changes, as per new comments for jira issue XERCESJ-1559 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=1333216&r1=1333215&r2=1333216&view=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 Wed May 2 21:24:36 2012 @@ -2294,14 +2294,6 @@ public class XMLSchemaValidator final boolean isSchema11 = (fSchemaVersion == Constants.SCHEMA_VERSION_1_1); boolean needToPushErrorContext = false; -if (fCurrentType == null && xsiType != null && fElementDepth == 0) { -fXSIErrorReporter.fErrorReporter.reportError( -XSMessageFormatter.SCHEMA_DOMAIN, -"cvc-elt.1.a", -new Object[] { element.rawname }, -XMLErrorReporter.SEVERITY_ERROR); -} - if (fCurrentType == null && xsiType == null) { // if this is the validation root, report an error, because // we can't find eith decl or type for this element - To unsubscribe, e-mail: commits-unsubscr...@xerces.apache.org For additional commands, e-mail: commits-h...@xerces.apache.org
svn commit: r1328735 - /xerces/java/trunk/src/org/apache/xerces/impl/xs/XMLSchemaValidator.java
Author: mukulg Date: Sat Apr 21 20:49:58 2012 New Revision: 1328735 URL: http://svn.apache.org/viewvc?rev=1328735&view=rev Log: committing the same fix on trunk, for the commit that was made a moment ago on the schema-dev-1.1 branch. Modified: xerces/java/trunk/src/org/apache/xerces/impl/xs/XMLSchemaValidator.java Modified: xerces/java/trunk/src/org/apache/xerces/impl/xs/XMLSchemaValidator.java URL: http://svn.apache.org/viewvc/xerces/java/trunk/src/org/apache/xerces/impl/xs/XMLSchemaValidator.java?rev=1328735&r1=1328734&r2=1328735&view=diff == --- xerces/java/trunk/src/org/apache/xerces/impl/xs/XMLSchemaValidator.java (original) +++ xerces/java/trunk/src/org/apache/xerces/impl/xs/XMLSchemaValidator.java Sat Apr 21 20:49:58 2012 @@ -2106,6 +2106,14 @@ public class XMLSchemaValidator xsiType = attributes.getValue(SchemaSymbols.URI_XSI, SchemaSymbols.XSI_TYPE); } +if (fCurrentType == null && xsiType != null && fElementDepth == 0) { +fXSIErrorReporter.fErrorReporter.reportError( +XSMessageFormatter.SCHEMA_DOMAIN, +"cvc-elt.1.a", +new Object[] { element.rawname }, +XMLErrorReporter.SEVERITY_ERROR); +} + // if no decl/type found for the current element if (fCurrentType == null && xsiType == null) { // if this is the validation root, report an error, because - To unsubscribe, e-mail: commits-unsubscr...@xerces.apache.org For additional commands, e-mail: commits-h...@xerces.apache.org
svn commit: r1328734 - /xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/XMLSchemaValidator.java
Author: mukulg Date: Sat Apr 21 20:47:17 2012 New Revision: 1328734 URL: http://svn.apache.org/viewvc?rev=1328734&view=rev Log: committing fixes for the bug reported by "Jorge Williams", with Xerces's XSD implementation (bug reference, http://markmail.org/message/ijlswam4n6jzb7zh). this bug appears to occur both with Xerces's XSD 1.1 and 1.0 implementations. this also appears to be not XSD 1.1 specific, and appears to be related to use of xsi:type and an schema element declaration not existing for the root XML element. 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=1328734&r1=1328733&r2=1328734&view=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 Sat Apr 21 20:47:17 2012 @@ -2293,6 +2293,15 @@ public class XMLSchemaValidator // if no decl/type found for the current element final boolean isSchema11 = (fSchemaVersion == Constants.SCHEMA_VERSION_1_1); boolean needToPushErrorContext = false; + +if (fCurrentType == null && xsiType != null && fElementDepth == 0) { +fXSIErrorReporter.fErrorReporter.reportError( +XSMessageFormatter.SCHEMA_DOMAIN, +"cvc-elt.1.a", +new Object[] { element.rawname }, +XMLErrorReporter.SEVERITY_ERROR); +} + if (fCurrentType == null && xsiType == null) { // if this is the validation root, report an error, because // we can't find eith decl or type for this element @@ -2339,7 +2348,8 @@ public class XMLSchemaValidator else if (wildcard != null && wildcard.fProcessContents == XSWildcardDecl.PC_STRICT) { // report error, because wilcard = strict reportSchemaError("cvc-complex-type.2.4.c", new Object[] { element.rawname }); -} +} + // no element decl or type found for this element. // Allowed by the spec, we can choose to either laxly assess this // element, or to skip it. Now we choose lax assessment. - To unsubscribe, e-mail: commits-unsubscr...@xerces.apache.org For additional commands, e-mail: commits-h...@xerces.apache.org
svn commit: r1307787 - /xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/XMLAssertPsychopathXPath2Impl.java
Author: mukulg Date: Sat Mar 31 12:19:36 2012 New Revision: 1307787 URL: http://svn.apache.org/viewvc?rev=1307787&view=rev Log: fixing a NPE error (on schema 1.1 branch) reported by "Jorge Williams" on xerces list (problem ref, http://markmail.org/thread/ei2isj425fz2335a). Modified: xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/XMLAssertPsychopathXPath2Impl.java Modified: xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/XMLAssertPsychopathXPath2Impl.java URL: http://svn.apache.org/viewvc/xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/XMLAssertPsychopathXPath2Impl.java?rev=1307787&r1=1307786&r2=1307787&view=diff == --- xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/XMLAssertPsychopathXPath2Impl.java (original) +++ xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/XMLAssertPsychopathXPath2Impl.java Sat Mar 31 12:19:36 2012 @@ -191,20 +191,22 @@ public class XMLAssertPsychopathXPath2Im Augmentations attrAugs = attributes.getAugmentations(attrIdx); AttributePSVImpl attrPsvi = (AttributePSVImpl)attrAugs.getItem(Constants.ATTRIBUTE_PSVI); XSSimpleTypeDefinition attrSimpleType = (XSSimpleTypeDefinition) attrPsvi.getTypeDefinition(); -List attrAssertList = fXmlSchemaValidator.getAssertionValidator().getAssertsFromSimpleType(attrSimpleType); -if (attrAssertList != null) { -boolean isTypeDerivedFromList = ((XSSimpleType) attrSimpleType.getBaseType()).getVariety() == XSSimpleType.VARIETY_LIST; -boolean isTypeDerivedFromUnion = ((XSSimpleType) attrSimpleType.getBaseType()).getVariety() == XSSimpleType.VARIETY_UNION; -for (int assertIdx = 0; assertIdx < attrAssertList.size(); assertIdx++) { -XSAssertImpl assertImpl = (XSAssertImpl)attrAssertList.get(assertIdx); -assertImpl.setAttrName(attrQname.localpart); -evaluateOneAssertionFromSimpleType(element, attrValue, attrAugs, attrSimpleType, isTypeDerivedFromList, isTypeDerivedFromUnion, assertImpl, true, attrQname); -// evaluate assertions on itemType of xs:list -XSSimpleTypeDefinition attrItemType = attrSimpleType.getItemType(); -if (isTypeDerivedFromList && attrItemType != null) { -evaluateAssertsFromItemTypeOfSTList(element, attrItemType, attrValue); -} -} +if (attrSimpleType != null) { +List attrAssertList = fXmlSchemaValidator.getAssertionValidator().getAssertsFromSimpleType(attrSimpleType); +if (attrAssertList != null) { +boolean isTypeDerivedFromList = ((XSSimpleType) attrSimpleType.getBaseType()).getVariety() == XSSimpleType.VARIETY_LIST; +boolean isTypeDerivedFromUnion = ((XSSimpleType) attrSimpleType.getBaseType()).getVariety() == XSSimpleType.VARIETY_UNION; +for (int assertIdx = 0; assertIdx < attrAssertList.size(); assertIdx++) { +XSAssertImpl assertImpl = (XSAssertImpl)attrAssertList.get(assertIdx); +assertImpl.setAttrName(attrQname.localpart); +evaluateOneAssertionFromSimpleType(element, attrValue, attrAugs, attrSimpleType, isTypeDerivedFromList, isTypeDerivedFromUnion, assertImpl, true, attrQname); +// evaluate assertions on itemType of xs:list +XSSimpleTypeDefinition attrItemType = attrSimpleType.getItemType(); +if (isTypeDerivedFromList && attrItemType != null) { +evaluateAssertsFromItemTypeOfSTList(element, attrItemType, attrValue); +} +} +} } } - To unsubscribe, e-mail: commits-unsubscr...@xerces.apache.org For additional commands, e-mail: commits-h...@xerces.apache.org
svn commit: r1304218 - /xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/XMLSchemaValidator.java
Author: mukulg Date: Fri Mar 23 07:59:16 2012 New Revision: 1304218 URL: http://svn.apache.org/viewvc?rev=1304218&view=rev Log: fixing an NPE error reported by Jorge Williams on "xerces users" list. 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=1304218&r1=1304217&r2=1304218&view=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 Fri Mar 23 07:59:16 2012 @@ -2596,7 +2596,10 @@ public class XMLSchemaValidator private XSElementDecl findLocallyDeclaredType(QName element, XSCMValidator currentCM, XSTypeDefinition baseType) { -XSElementDecl elemDecl = currentCM.findMatchingElemDecl(element, fSubGroupHandler); +XSElementDecl elemDecl = null; +if (currentCM != null) { + elemDecl = currentCM.findMatchingElemDecl(element, fSubGroupHandler); +} if (elemDecl == null) { if (baseType.getTypeCategory() != XSTypeDefinition.SIMPLE_TYPE && baseType != SchemaGrammar.getXSAnyType(fSchemaVersion)) { - To unsubscribe, e-mail: commits-unsubscr...@xerces.apache.org For additional commands, e-mail: commits-h...@xerces.apache.org
svn commit: r1300055 - in /xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs: ./ assertion/ opti/ traversers/ util/
Author: mukulg Date: Tue Mar 13 10:19:25 2012 New Revision: 1300055 URL: http://svn.apache.org/viewvc?rev=1300055&view=rev Log: doing some minor refactoring and cleanup of schema 1.1 code base. Added: xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/util/XS11TypeHelper.java - copied, changed from r1234360, xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/util/XSTypeHelper.java Removed: 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/AbstractPsychoPathXPath2Impl.java xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/XMLAssertPsychopathXPath2Impl.java 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/XSDAssertionValidator.java xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/XSDTypeAlternativeValidator.java xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/assertion/XSAssertImpl.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/opti/SchemaDOMParser.java xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/XSDAbstractTraverser.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/XSDTypeAlternativeTraverser.java Modified: xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/AbstractPsychoPathXPath2Impl.java URL: http://svn.apache.org/viewvc/xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/AbstractPsychoPathXPath2Impl.java?rev=1300055&r1=1300054&r2=1300055&view=diff == --- xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/AbstractPsychoPathXPath2Impl.java (original) +++ xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/AbstractPsychoPathXPath2Impl.java Tue Mar 13 10:19:25 2012 @@ -27,7 +27,7 @@ import javax.xml.XMLConstants; import org.apache.xerces.impl.Constants; import org.apache.xerces.impl.xs.assertion.XSAssertImpl; import org.apache.xerces.impl.xs.traversers.XSDHandler; -import org.apache.xerces.impl.xs.util.XSTypeHelper; +import org.apache.xerces.impl.xs.util.XS11TypeHelper; import org.apache.xerces.util.NamespaceSupport; import org.apache.xerces.xs.XSModel; import org.eclipse.wst.xml.xpath2.processor.DefaultDynamicContext; @@ -164,10 +164,10 @@ public class AbstractPsychoPathXPath2Imp } catch (XPathParserException ex) { // XPath parser exception if (SchemaSymbols.XS11_XPATHEXPR_COMPILE_WRN_MESG_1.equals(ex.getMessage())) { -fSchemaHandler.reportSchemaWarning("cvc-xpath.3.13.4.2b", new Object[] {assertImpl.getTest().getXPathStr(), XSTypeHelper.getSchemaTypeName(assertImpl.getTypeDefinition())}, schemaContextElem); +fSchemaHandler.reportSchemaWarning("cvc-xpath.3.13.4.2b", new Object[] {assertImpl.getTest().getXPathStr(), XS11TypeHelper.getSchemaTypeName(assertImpl.getTypeDefinition())}, schemaContextElem); } else { -fSchemaHandler.reportSchemaError("cvc-xpath.3.13.4.2a", new Object[] {assertImpl.getTest().getXPathStr(), XSTypeHelper.getSchemaTypeName(assertImpl.getTypeDefinition())}, schemaContextElem); +fSchemaHandler.reportSchemaError("cvc-xpath.3.13.4.2a", new Object[] {assertImpl.getTest().getXPathStr(), XS11TypeHelper.getSchemaTypeName(assertImpl.getTypeDefinition())}, schemaContextElem); } } Modified: xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/XMLAssertPsychopathXPath2Impl.java URL: http://svn.apache.org/viewvc/xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/XMLAssertPsychopathXPath2Impl.java?rev=1300055&r1=1300054&r2=1300055&view=diff == --- xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/XMLAssertPsychopathXPath2Impl.java (original) +++ xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/XMLAssertPsychopathXPath2Impl.java Tue Mar 13 10:19:25 2012 @@ -36,7 +36,7 @@ import org.apache.xerces.impl.xs.asserti import org.apache.xerces.impl.xs.assertion.XSAssert; import org.apache.xerces.impl.xs.assertion.XSAssertImpl; import org.apache.xerces.impl.xs.util.ObjectLi