You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by mu...@apache.org on 2010/11/30 01:57:39 UTC
svn commit: r1040371 -
/xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/XMLSchemaValidator.java
Author: mukulg
Date: Tue Nov 30 00:57:39 2010
New Revision: 1040371
URL: http://svn.apache.org/viewvc?rev=1040371&view=rev
Log:
committing changes for JIRA issue XERCESJ-1486.
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=1040371&r1=1040370&r2=1040371&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 Nov 30 00:57:39 2010
@@ -2014,7 +2014,8 @@ public class XMLSchemaValidator
if (ctype.fParticle != null
&& (next = fCurrentCM.whatCanGoHere(fCurrCMState)).size() > 0) {
String expected = expectedStr(next);
- final int[] occurenceInfo = fCurrentCM.occurenceInfo(fCurrCMState);
+ final int[] occurenceInfo = fCurrentCM.occurenceInfo(fCurrCMState);
+ String elemExpandedQname = (element.uri != null) ? "{"+'"'+element.uri+'"'+":"+element.localpart+"}" : element.localpart;
if (occurenceInfo != null) {
final int minOccurs = occurenceInfo[0];
final int maxOccurs = occurenceInfo[1];
@@ -2028,20 +2029,20 @@ public class XMLSchemaValidator
}
else {
reportSchemaError("cvc-complex-type.2.4.g", new Object[] { element.rawname,
- fCurrentCM.getTermName(occurenceInfo[3]), Integer.toString(minOccurs) });
+ fCurrentCM.getTermName(occurenceInfo[3]), Integer.toString(minOccurs) });
}
}
// Check if this is a violation of maxOccurs
else if (count >= maxOccurs && maxOccurs != SchemaSymbols.OCCURRENCE_UNBOUNDED) {
reportSchemaError("cvc-complex-type.2.4.e", new Object[] { element.rawname,
- expected, Integer.toString(maxOccurs) });
+ expected, Integer.toString(maxOccurs) });
}
else {
- reportSchemaError("cvc-complex-type.2.4.a", new Object[] { element.rawname, expected });
+ reportSchemaError("cvc-complex-type.2.4.a", new Object[] { elemExpandedQname, expected });
}
}
else {
- reportSchemaError("cvc-complex-type.2.4.a", new Object[] { element.rawname, expected });
+ reportSchemaError("cvc-complex-type.2.4.a", new Object[] { elemExpandedQname, expected });
}
}
else {
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@xerces.apache.org
For additional commands, e-mail: commits-help@xerces.apache.org