elena       2002/08/26 11:31:37

  Modified:    java/src/org/apache/xerces/impl/xs XMLSchemaValidator.java
  Log:
  The XML Schema specification "requires as a precondition for assessment
  an information set as defined in [XML-Infoset]" (Appendix D). According
  to the XML Infoset the infoset items contributing to the [character
  information item] are: characters in the document, whether literally, as
  a character reference, or within a CDATA section, or within Entity
  Reference.
  
  Given that all characters (in CDATA Section or Entity
  reference) must be part of schema assessment process. That may result in 
"corruption" of
  data inside entity or cdata section, i.e entity value could be normalized.
  To avoid it users should turn off 
"http://apache.org/xml/features/validation/schema/normalized-value"; feature.
  
  Revision  Changes    Path
  1.87      +4 -3      
xml-xerces/java/src/org/apache/xerces/impl/xs/XMLSchemaValidator.java
  
  Index: XMLSchemaValidator.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xerces/java/src/org/apache/xerces/impl/xs/XMLSchemaValidator.java,v
  retrieving revision 1.86
  retrieving revision 1.87
  diff -u -r1.86 -r1.87
  --- XMLSchemaValidator.java   26 Aug 2002 14:46:47 -0000      1.86
  +++ XMLSchemaValidator.java   26 Aug 2002 18:31:37 -0000      1.87
  @@ -818,7 +818,7 @@
               fCurrentPSVI.reset();
           }
   
  -        if (fNormalizeData && !fEntityRef && !fInCDATA) {
  +        if (fNormalizeData) {
               // if whitespace == -1 skip normalization, because it is a complexType
               if (fWhiteSpace != -1 && fWhiteSpace != XSSimpleType.WS_PRESERVE) {
                   // normalize data
  @@ -1507,7 +1507,8 @@
   
           // find out if type is union, what is whitespace,
           // determine if there is a need to do normalization
  -        if (fNormalizeData && !fEntityRef && !fInCDATA) {
  +        // Note: data in EntityRef and CDATA is normalized as well
  +        if (fNormalizeData) {
               // if whitespace == -1 skip normalization, because it is a complexType
               if (fWhiteSpace != -1 && !fUnionType && fWhiteSpace != 
XSSimpleType.WS_PRESERVE) {
                   // normalize data
  
  
  

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

Reply via email to