added regression test for SF bug #824420:
in non-namespace mode, Expat reported the use of an unbound namespace
when encountering an element that looks like it has a namespace prefix
(were namespaces enabled) and there's a definition for that prefix in
the DTD
Started a new page with some notes about what's changing in Expat 3.
Largely a placeholder at this point, but this can be used to tell the
community about what Expat 3 will "look like."
Make it possible to avoid the import of expat_config.h. This makes it
easier to compile Expat without the autoconf support.
This closes SF patch #458907.
- reorganize by the components that need what we're checking for
- remove the check for memcmp(); we didn't use the result of the check
(though we do use memcmp())
Remove the __attribute__((dllimport)) and __attribute__((dllexport))
declarations; these are needed only on an obscure platform (Windows NT
on PowerPC using GCC), and were never in previous releases of Expat.
They caused way too many spurious warnings on several platforms where
they aren't actually needed but should be ignored silently.
Removing these cannot break working code.
Deal with issue discussed in SF patch #820946: Expat doesn't handle
the use of modified default calling conventions in client code.
To deal with this issue and generally clean up the mass of macros
being used to support bits of the machinery, two new macros are being
added:
- XMLCALL, which expands to whatever is needed to nail down the
calling convention for all calls across the library boundary. This
must match the convention used for the system's malloc()
implementation.
- XMLIMPORT, defined to be whatever magic is needed to mark an entry
point as imported from a dynamically loaded module (.dll, .so, .sl,
whatever).
These macros are used to define the XMLPARSEAPI macro already being
used to define the API entry points. In addition, XMLCALL is used to
define the types of callback functions, and all example code uses this
explicitly in both the distributed applications and the documentation.
* lib/internal.h:
(FASTCALL, PTRFASTCALL): only define these macros for the GNU C compiler
on i386 platforms. apprently, they do not work well on PPC ports.
Greg Stein [Wed, 18 Jun 2003 01:11:45 +0000 (01:11 +0000)]
Patch submitted by Joe Orton <joe@manyfish.co.uk> with additional
modifications by Greg Stein (comments and text changes).
* buildconf.sh: to deal with crazy/custom libtool installations, allow
the developer/package to specify the libtool.m4 location by
setting the LIBTOOL_M4 environment variable. If that isn't set,
then we use our previous method of trying to derive its location.
Be more defensive: only enable the *CALL macros when using GCC on
Linux, since we know the current definitions work there and have a
positive effect.
This closes SF bug #692878.
- be more specific about the errors we expect to see reported
- change the name of make_basic_suite() to make_suite(), since there's
only one make_*_suite() function
Karl's latest patch for SF issue #673791:
Call storeAtts() for all element start tags; this is necessary to
ensure attribute defaults are properly processed for all elements
(needed to do proper namespace checking, at the very least), and that
tag names are properly cooked when there's an end-element-handler but
no start-element-handler.
This causes the new tests to pass, and closes the SF tracker issue.
Karl's fix for SF bug #673791:
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.