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

2013-02-14 Thread mukulg
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

2013-02-14 Thread mukulg
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 = 
isTypeAlternativesEquivalent(elementDecl1.getDefaultTypeDefinition(), 
elementDecl2.getDefaultTypeDefinition()); 
+}
+  

[Xerces Wiki] Update of "February2013" by Michael Glavassevich

2013-02-14 Thread Apache Wiki
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Xerces Wiki" for change 
notification.

The "February2013" page has been changed by Michael Glavassevich:
http://wiki.apache.org/xerces/February2013?action=diff&rev1=5&rev2=6

Comment:
Add a comment about the website migration to svnpubsub.

  
  There's still some work left to do on the TLP website, including adding "TM" 
to the project logo.
  
+ === General ===
+ 
+ We recently put in a request to the Infrastructure team to migrate the Xerces 
website to svnpubsub. Everything is set up on our end (in SVN) for the 
migration. We're just waiting for Infrastructure to turn the switch.
+ 

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



[Xerces Wiki] Update of "February2013" by Michael Glavassevich

2013-02-14 Thread Apache Wiki
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Xerces Wiki" for change 
notification.

The "February2013" page has been changed by Michael Glavassevich:
http://wiki.apache.org/xerces/February2013?action=diff&rev1=4&rev2=5

Comment:
Update to Xerces-J report.

  = February 2013 Report =
  
  === Xerces-J ===
+ 
+ The development focus continues to be on improving the quality of the XML 
Schema 1.1 implementation. Several bugs were fixed in this area and a large set 
of XML Schema 1.1 unit tests were contributed.
  
  Mailing list traffic has been moderate; about 100+ posts on the j-dev and 
j-users lists since the beginning of November 2012.
  

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



[Xerces Wiki] Trivial Update of "February2013" by Michael Glavassevich

2013-02-14 Thread Apache Wiki
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Xerces Wiki" for change 
notification.

The "February2013" page has been changed by Michael Glavassevich:
http://wiki.apache.org/xerces/February2013?action=diff&rev1=3&rev2=4

  
  === Xerces-C ===
  
- Discussion continues about the possible donation of icXML (a high performance 
version of Xerces-C++) to the Xerces project. Rob Cameron is currently looking 
for a champion to help get this on track and understands that creating a 
community of developers and users around icXML is key for it to be a successful 
subproject here.
+ Discussion continues about the possible donation of icXML (a high performance 
version of Xerces-C++) to the Xerces project. Rob Cameron is currently looking 
for a champion to help get this on track and understands that building a 
community of developers and users around icXML is key for it to be a successful 
subproject here.
  
  One minor bug was fixed during the reporting period.
  

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



[Xerces Wiki] Update of "February2013" by Michael Glavassevich

2013-02-14 Thread Apache Wiki
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Xerces Wiki" for change 
notification.

The "February2013" page has been changed by Michael Glavassevich:
http://wiki.apache.org/xerces/February2013?action=diff&rev1=2&rev2=3

Comment:
Update to Xerces-C++ report.

  No new releases this quarter.
  
  === Xerces-C ===
+ 
+ Discussion continues about the possible donation of icXML (a high performance 
version of Xerces-C++) to the Xerces project. Rob Cameron is currently looking 
for a champion to help get this on track and understands that creating a 
community of developers and users around icXML is key for it to be a successful 
subproject here.
+ 
+ One minor bug was fixed during the reporting period.
  
  Mailing list traffic has been moderate; about 70+ posts on the c-dev and 
c-users lists since the beginning of November 2012.
  

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



[Xerces Wiki] Update of "February2013" by Michael Glavassevich

2013-02-14 Thread Apache Wiki
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Xerces Wiki" for change 
notification.

The "February2013" page has been changed by Michael Glavassevich:
http://wiki.apache.org/xerces/February2013?action=diff&rev1=1&rev2=2

Comment:
Initial write-up for February board meeting.

  
  === Xerces-J ===
  
+ Mailing list traffic has been moderate; about 100+ posts on the j-dev and 
j-users lists since the beginning of November 2012.
+ 
+ No new releases this quarter.
+ 
  === Xerces-C ===
+ 
+ Mailing list traffic has been moderate; about 70+ posts on the c-dev and 
c-users lists since the beginning of November 2012.
+ 
+ No new releases this quarter.
  
  === Xerces-P ===
  
+ Nothing in particular to report. There was no development activity over the 
reporting period.
+ 
  === XML Commons ===
  
+ It's been quiet in XML Commons. No postings to the mailing list or 
development activity to report.
+ 
+ === Apache Project Branding Requirements ===
+ 
+ There's still some work left to do on the TLP website, including adding "TM" 
to the project logo.
+ 

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