neilg 2003/11/27 21:15:07 Modified: c/src/xercesc/parsers AbstractDOMParser.cpp AbstractDOMParser.hpp Log: in preparation for stateless DOMTypeInfo for elements Revision Changes Path 1.57 +15 -3 xml-xerces/c/src/xercesc/parsers/AbstractDOMParser.cpp Index: AbstractDOMParser.cpp =================================================================== RCS file: /home/cvs/xml-xerces/c/src/xercesc/parsers/AbstractDOMParser.cpp,v retrieving revision 1.56 retrieving revision 1.57 diff -u -r1.56 -r1.57 --- AbstractDOMParser.cpp 24 Nov 2003 05:14:18 -0000 1.56 +++ AbstractDOMParser.cpp 28 Nov 2003 05:15:07 -0000 1.57 @@ -731,13 +731,25 @@ fCurrentNode = fCurrentParent; fCurrentParent = fNodeStack->pop(); - //validation is performed after the startElement event so we have to associate the info here + // REVISIT: delete when elementTypeInfo callback + // is implemented ((DOMElementImpl *)(fCurrentNode))->setTypeInfo(elemDecl.getDOMTypeInfoName(), elemDecl.getDOMTypeInfoUri()); - - // If we've hit the end of content, clear the flag if (fNodeStack->empty()) fWithinElement = false; +} + +void AbstractDOMParser::elementTypeInfo( const XMLCh * const typeName + , const XMLCh *const typeURI) +{ + /**** REVISIT: enable when callback is implemented in scanners + // very tightly coupled to endElement(). The state of the + // object must not have changed between these calls! + + //validation is performed after the startElement event so we have to associate the info here + ((DOMElementImpl *)(fCurrentNode))->setTypeInfo(typeName, typeURI); + *******/ + } 1.25 +26 -1 xml-xerces/c/src/xercesc/parsers/AbstractDOMParser.hpp Index: AbstractDOMParser.hpp =================================================================== RCS file: /home/cvs/xml-xerces/c/src/xercesc/parsers/AbstractDOMParser.hpp,v retrieving revision 1.24 retrieving revision 1.25 diff -u -r1.24 -r1.25 --- AbstractDOMParser.hpp 6 Nov 2003 15:30:07 -0000 1.24 +++ AbstractDOMParser.hpp 28 Nov 2003 05:15:07 -0000 1.25 @@ -1171,6 +1171,31 @@ , const XMLCh* const standaloneStr , const XMLCh* const actualEncStr ); + + /** Receive notification of the name and namespace of the type that validated + * the element corresponding to the most recent endElement event. + * This event will be fired immediately after the + * endElement() event that signifies the end of the element + * to which it applies; no other events will intervene. + * This method is <emEXPERIMENTAL</em> and may change, disappear + * or become pure virtual at any time. + * + * This corresponds to a part of the information required by DOM Core + * level 3's TypeInfo interface. + * + * @param typeName local name of the type that actually validated + * the content of the element corresponding to the + * most recent endElement() callback + * @param typeURI namespace of the type that actually validated + * the content of the element corresponding to the + * most recent endElement() callback + * @experimental + */ + virtual void elementTypeInfo + ( + const XMLCh* const typeName + , const XMLCh* const typeURI + ); //@}
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]