Author: mrglavas
Date: Thu Jul 27 20:17:09 2006
New Revision: 426369

URL: http://svn.apache.org/viewvc?rev=426369&view=rev
Log:
Fixing a bug. If an IDC field matches a strict or lax element wildcard
and no element declaration is found for the element we were always 
reporting an error. This is because we weren't passing the actual type
(which would be specified with xsi:type) to the XPath matcher.

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=426369&r1=426368&r2=426369&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 
Jul 27 20:17:09 2006
@@ -2259,10 +2259,10 @@
             int oldCount = fMatcherStack.getMatcherCount();
             for (int i = oldCount - 1; i >= 0; i--) {
                 XPathMatcher matcher = fMatcherStack.getMatcherAt(i);
-                if (fCurrentElemDecl == null)
-                    matcher.endElement(element, null, false, 
fValidatedInfo.actualValue, fValidatedInfo.actualValueType, 
fValidatedInfo.itemValueTypes);
-                
-                else
+                if (fCurrentElemDecl == null) {
+                    matcher.endElement(element, fCurrentType, false, 
fValidatedInfo.actualValue, fValidatedInfo.actualValueType, 
fValidatedInfo.itemValueTypes);
+                }
+                else {
                     matcher.endElement(
                             element,
                             fCurrentType,
@@ -2276,6 +2276,7 @@
                             fDefaultValue == null
                                 ? fValidatedInfo.itemValueTypes
                                 : fCurrentElemDecl.fDefault.itemValueTypes);
+                }
             }
             
             if (fMatcherStack.size() > 0) {



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to