From 294cbca511657df4b7afa49550b855d9c4a6b1f6 Mon Sep 17 00:00:00 2001 From: Daniel Veillard Date: Fri, 3 Dec 1999 13:19:09 +0000 Subject: [PATCH] Closing #3908 and #3937 and a memory leak in the SAX API added SAX.h mostly useful for the doc generation Regenerated all the docs, Daniel --- ChangeLog | 9 + Makefile.am | 5 +- SAX.c | 1 + SAX.h | 107 +++ doc/gnome-xml.sgml | 20 +- doc/html/book1.html | 20 + doc/html/gnome-xml-entities.html | 84 ++- doc/html/gnome-xml-htmlparser.html | 44 +- doc/html/gnome-xml-htmltree.html | 20 +- doc/html/gnome-xml-nanohttp.html | 32 +- doc/html/gnome-xml-parser.html | 10 +- doc/html/gnome-xml-parserinternals.html | 220 +++--- doc/html/gnome-xml-tree.html | 916 ++++++++++++++++++------ doc/html/gnome-xml-valid.html | 122 ++-- doc/html/gnome-xml-xml-error.html | 22 +- doc/html/gnome-xml-xmlmemory.html | 48 +- doc/html/gnome-xml-xpath.html | 38 +- doc/html/index.sgml | 78 +- include/libxml/SAX.h | 107 +++ parser.c | 10 +- 20 files changed, 1392 insertions(+), 521 deletions(-) create mode 100644 SAX.h create mode 100644 include/libxml/SAX.h diff --git a/ChangeLog b/ChangeLog index 3670ea7a..f3ec0f51 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +Fri Dec 3 13:46:32 CET 1999 Daniel Veillard + + * SAX.h, SAX.c, makefile.am: added SAX.h mostly useful for the + doc generation + * parser.c: fixed bugs #3908 and #3937 and a memory leak + in the SAX API + * doc/*: rebuilt the doc making sure everything appears in the + HTML files + Wed Dec 1 10:27:47 CET 1999 Daniel Veillard * tree.[ch] HTMLtree.c, debugXML.c, configure.in, xml-config.in: diff --git a/Makefile.am b/Makefile.am index cb88ae8a..54d62280 100644 --- a/Makefile.am +++ b/Makefile.am @@ -32,14 +32,15 @@ libxml_la_SOURCES = \ xmlincdir = $(includedir)/gnome-xml xmlinc_HEADERS = \ + SAX.h \ entities.h \ encoding.h \ parser.h \ + parserInternals.h \ + xml-error.h \ HTMLparser.h \ HTMLtree.h \ - parserInternals.h \ debugXML.h \ - xml-error.h \ tree.h \ xpath.h \ xmlIO.h \ diff --git a/SAX.c b/SAX.c index cfc23f1a..527efc0e 100644 --- a/SAX.c +++ b/SAX.c @@ -17,6 +17,7 @@ #include "entities.h" #include "xml-error.h" #include "debugXML.h" +#include "SAX.h" /* #define DEBUG_SAX */ /* #define DEBUG_SAX_TREE */ diff --git a/SAX.h b/SAX.h new file mode 100644 index 00000000..8d9f3c73 --- /dev/null +++ b/SAX.h @@ -0,0 +1,107 @@ +/* + * SAX.c : Default SAX handler interfaces. + * + * See Copyright for the status of this software. + * + * Daniel Veillard + */ + + +#include +#include +#include "parser.h" + +#ifndef __XML_SAX_H__ +#define __XML_SAX_H__ +const xmlChar * getPublicId (void *ctx); +const xmlChar * getSystemId (void *ctx); +void setDocumentLocator (void *ctx, + xmlSAXLocatorPtr loc); + +int getLineNumber (void *ctx); +int getColumnNumber (void *ctx); + +int isStandalone (void *ctx); +int hasInternalSubset (void *ctx); +int hasExternalSubset (void *ctx); + +void internalSubset (void *ctx, + const xmlChar *name, + const xmlChar *ExternalID, + const xmlChar *SystemID); +xmlEntityPtr getEntity (void *ctx, + const xmlChar *name); +xmlEntityPtr getParameterEntity (void *ctx, + const xmlChar *name); +xmlParserInputPtr resolveEntity (void *ctx, + const xmlChar *publicId, + const xmlChar *systemId); + +void entityDecl (void *ctx, + const xmlChar *name, + int type, + const xmlChar *publicId, + const xmlChar *systemId, + xmlChar *content); +void attributeDecl (void *ctx, + const xmlChar *elem, + const xmlChar *name, + int type, + int def, + const xmlChar *defaultValue, + xmlEnumerationPtr tree); +void elementDecl (void *ctx, + const xmlChar *name, + int type, + xmlElementContentPtr content); +void notationDecl (void *ctx, + const xmlChar *name, + const xmlChar *publicId, + const xmlChar *systemId); +void unparsedEntityDecl (void *ctx, + const xmlChar *name, + const xmlChar *publicId, + const xmlChar *systemId, + const xmlChar *notationName); + +void startDocument (void *ctx); +void endDocument (void *ctx); +void attribute (void *ctx, + const xmlChar *fullname, + const xmlChar *value); +void startElement (void *ctx, + const xmlChar *fullname, + const xmlChar **atts); +void endElement (void *ctx, + const xmlChar *name); +void reference (void *ctx, + const xmlChar *name); +void characters (void *ctx, + const xmlChar *ch, + int len); +void ignorableWhitespace (void *ctx, + const xmlChar *ch, + int len); +void processingInstruction (void *ctx, + const xmlChar *target, + const xmlChar *data); +void globalNamespace (void *ctx, + const xmlChar *href, + const xmlChar *prefix); +void setNamespace (void *ctx, + const xmlChar *name); +xmlNsPtr getNamespace (void *ctx); +int checkNamespace (void *ctx, + xmlChar *namespace); +void namespaceDecl (void *ctx, + const xmlChar *href, + const xmlChar *prefix); +void comment (void *ctx, + const xmlChar *value); +void cdataBlock (void *ctx, + const xmlChar *value, + int len); + +void xmlDefaultSAXHandlerInit (void); +void htmlDefaultSAXHandlerInit (void); +#endif /* __XML_SAX_H__ */ diff --git a/doc/gnome-xml.sgml b/doc/gnome-xml.sgml index abcae9bd..018ce710 100644 --- a/doc/gnome-xml.sgml +++ b/doc/gnome-xml.sgml @@ -1,16 +1,19 @@ - - - - - + + + + + - + + + + + ]> @@ -79,7 +82,10 @@ &HTMLtree; &xpath; &nanohttp; + &xmlIO; &parserInternals; + &encoding; + &debugXML; &xmlmemory; diff --git a/doc/html/book1.html b/doc/html/book1.html index 1e128742..b3e5fdd4 100644 --- a/doc/html/book1.html +++ b/doc/html/book1.html @@ -118,6 +118,11 @@ HREF="gnome-xml-parser.html" > —
SAX
tree
xmlIO
parserInternals
encoding
debugXML
xmlmemory

Name

Synopsis

xmlEntitiesTablePtr table); table); +void xmlCleanupPredefinedEntities (void);

Description

Details






















xmlCleanupPredefinedEntities ()

void        xmlCleanupPredefinedEntities    (void);

Cleanup up the predefined entities table.