Commit Graph

908 Commits

Author SHA1 Message Date
Fred L. Drake, Jr.
f85926afd5 Added regression tests for SF bug #673791. 2003-01-25 06:55:25 +00:00
Fred L. Drake, Jr.
a04f107e61 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.
2003-01-25 06:53:05 +00:00
Fred L. Drake, Jr.
7fd8181a4a Thread the proper file name and line number to make determination of
which test is failing easier.
2003-01-25 04:57:44 +00:00
Fred L. Drake, Jr.
e39c6e2237 Last minute updates. 2003-01-24 18:43:20 +00:00
Fred L. Drake, Jr.
de5e0f55c8 Regenerate from xmlwf.sgml revision 1.4. 2003-01-24 18:34:59 +00:00
Fred L. Drake, Jr.
ed1d59f6b1 Explain "--" properly. 2003-01-24 18:34:03 +00:00
Fred L. Drake, Jr.
d976fa61a6 Add a clobber target. "clean" should really be less destructive, but
libtool is really a thorn with regard to this.
2003-01-24 16:21:46 +00:00
Fred L. Drake, Jr.
da325003e9 Regenerate from xmlwf.sgml. 2003-01-24 15:26:06 +00:00
Fred L. Drake, Jr.
9934dba58a - document unexpected memory use reporting when memory mapped files
are used; closes SF bug #632146
- minor changes to wording in a few places
- remove cute comment on one of the linked sites
- added more markup
2003-01-24 15:23:33 +00:00
Fred L. Drake, Jr.
5d55922080 - _expect_failure(): Use _fail_unless() instead of fail() to allow
reporting of the right line number
- add test that demonstrates the default namespace can be reset
  without a syntax error
2003-01-24 05:39:16 +00:00
Fred L. Drake, Jr.
4273b16711 Add a test that makes sure xmlns:prefix="" is allowed when namespace
processing is not enabled.
2003-01-24 05:09:42 +00:00
Karl Waclawek
d9d497177a Applied patch #673791. 2003-01-24 05:01:45 +00:00
Karl Waclawek
dd2ecd7fa8 For the start of element and end of element events, it is possible that
the default handler does not get called even when no element handlers
are called, because storeAtts() may trigger the startNamespaceDeclHandler
where the application has a chance to clear the element handlers.

This patch fixes this with one issue still open, which applies to empty elements only:
When the endElement handler is called, but not the startElementHandler,
then the default handler is not called, which causes attributes to not
be reported at all. The other alternative would be to call the default handler,
but then the element would be reported twice.
2003-01-22 14:52:20 +00:00
Karl Waclawek
c56f444ab0 Prevent storeAtts() from being called twice for an empty element when
the endElementHandler is set, but not the startElementHandler.
2003-01-22 14:26:07 +00:00
Fred L. Drake, Jr.
d6df5f356b - update information on the GOBO Expat interface
- fix some well-formedness errors
- add some missing punctuation
2003-01-22 03:19:22 +00:00
Fred L. Drake, Jr.
164b04825b Added notes that the namespace decl handlers are only called when the
start element handler is set.  See SF bug #620343.
2003-01-21 16:09:31 +00:00
Fred L. Drake, Jr.
b2e6a40fbb Fix test case regarding reporting of undefined entities and
non-validating parsers (see section 5.1 of the XML 1.0 specification).
2003-01-21 05:41:24 +00:00
Fred L. Drake, Jr.
31c109284d Added link to a discussion of another way to handle stateful
callbacks, using Expat as an example library to work with.
Closes SF bug #658080.
2003-01-21 05:20:51 +00:00
Fred L. Drake, Jr.
3d6f978672 Documented XML_SetExternalEntityRefHandlerArg(), including API
foolishness noted in SF bug #644344.
Closes SF bug #644344.
2003-01-21 05:00:51 +00:00
Fred L. Drake, Jr.
a4e0597458 - try to be smarter about the options to cp
- use indentation consistently
- one we've built the tarball successfully, clean up the 2nd temp dir
2003-01-20 15:25:20 +00:00
Fred L. Drake, Jr.
f6b3146642 Update the list of project files for the Borland tools. 2003-01-20 15:00:57 +00:00
Fred L. Drake, Jr.
37be32f63f Minor cleanups and conformance with current recommended usage. 2003-01-20 14:49:44 +00:00
Karl Waclawek
8850c38338 Correct the version some APIs were added in. 2003-01-17 00:49:12 +00:00
Fred L. Drake, Jr.
e629e75f89 Added notes about the new APIs. 2003-01-16 23:24:38 +00:00
Fred L. Drake, Jr.
7410374a90 Correct the version some APIs were added in. 2003-01-16 23:22:56 +00:00
Fred L. Drake, Jr.
bbfa307c6b Add documentation for XML_FreeContentModel(), XML_MemMalloc(),
XML_MemRealloc(), and XML_MemFree().
2003-01-16 23:15:19 +00:00
Karl Waclawek
131116f1ec Change to support Windows 2000 behaviour by default 2003-01-16 22:07:26 +00:00
Karl Waclawek
0c7508bf81 Updating Borland BCB5 DEF files for patch re. bug/feature request #651754 2003-01-16 22:05:46 +00:00
Karl Waclawek
f19a5291ec Patch for bug/feature request #651754.
Implemented with two API additions:
1) For element declaration handler support:
  XML_FreeContentModel
2) Exposing Expat's memory allocation functions:
  XML_MemMalloc
  XML_MemRealloc
  XML_MemFree
2003-01-16 22:03:42 +00:00
Karl Waclawek
3bfb49007e Applied patch for bug #667511 supplied by Jeremy Kloth. 2003-01-15 00:51:15 +00:00
Fred L. Drake, Jr.
77c2d3e0ae Update comments to refer to XML_STATUS_OK, XML_STATUS_ERROR, and NULL
as appropriate.
2002-12-31 17:53:21 +00:00
Fred L. Drake, Jr.
eb280e7260 Change the API to return XML_Status values where possible.
Existing client code is 100% compatible.
2002-12-30 20:12:52 +00:00
Fred L. Drake, Jr.
f379e9315f When returning a status value through the public API, use
XML_STATUS_OK / XML_STATUS_ERROR.  Internal status returns are not
affected.
2002-12-30 20:02:28 +00:00
Fred L. Drake, Jr.
7556575221 Clarify the documentation for the position-reporting functions
somewhat (see SF bug #653180).

Use XML_STATUS_ERROR and XML_STATUS_OK instead of 0, 1, and "non-zero"
in several places.
2002-12-30 19:50:06 +00:00
Fred L. Drake, Jr.
42dc47850e Oops, there were more regression tests for SF bug #653180; add these
as well.
2002-12-30 19:33:21 +00:00
Fred L. Drake, Jr.
d9b09dd45e Added regression tests from bug; Karl already fixed the bug itself.
Closes SF bug #653180.

Removed test that failed to tickle the bug, but should have.
2002-12-30 19:20:39 +00:00
Karl Waclawek
e6802bb514 Fix for bug/feature request #653180. 2002-12-16 04:02:02 +00:00
Karl Waclawek
ed47baa513 Applied patch for bug #653449. 2002-12-14 03:12:18 +00:00
Patrick McConnell
e541a7f743 Segregate obj files for utf8 and unicode build versions 2002-12-09 17:23:23 +00:00
Karl Waclawek
f162999a26 Annotated MS VC++ DEF files. 2002-12-08 14:35:34 +00:00
Patrick McConnell
0703fecbdc Moving the Borland module definition files to the bcb5 dir, correcting
an error in the LIBRARY entry in the def files, calling the new def
files in the proj and make files.
2002-12-08 03:37:41 +00:00
Patrick McConnell
2fd9d5e8d6 Moving the Borland .def files to the BCB5 directory and correcting an
error in the LIBRARY entry
2002-12-08 03:16:38 +00:00
Karl Waclawek
eddeed59f9 Clarified runtime linking issues. 2002-12-07 14:18:50 +00:00
Patrick McConnell
5d1952a9f9 Revision of Borland proj and make files to fix dos carriage return
problem. Files remain identical to initial release for building static
and wide-char versions of libs, as well as the dll's.
2002-12-07 08:59:43 +00:00
Patrick McConnell
7c008489b1 libexpat dll def files for borland initial release 2002-12-07 08:25:58 +00:00
Patrick McConnell
f4f555f8a5 Removed dos linefeeds, test this before doing rest of bcb5 2002-12-06 22:29:14 +00:00
Patrick McConnell
d9e3766cd4 *** empty log message *** 2002-12-06 21:52:38 +00:00
Patrick McConnell
038f5f0f6e *** empty log message *** 2002-12-06 21:36:08 +00:00
Fred L. Drake, Jr.
e2dd730af2 Added a link to SCEW. 2002-12-04 06:52:36 +00:00
Karl Waclawek
48cb2c35b0 Added additional patch for bug #644334. Includes workaround for
bad API typedef of externalEntityRefHandler.
2002-11-27 17:11:32 +00:00