[Expat-discuss] (no subject)

Mark Thomson marktt at excite.com
Mon Jun 30 13:37:05 EDT 2003

I have an application which parses XML documents with some attribute values being QNames (prefix:name). I would like to be able to know which URI corresponds to the prefix. I've done this by pushing/popping <prefix, URI> pairs on/off a stack in response to calls to the StartNamespaceDeclHandler/EndNamespaceDeclHandler functions.

 Is it safe to just push the pointers instead of duplicating the prefix and namespace before pushing them on the stack? i.e., does expat guanartee that the pointers passed to StartNamespaceDeclHandler remain accessible until the corresponding EndNamespaceDecHandler call is made? 

It seems logical to assume that expat maintains a stack of <prefix, URI> pairs so that it would be able to pass a URI,sep, local name to XML_StartElementHandler. If this is correct, can anyone tell me which expat source file contains the implementaion of the stack? 

Does expat check whether the URI string is syntactically correct? (I don't want this to be done twice)

Thanks in advance.

Join Excite! - http://www.excite.com
The most personalized portal on the Web!

More information about the Expat-discuss mailing list