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/03/31 09:49:13 UTC

svn commit: r929420 - /xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/XMLAssertPsychopathImpl.java

Author: mukulg
Date: Wed Mar 31 07:49:13 2010
New Revision: 929420

URL: http://svn.apache.org/viewvc?rev=929420&view=rev
Log:
improving typed value support, of xpath2 context variable, $value during assertions evaluation.

Modified:
    xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/XMLAssertPsychopathImpl.java

Modified: xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/XMLAssertPsychopathImpl.java
URL: http://svn.apache.org/viewvc/xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/XMLAssertPsychopathImpl.java?rev=929420&r1=929419&r2=929420&view=diff
==============================================================================
--- xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/XMLAssertPsychopathImpl.java (original)
+++ xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/XMLAssertPsychopathImpl.java Wed Mar 31 07:49:13 2010
@@ -33,6 +33,7 @@ import org.apache.xerces.xni.XMLAttribut
 import org.apache.xerces.xni.XMLString;
 import org.apache.xerces.xni.parser.XMLAssertAdapter;
 import org.apache.xerces.xs.ElementPSVI;
+import org.apache.xerces.xs.XSComplexTypeDefinition;
 import org.apache.xerces.xs.XSConstants;
 import org.apache.xerces.xs.XSModel;
 import org.apache.xerces.xs.XSObjectList;
@@ -365,9 +366,18 @@ public class XMLAssertPsychopathImpl ext
           // is "simple type" value of an element
           PSVIElementNSImpl currentAssertPSVINode = (PSVIElementNSImpl)
                                                  currentAssertDomNode;
-       
-          xsdTypeName = getXSDtypeOf$Value(currentAssertPSVINode.
-                                               getTypeDefinition()); 
+          XSTypeDefinition typeDef = currentAssertPSVINode.getTypeDefinition();
+          if (typeDef instanceof XSComplexTypeDefinition) {
+             XSComplexTypeDefinition cmplxTypeDef = (XSComplexTypeDefinition)
+                                                                       typeDef;
+             if (cmplxTypeDef.getSimpleType() != null) {
+                xsdTypeName = getXSDtypeOf$Value(cmplxTypeDef.getSimpleType());   
+             }
+          }
+          else {
+             xsdTypeName = getXSDtypeOf$Value(currentAssertPSVINode.
+                                               getTypeDefinition());
+          }
         }
         
         Object psychoPathType = abstrPsychopathImpl.getPsychoPathTypeForXSDType



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