neilg 2003/12/29 21:58:57 Modified: c/src/xercesc/framework/psvi PSVIAttribute.cpp PSVIAttribute.hpp Log: allow schema normalized values to be associated with a PSVIAttribute after it is reset Revision Changes Path 1.8 +16 -6 xml-xerces/c/src/xercesc/framework/psvi/PSVIAttribute.cpp Index: PSVIAttribute.cpp =================================================================== RCS file: /home/cvs/xml-xerces/c/src/xercesc/framework/psvi/PSVIAttribute.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- PSVIAttribute.cpp 2 Dec 2003 17:37:03 -0000 1.7 +++ PSVIAttribute.cpp 30 Dec 2003 05:58:56 -0000 1.8 @@ -56,6 +56,9 @@ /* * $Log$ + * Revision 1.8 2003/12/30 05:58:56 neilg + * allow schema normalized values to be associated with a PSVIAttribute after it is reset + * * Revision 1.7 2003/12/02 17:37:03 neilg * fix compilation problem * @@ -93,7 +96,6 @@ const XMLCh * const valContext , PSVIItem::VALIDITY_STATE state , PSVIItem::ASSESSMENT_TYPE assessmentType - , const XMLCh * const normalizedValue , XSSimpleTypeDefinition * validatingType , XSSimpleTypeDefinition * memberType , const XMLCh * const defaultValue @@ -105,17 +107,25 @@ fValidationContext = valContext; fValidityState = state; fAssessmentType = assessmentType; - fNormalizedValue = normalizedValue; fType = validatingType; fMemberType = memberType; fDefaultValue = defaultValue; fIsSpecified = isSpecified; fMemoryManager->deallocate((void *)fCanonicalValue); - if(normalizedValue && dv && fValidityState == PSVIItem::VALIDITY_VALID) - fCanonicalValue = (XMLCh *)dv->getCanonicalRepresentation(normalizedValue, fMemoryManager); - else - fCanonicalValue = 0; + fCanonicalValue = 0; + fNormalizedValue = 0; fAttributeDecl = attrDecl; + fDV = dv; +} + +void PSVIAttribute::setValue(const XMLCh * const normalizedValue) +{ + if(normalizedValue) + { + fNormalizedValue = normalizedValue; + if(fDV && fValidityState == PSVIItem::VALIDITY_VALID) + fCanonicalValue = (XMLCh *)fDV->getCanonicalRepresentation(normalizedValue, fMemoryManager); + } } XERCES_CPP_NAMESPACE_END 1.6 +13 -1 xml-xerces/c/src/xercesc/framework/psvi/PSVIAttribute.hpp Index: PSVIAttribute.hpp =================================================================== RCS file: /home/cvs/xml-xerces/c/src/xercesc/framework/psvi/PSVIAttribute.hpp,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- PSVIAttribute.hpp 28 Nov 2003 20:20:54 -0000 1.5 +++ PSVIAttribute.hpp 30 Dec 2003 05:58:56 -0000 1.6 @@ -56,6 +56,9 @@ /* * $Log$ + * Revision 1.6 2003/12/30 05:58:56 neilg + * allow schema normalized values to be associated with a PSVIAttribute after it is reset + * * Revision 1.5 2003/11/28 20:20:54 neilg * make use of canonical representation in PSVIAttribute implementation * @@ -161,7 +164,6 @@ const XMLCh * const valContext , PSVIItem::VALIDITY_STATE state , PSVIItem::ASSESSMENT_TYPE assessmentType - , const XMLCh * const normalizedValue , XSSimpleTypeDefinition * validatingType , XSSimpleTypeDefinition * memberType , const XMLCh * const defaultValue @@ -171,6 +173,13 @@ ); /** + * set the schema normalized value (and + * implicitly the canonical value) of this object; intended to be used + * by the implementation. + */ + void setValue(const XMLCh * const normalizedValue); + + /** * set VALIDITY_STATE to specified value; intended to be * called by implementation. */ @@ -192,7 +201,10 @@ // ----------------------------------------------------------------------- // fAttributeDecl // attribute declaration component that validated this attribute + // fDV + // implementation-specific datatype validator used to validate this attribute XSAttributeDeclaration * fAttributeDecl; + DatatypeValidator * fDV; }; inline PSVIAttribute::~PSVIAttribute() {
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]