a04f107e61
Error with xmlns:prefix= with namespace processing enabled. It seems that storeAtts() has the following properties: - when called with tagNamePtr = NULL and bindingsPtr = NULL, it does not process attributes incl. namespace declarations - when called with all arguments non-NULL it processes attributes (incl. default attributes) and namespace declarations We also have these requirements: A) for start of element event: 1) if we have a startElementHandler: we need to process at least default attributes, so we must call storeAtts with all arguments non-NULL 2) if we have no startElementHandler, but we have attributes: we need to process namespace declarations, so we must call storeAtts with all arguments non-NULL 3) if we have no startElementHandler and no attributes: we need to store the name (for the end element event, where the names are compared) and call only the default handler Note: Storing the name is a pre-requisiste for calling storeAtts with all arguments non-NULL. So there really is no place for calling storeAtts with tagNamePtr = NULL and bindingsPtr = NULL. B) for empty element event: 1) if we have a startElementHandler: we need to process at least default attributes, so we must call storeAtts with all arguments non-NULL 2) if we have no startElementHandler, but we have attributes: we need to process namespace declarations, so we must call storeAtts with all arguments non-NULL 3) if we have no startElementHandler and no attributes, but we have an endElementHandler: we need to store the name for calling the handler, but we need not process any attributes (default or not) 4) if we have no start- or endElementHandler, and no attributes: we need to call only the default handler Given that storeAtts will now always be called with all arguments non-NULL we could remove a few internal checks in storeAtts, if that improves efficiency. Not sure if that is worth it. This patch should therefore fix the problem of namespace declarations not being processed when no startElementHandler is set, that is, it will fix Jeremy's NS processing patch. |
||
---|---|---|
.. | ||
.gitignore | ||
ascii.h | ||
asciitab.h | ||
expat_static.dsp | ||
expat.dsp | ||
expat.h | ||
expatw_static.dsp | ||
expatw.dsp | ||
iasciitab.h | ||
internal.h | ||
latin1tab.h | ||
libexpat.def | ||
libexpatw.def | ||
macconfig.h | ||
Makefile.MPW | ||
nametab.h | ||
utf8tab.h | ||
winconfig.h | ||
xmlparse.c | ||
xmlrole.c | ||
xmlrole.h | ||
xmltok_impl.c | ||
xmltok_impl.h | ||
xmltok_ns.c | ||
xmltok.c | ||
xmltok.h |