You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by mr...@apache.org on 2010/07/19 22:57:15 UTC

svn commit: r965632 - /xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/dv/xs/XSSimpleTypeDecl.java

Author: mrglavas
Date: Mon Jul 19 20:57:15 2010
New Revision: 965632

URL: http://svn.apache.org/viewvc?rev=965632&view=rev
Log:
Fixing a bug. xs:anySimpleType or xs:anyAtomicType do not have any facets, however the schema validator was normalizing white space for these types using the collapse rules. There's still an issue with the XSModel (returning a whitespace facet for xs:anySimpleType / xs:anyAtomicType) but at least the validator has the correct behaviour now.

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

Modified: xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/dv/xs/XSSimpleTypeDecl.java
URL: http://svn.apache.org/viewvc/xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/dv/xs/XSSimpleTypeDecl.java?rev=965632&r1=965631&r2=965632&view=diff
==============================================================================
--- xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/dv/xs/XSSimpleTypeDecl.java (original)
+++ xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/dv/xs/XSSimpleTypeDecl.java Mon Jul 19 20:57:15 2010
@@ -357,9 +357,12 @@ public class XSSimpleTypeDecl implements
         fVariety = VARIETY_ATOMIC;
         fValidationDV = validateDV;
         fFacetsDefined = FACET_WHITESPACE;
-        if (validateDV == DV_STRING) {
+        if (validateDV == DV_ANYSIMPLETYPE ||
+            validateDV == DV_ANYATOMICTYPE ||
+            validateDV == DV_STRING) {
             fWhiteSpace = WS_PRESERVE;
-        } else {
+        } 
+        else {
             fWhiteSpace = WS_COLLAPSE;
             fFixedFacet = FACET_WHITESPACE;
         }



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