Author: mukulg
Date: Fri Sep 17 10:57:40 2010
New Revision: 998066

URL: http://svn.apache.org/viewvc?rev=998066&view=rev
Log:
doing a little improvement to schema 1.1 assertions evaluation for following 
use-case (here white-space normalization is needed for computing value of 
context variable $value):

xml:
<x>
  100
  <!-- test -->
</x>

schema:
<xs:element name="x">
   <xs:simpleType>
      <xs:restriction base="xs:integer">
                <xs:assertion test="$value mod 2 = 0" />
          </xs:restriction>
   </xs:simpleType>
</xs:element>

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=998066&r1=998065&r2=998066&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
 Fri Sep 17 10:57:40 2010
@@ -312,7 +312,7 @@ public class XMLAssertPsychopathImpl ext
             }
         }
         
-        String value = textValueContents.toString(); 
+        String value = (textValueContents.toString()).trim(); 
 
         if (textChildCount != effectiveChildCount) {
             // this means that the DOM tree we are inspecting, has



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to