diff options
author | Daniel Veillard <veillard@src.gnome.org> | 2000-01-03 11:08:02 +0000 |
---|---|---|
committer | Daniel Veillard <veillard@src.gnome.org> | 2000-01-03 11:08:02 +0000 |
commit | 686d6b6ab1b9345c1fbeed23696d5f74153a24b2 (patch) | |
tree | 21e393da4a6ec9d80e27222996c2705eb38bce07 /SAX.c | |
parent | 5e5c62351f88ed07e3a67cf3735bf3ae290eb03d (diff) | |
download | libxml2-686d6b6ab1b9345c1fbeed23696d5f74153a24b2.tar.gz |
- added xmlRemoveProp
- changed the way Windows socket stuff get included
- removed an indetermination xmLDecl/PI(xml...)
- xmlNewNs wasn't checking for double definition
- fixed a problem with dist-hook duplicates
- fixed the loading of external entities APIs, now xmlLoadExternalEntity()
is used everywhere
- now the xhtml spec validates with the xhtml DTD.
- error.c: fixed crashes in case of no input stream
- added the xhtml spec and dtds to the validation tests and results
Daniel
Diffstat (limited to 'SAX.c')
-rw-r--r-- | SAX.c | 19 |
1 files changed, 9 insertions, 10 deletions
@@ -22,6 +22,7 @@ #include "entities.h" #include "xml-error.h" #include "debugXML.h" +#include "xmlIO.h" #include "SAX.h" /* #define DEBUG_SAX */ @@ -145,7 +146,7 @@ hasExternalSubset(void *ctx) * internalSubset: * @ctx: the user data (XML parser context) * - * Does this document has an internal subset + * Callback on internal subset declaration. */ void internalSubset(void *ctx, const xmlChar *name, @@ -226,11 +227,11 @@ internalSubset(void *ctx, const xmlChar *name, * @publicId: The public ID of the entity * @systemId: The system ID of the entity * - * Special entity resolver, better left to the parser, it has - * more context than the application layer. - * The default behaviour is to NOT resolve the entities, in that case - * the ENTITY_REF nodes are built in the structure (and the parameter - * values). + * The entity loader, to control the loading of external entities, + * the application can either: + * - override this resolveEntity() callback in the SAX block + * - or better use the xmlSetExternalEntityLoader() function to + * set up it's own entity resolution routine * * Returns the xmlParserInputPtr if inlined or NULL for DOM behaviour. */ @@ -243,10 +244,8 @@ resolveEntity(void *ctx, const xmlChar *publicId, const xmlChar *systemId) fprintf(stderr, "SAX.resolveEntity(%s, %s)\n", publicId, systemId); #endif - if (systemId != NULL) { - return(xmlNewInputFromFile(ctxt, (char *) systemId)); - } - return(NULL); + return(xmlLoadExternalEntity((const char *) systemId, + (const char *) publicId, ctxt)); } /** |