sandygao 2002/09/10 09:59:56 Modified: java/src/org/apache/xerces/impl/xs XMLSchemaValidator.java Log: When the "validation/schema/normalized-value" feature is off, we don't need to augment PSVI for characters() calls, hence don't need to go through the initialization process of the augmentations and PSVI augmentation item. Revision Changes Path 1.90 +19 -13 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.89 retrieving revision 1.90 diff -u -r1.89 -r1.90 --- XMLSchemaValidator.java 30 Aug 2002 02:53:04 -0000 1.89 +++ XMLSchemaValidator.java 10 Sep 2002 16:59:56 -0000 1.90 @@ -635,25 +635,31 @@ public void characters(XMLString text, Augmentations augs) throws XNIException { boolean emptyAug = false; - if (augs == null) { - emptyAug = true; - augs = fAugmentations; - augs.clear(); - } - // get PSVI object - fCurrentPSVI = (ElementPSVImpl)augs.getItem(Constants.ELEMENT_PSVI); - if (fCurrentPSVI == null) { - fCurrentPSVI = fElemPSVI; - augs.putItem(Constants.ELEMENT_PSVI, fCurrentPSVI); + + if (fNormalizeData) { + if (augs == null) { + emptyAug = true; + augs = fAugmentations; + augs.clear(); + } + // get PSVI object + fCurrentPSVI = (ElementPSVImpl)augs.getItem(Constants.ELEMENT_PSVI); + if (fCurrentPSVI == null) { + fCurrentPSVI = fElemPSVI; + augs.putItem(Constants.ELEMENT_PSVI, fCurrentPSVI); + } + else { + fCurrentPSVI.reset(); + } } else { - fCurrentPSVI.reset(); + fCurrentPSVI = fElemPSVI; } handleCharacters(text); // call handlers if (fDocumentHandler != null) { - if (fUnionType) { + if (fNormalizeData && fUnionType) { // for union types we can't normalize data // thus we only need to send augs information if any; // the normalized data for union will be send
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]