You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by ra...@apache.org on 2002/03/04 11:09:07 UTC

cvs commit: xml-xerces/java/src/org/apache/xerces/parsers AbstractDOMParser.java

rahuls      02/03/04 02:09:07

  Modified:    java/src/org/apache/xerces/parsers AbstractDOMParser.java
  Log:
  Use the schemaNormalizedValue from PSVI only when validation attempted is full.
  Patch submitted by Pavani.
  
  Revision  Changes    Path
  1.42      +9 -3      xml-xerces/java/src/org/apache/xerces/parsers/AbstractDOMParser.java
  
  Index: AbstractDOMParser.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/parsers/AbstractDOMParser.java,v
  retrieving revision 1.41
  retrieving revision 1.42
  diff -u -r1.41 -r1.42
  --- AbstractDOMParser.java	19 Feb 2002 11:27:32 -0000	1.41
  +++ AbstractDOMParser.java	4 Mar 2002 10:09:07 -0000	1.42
  @@ -105,7 +105,7 @@
    * @author Andy Clark, IBM
    * @author Elena Litani, IBM
    *
  - * @version $Id: AbstractDOMParser.java,v 1.41 2002/02/19 11:27:32 rahuls Exp $
  + * @version $Id: AbstractDOMParser.java,v 1.42 2002/03/04 10:09:07 rahuls Exp $
    */
   public abstract class AbstractDOMParser
       extends AbstractXMLDocumentParser {
  @@ -714,9 +714,12 @@
                   Attr attr = createAttrNode(fAttrQName);
   
                   String attrValue = attributes.getValue(i);
  +                // REVISIT: Should this happen here ? Why not in schema validator?
                   if (fNormalizeData) {
                       AttributePSVI attrPSVI = (AttributePSVI)attributes.getAugmentations(i).getItem(Constants.ATTRIBUTE_PSVI);
  -                    if (attrPSVI != null) {
  +                    // If validation is not attempted, the SchemaNormalizedValue will be null. 
  +                    // We shouldn't take the normalized value in this case.
  +                    if (attrPSVI != null && attrPSVI.getValidationAttempted() == AttributePSVI.FULL_VALIDATION) {
                           attrValue = attrPSVI.getSchemaNormalizedValue();
                       }
   
  @@ -749,9 +752,12 @@
               int attrCount = attributes.getLength();
               for (int i = 0; i < attrCount; i++) {
                   String attrValue = attributes.getValue(i);
  +                // REVISIT: Should this happen here ? Why not in schema validator?
                   if (fNormalizeData) {
                       AttributePSVI attrPSVI = (AttributePSVI)attributes.getAugmentations(i).getItem(Constants.ATTRIBUTE_PSVI);
  -                    if (attrPSVI != null) {
  +                    // If validation is not attempted, the SchemaNormalizedValue will be null. 
  +                    // We shouldn't take the normalized value in this case.
  +                    if (attrPSVI != null && attrPSVI.getValidationAttempted() == AttributePSVI.FULL_VALIDATION) {
                           attrValue = attrPSVI.getSchemaNormalizedValue();
                       }
   
  
  
  

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