Commit 10a2c653 authored by Daniel Veillard's avatar Daniel Veillard

Large commit of changes done while travelling to XML'99

- cleanups on memory use and parsers
- start of Link interfaces HTML and XLink
- rebuild the doc
- released as 1.8.0
Daniel
parent 4a53eca2
Sun Dec 12 13:08:15 CET 1999 Daniel Veillard <Daniel.Veillard@w3.org>
* configure.in, doc/xml.html : bumped to 1.8.0
* xlink.[ch], Makefile.am : added framework for link detection
* parser.h: added nbChars to parser context, needed for cleanup.
* xmlmemory.c: removed a nasty bug when out of mem
* valid.[ch]: adding namespace support for attribute decl
* tester.c: added --debugent option
* debugXML.[ch]: added xmlDebugDumpEntities()
* parser.c: cleanup, avoiding use of CUR_PTR like plague, using
buffers instead, this was really needed, validation was breaking
in strange ways due to that. Added xmlParseStringPEReference()
and other parsing from strings functions. Entities processing
modified again, but PERef are still not handled correcly but
unless you're Eve Maller you won't notice :-)
* HTMLparser.c: large changes toward reliability, and switched to
lowercase internal tags, XHTML is lowercase, so it will help
that output is closer to next version.
* doc/* : regenerated the documentation, it is now hosted at
http://xmlsoft.org/ (same bits I just bought the domain :-)
Fri Dec 3 13:46:32 CET 1999 Daniel Veillard <Daniel.Veillard@w3.org>
* SAX.h, SAX.c, makefile.am: added SAX.h mostly useful for the
......
......@@ -28,7 +28,8 @@ libxml_la_SOURCES = \
xmlIO.c \
xmlmemory.c \
nanohttp.c \
valid.c
valid.c \
xlink.c
xmlincdir = $(includedir)/gnome-xml
xmlinc_HEADERS = \
......@@ -46,7 +47,8 @@ xmlinc_HEADERS = \
xmlIO.h \
xmlmemory.h \
nanohttp.h \
valid.h
valid.h \
xlink.h
DEPS = $(top_builddir)/libxml.la
LDADDS = $(top_builddir)/libxml.la @Z_LIBS@ @M_LIBS@
......
......@@ -10,6 +10,7 @@
#include <stdio.h>
#include <stdlib.h>
#include "parser.h"
#include "xlink.h"
#ifndef __XML_SAX_H__
#define __XML_SAX_H__
......
......@@ -4,8 +4,8 @@ AC_INIT(entities.h)
AM_CONFIG_HEADER(config.h)
LIBXML_MAJOR_VERSION=1
LIBXML_MINOR_VERSION=7
LIBXML_MICRO_VERSION=4
LIBXML_MINOR_VERSION=8
LIBXML_MICRO_VERSION=0
LIBXML_VERSION=$LIBXML_MAJOR_VERSION.$LIBXML_MINOR_VERSION.$LIBXML_MICRO_VERSION
LIBXML_VERSION_INFO=`expr $LIBXML_MAJOR_VERSION + $LIBXML_MINOR_VERSION`:$LIBXML_MICRO_VERSION:$LIBXML_MINOR_VERSION
......
......@@ -280,3 +280,136 @@ void xmlDebugDumpDocument(FILE *output, xmlDocPtr doc) {
if (doc->root != NULL)
xmlDebugDumpNodeList(output, doc->root, 1);
}
void xmlDebugDumpEntities(FILE *output, xmlDocPtr doc) {
int i;
xmlEntityPtr cur;
if (output == NULL) output = stdout;
if (doc == NULL) {
fprintf(output, "DOCUMENT == NULL !\n");
return;
}
switch (doc->type) {
case XML_ELEMENT_NODE:
fprintf(output, "Error, ELEMENT found here ");
break;
case XML_ATTRIBUTE_NODE:
fprintf(output, "Error, ATTRIBUTE found here\n");
break;
case XML_TEXT_NODE:
fprintf(output, "Error, TEXT\n");
break;
case XML_CDATA_SECTION_NODE:
fprintf(output, "Error, CDATA_SECTION\n");
break;
case XML_ENTITY_REF_NODE:
fprintf(output, "Error, ENTITY_REF\n");
break;
case XML_ENTITY_NODE:
fprintf(output, "Error, ENTITY\n");
break;
case XML_PI_NODE:
fprintf(output, "Error, PI\n");
break;
case XML_COMMENT_NODE:
fprintf(output, "Error, COMMENT\n");
break;
case XML_DOCUMENT_NODE:
fprintf(output, "DOCUMENT\n");
break;
case XML_HTML_DOCUMENT_NODE:
fprintf(output, "HTML DOCUMENT\n");
break;
case XML_DOCUMENT_TYPE_NODE:
fprintf(output, "Error, DOCUMENT_TYPE\n");
break;
case XML_DOCUMENT_FRAG_NODE:
fprintf(output, "Error, DOCUMENT_FRAG\n");
break;
case XML_NOTATION_NODE:
fprintf(output, "Error, NOTATION\n");
break;
default:
fprintf(output, "NODE_%d\n", doc->type);
}
if ((doc->intSubset != NULL) && (doc->intSubset->entities != NULL)) {
xmlEntitiesTablePtr table = (xmlEntitiesTablePtr)
doc->intSubset->entities;
fprintf(output, "Entities in internal subset\n");
for (i = 0;i < table->nb_entities;i++) {
cur = &table->table[i];
fprintf(output, "%d : %s : ", i, cur->name);
switch (cur->type) {
case XML_INTERNAL_GENERAL_ENTITY:
fprintf(output, "INTERNAL GENERAL");
break;
case XML_EXTERNAL_GENERAL_PARSED_ENTITY:
fprintf(output, "EXTERNAL PARSED");
break;
case XML_EXTERNAL_GENERAL_UNPARSED_ENTITY:
fprintf(output, "EXTERNAL UNPARSED");
break;
case XML_INTERNAL_PARAMETER_ENTITY:
fprintf(output, "INTERNAL PARAMETER");
break;
case XML_EXTERNAL_PARAMETER_ENTITY:
fprintf(output, "EXTERNAL PARAMETER");
break;
default:
fprintf(output, "UNKNOWN TYPE %d",
cur->type);
}
if (cur->ExternalID != NULL)
fprintf(output, "ID \"%s\"", cur->ExternalID);
if (cur->SystemID != NULL)
fprintf(output, "SYSTEM \"%s\"", cur->SystemID);
if (cur->orig != NULL)
fprintf(output, "\n orig \"%s\"", cur->orig);
if (cur->content != NULL)
fprintf(output, "\n content \"%s\"", cur->content);
fprintf(output, "\n");
}
} else
fprintf(output, "No entities in internal subset\n");
if ((doc->extSubset != NULL) && (doc->extSubset->entities != NULL)) {
xmlEntitiesTablePtr table = (xmlEntitiesTablePtr)
doc->extSubset->entities;
fprintf(output, "Entities in external subset\n");
for (i = 0;i < table->nb_entities;i++) {
cur = &table->table[i];
fprintf(output, "%d : %s : ", i, cur->name);
switch (cur->type) {
case XML_INTERNAL_GENERAL_ENTITY:
fprintf(output, "INTERNAL GENERAL");
break;
case XML_EXTERNAL_GENERAL_PARSED_ENTITY:
fprintf(output, "EXTERNAL PARSED");
break;
case XML_EXTERNAL_GENERAL_UNPARSED_ENTITY:
fprintf(output, "EXTERNAL UNPARSED");
break;
case XML_INTERNAL_PARAMETER_ENTITY:
fprintf(output, "INTERNAL PARAMETER");
break;
case XML_EXTERNAL_PARAMETER_ENTITY:
fprintf(output, "EXTERNAL PARAMETER");
break;
default:
fprintf(output, "UNKNOWN TYPE %d",
cur->type);
}
if (cur->ExternalID != NULL)
fprintf(output, "ID \"%s\"", cur->ExternalID);
if (cur->SystemID != NULL)
fprintf(output, "SYSTEM \"%s\"", cur->SystemID);
if (cur->orig != NULL)
fprintf(output, "\n orig \"%s\"", cur->orig);
if (cur->content != NULL)
fprintf(output, "\n content \"%s\"", cur->content);
fprintf(output, "\n");
}
} else
fprintf(output, "No entities in external subset\n");
}
......@@ -16,4 +16,5 @@ extern void xmlDebugDumpOneNode(FILE *output, xmlNodePtr node, int depth);
extern void xmlDebugDumpNode(FILE *output, xmlNodePtr node, int depth);
extern void xmlDebugDumpNodeList(FILE *output, xmlNodePtr node, int depth);
extern void xmlDebugDumpDocument(FILE *output, xmlDocPtr doc);
extern void xmlDebugDumpEntities(FILE *output, xmlDocPtr doc);
#endif /* __DEBUG_XML__ */
......@@ -115,7 +115,7 @@ SIZE="3"
><DIV
CLASS="REFNAMEDIV"
><A
NAME="AEN5370"
NAME="AEN5438"
></A
><H2
>Name</H2
......@@ -123,7 +123,7 @@ NAME="AEN5370"
><DIV
CLASS="REFSYNOPSISDIV"
><A
NAME="AEN5373"
NAME="AEN5441"
></A
><H2
>Synopsis</H2
......@@ -348,7 +348,7 @@ HREF="gnome-xml-entities.html#XMLCLEANUPPREDEFINEDENTITIES"
><DIV
CLASS="REFSECT1"
><A
NAME="AEN5431"
NAME="AEN5499"
></A
><H2
>Description</H2
......@@ -358,14 +358,14 @@ NAME="AEN5431"
><DIV
CLASS="REFSECT1"
><A
NAME="AEN5434"
NAME="AEN5502"
></A
><H2
>Details</H2
><DIV
CLASS="REFSECT2"
><A
NAME="AEN5436"
NAME="AEN5504"
></A
><H3
><A
......@@ -391,7 +391,7 @@ CLASS="PROGRAMLISTING"
><HR><DIV
CLASS="REFSECT2"
><A
NAME="AEN5441"
NAME="AEN5509"
></A
><H3
><A
......@@ -417,7 +417,7 @@ CLASS="PROGRAMLISTING"
><HR><DIV
CLASS="REFSECT2"
><A
NAME="AEN5446"
NAME="AEN5514"
></A
><H3
><A
......@@ -443,7 +443,7 @@ CLASS="PROGRAMLISTING"
><HR><DIV
CLASS="REFSECT2"
><A
NAME="AEN5451"
NAME="AEN5519"
></A
><H3
><A
......@@ -469,7 +469,7 @@ CLASS="PROGRAMLISTING"
><HR><DIV
CLASS="REFSECT2"
><A
NAME="AEN5456"
NAME="AEN5524"
></A
><H3
><A
......@@ -495,7 +495,7 @@ CLASS="PROGRAMLISTING"
><HR><DIV
CLASS="REFSECT2"
><A
NAME="AEN5461"
NAME="AEN5529"
></A
><H3
><A
......@@ -521,7 +521,7 @@ CLASS="PROGRAMLISTING"
><HR><DIV
CLASS="REFSECT2"
><A
NAME="AEN5466"
NAME="AEN5534"
></A
><H3
><A
......@@ -547,7 +547,7 @@ CLASS="PROGRAMLISTING"
><HR><DIV
CLASS="REFSECT2"
><A
NAME="AEN5471"
NAME="AEN5539"
></A
><H3
><A
......@@ -573,7 +573,7 @@ CLASS="PROGRAMLISTING"
><HR><DIV
CLASS="REFSECT2"
><A
NAME="AEN5476"
NAME="AEN5544"
></A
><H3
><A
......@@ -599,7 +599,7 @@ CLASS="PROGRAMLISTING"
><HR><DIV
CLASS="REFSECT2"
><A
NAME="AEN5481"
NAME="AEN5549"
></A
><H3
><A
......@@ -764,7 +764,7 @@ VALIGN="TOP"
><HR><DIV
CLASS="REFSECT2"
><A
NAME="AEN5521"
NAME="AEN5589"
></A
><H3
><A
......@@ -929,7 +929,7 @@ VALIGN="TOP"
><HR><DIV
CLASS="REFSECT2"
><A
NAME="AEN5561"
NAME="AEN5629"
></A
><H3
><A
......@@ -1010,7 +1010,7 @@ VALIGN="TOP"
><HR><DIV
CLASS="REFSECT2"
><A
NAME="AEN5582"
NAME="AEN5650"
></A
><H3
><A
......@@ -1114,7 +1114,7 @@ VALIGN="TOP"
><HR><DIV
CLASS="REFSECT2"
><A
NAME="AEN5608"
NAME="AEN5676"
></A
><H3
><A
......@@ -1217,7 +1217,7 @@ VALIGN="TOP"
><HR><DIV
CLASS="REFSECT2"
><A
NAME="AEN5634"
NAME="AEN5702"
></A
><H3
><A
......@@ -1320,7 +1320,7 @@ VALIGN="TOP"
><HR><DIV
CLASS="REFSECT2"
><A
NAME="AEN5660"
NAME="AEN5728"
></A
><H3
><A
......@@ -1429,7 +1429,7 @@ VALIGN="TOP"
><HR><DIV
CLASS="REFSECT2"
><A
NAME="AEN5688"
NAME="AEN5756"
></A
><H3
><A
......@@ -1537,7 +1537,7 @@ VALIGN="TOP"
><HR><DIV
CLASS="REFSECT2"
><A
NAME="AEN5715"
NAME="AEN5783"
></A
><H3
><A
......@@ -1598,7 +1598,7 @@ VALIGN="TOP"
><HR><DIV
CLASS="REFSECT2"
><A
NAME="AEN5731"
NAME="AEN5799"
></A
><H3
><A
......@@ -1679,7 +1679,7 @@ VALIGN="TOP"
><HR><DIV
CLASS="REFSECT2"
><A
NAME="AEN5752"
NAME="AEN5820"
></A
><H3
><A
......@@ -1742,7 +1742,7 @@ VALIGN="TOP"
><HR><DIV
CLASS="REFSECT2"
><A
NAME="AEN5768"
NAME="AEN5836"
></A
><H3
><A
......@@ -1826,7 +1826,7 @@ VALIGN="TOP"
><HR><DIV
CLASS="REFSECT2"
><A
NAME="AEN5789"
NAME="AEN5857"
></A
><H3
><A
......
......@@ -115,7 +115,7 @@ SIZE="3"
><DIV
CLASS="REFNAMEDIV"
><A
NAME="AEN7447"
NAME="AEN7515"
></A
><H2
>Name</H2
......@@ -123,7 +123,7 @@ NAME="AEN7447"
><DIV
CLASS="REFSYNOPSISDIV"
><A
NAME="AEN7450"
NAME="AEN7518"
></A
><H2
>Synopsis</H2
......@@ -277,7 +277,7 @@ HREF="gnome-xml-htmlparser.html#HTMLPARSEFILE"
><DIV
CLASS="REFSECT1"
><A
NAME="AEN7488"
NAME="AEN7556"
></A
><H2
>Description</H2
......@@ -287,14 +287,14 @@ NAME="AEN7488"
><DIV
CLASS="REFSECT1"
><A
NAME="AEN7491"
NAME="AEN7559"
></A
><H2
>Details</H2
><DIV
CLASS="REFSECT2"
><A
NAME="AEN7493"
NAME="AEN7561"
></A
><H3
><A
......@@ -320,7 +320,7 @@ CLASS="PROGRAMLISTING"
><HR><DIV
CLASS="REFSECT2"
><A
NAME="AEN7498"
NAME="AEN7566"
></A
><H3
><A
......@@ -346,7 +346,7 @@ CLASS="PROGRAMLISTING"
><HR><DIV
CLASS="REFSECT2"
><A
NAME="AEN7503"
NAME="AEN7571"
></A
><H3
><A
......@@ -372,7 +372,7 @@ CLASS="PROGRAMLISTING"
><HR><DIV
CLASS="REFSECT2"
><A
NAME="AEN7508"
NAME="AEN7576"
></A
><H3
><A
......@@ -398,7 +398,7 @@ CLASS="PROGRAMLISTING"
><HR><DIV
CLASS="REFSECT2"
><A
NAME="AEN7513"
NAME="AEN7581"
></A
><H3
><A
......@@ -424,7 +424,7 @@ CLASS="PROGRAMLISTING"
><HR><DIV
CLASS="REFSECT2"
><A
NAME="AEN7518"
NAME="AEN7586"
></A
><H3
><A
......@@ -450,7 +450,7 @@ CLASS="PROGRAMLISTING"
><HR><DIV
CLASS="REFSECT2"
><A
NAME="AEN7523"
NAME="AEN7591"
></A
><H3
><A
......@@ -476,7 +476,7 @@ CLASS="PROGRAMLISTING"
><HR><DIV
CLASS="REFSECT2"
><A
NAME="AEN7528"
NAME="AEN7596"
></A
><H3
><A
......@@ -502,7 +502,7 @@ CLASS="PROGRAMLISTING"
><HR><DIV
CLASS="REFSECT2"
><A
NAME="AEN7533"
NAME="AEN7601"
></A
><H3
><A
......@@ -528,7 +528,7 @@ CLASS="PROGRAMLISTING"
><HR><DIV
CLASS="REFSECT2"
><A
NAME="AEN7538"
NAME="AEN7606"
></A
><H3
><A
......@@ -609,7 +609,7 @@ VALIGN="TOP"
><HR><DIV
CLASS="REFSECT2"
><A
NAME="AEN7559"
NAME="AEN7627"
></A
><H3
><A
......@@ -692,7 +692,7 @@ VALIGN="TOP"
><HR><DIV
CLASS="REFSECT2"
><A
NAME="AEN7581"
NAME="AEN7649"
></A
><H3
><A
......@@ -797,7 +797,7 @@ if non-NULL *str will have to be freed by the caller.</TD
><HR><DIV
CLASS="REFSECT2"
><A
NAME="AEN7608"
NAME="AEN7676"
></A
><H3
><A
......@@ -881,7 +881,7 @@ VALIGN="TOP"
><HR><DIV
CLASS="REFSECT2"
><A
NAME="AEN7630"
NAME="AEN7698"
></A
><H3
><A
......@@ -948,7 +948,7 @@ VALIGN="TOP"
><HR><DIV
CLASS="REFSECT2"
><A
NAME="AEN7648"
NAME="AEN7716"
></A
><H3
><A
......@@ -1088,7 +1088,7 @@ VALIGN="TOP"
><HR><DIV
CLASS="REFSECT2"
><A
NAME="AEN7682"
NAME="AEN7750"
></A
><H3
><A
......@@ -1187,7 +1187,7 @@ VALIGN="TOP"
><HR><DIV
CLASS="REFSECT2"
><A
NAME="AEN7707"
NAME="AEN7775"
></A
><H3
><A
......@@ -1325,7 +1325,7 @@ VALIGN="TOP"
><HR><DIV
CLASS="REFSECT2"
><A
NAME="AEN7740"
NAME="AEN7808"
></A
><H3
><A
......
......@@ -115,7 +115,7 @@ SIZE="3"
><DIV
CLASS="REFNAMEDIV"
><A
NAME="AEN7769"
NAME="AEN7837"
></A
><H2
>Name</H2
......@@ -123,7 +123,7 @@ NAME="AEN7769"
><DIV
CLASS="REFSYNOPSISDIV"
><A
NAME="AEN7772"
NAME="AEN7840"
></A
><H2
>Synopsis</H2
......@@ -188,7 +188,7 @@ HREF="gnome-xml-tree.html#XMLDOCPTR"
><DIV
CLASS="REFSECT1"
><A
NAME="AEN7786"
NAME="AEN7854"
></A
><H2
>Description</H2
......@@ -198,14 +198,14 @@ NAME="AEN7786"
><DIV
CLASS="REFSECT1"
><A
NAME="AEN7789"
NAME="AEN7857"
></A
><H2
>Details</H2
><DIV
CLASS="REFSECT2"
><A
NAME="AEN7791"
NAME="AEN7859"
></A
><H3
><A
......@@ -231,7 +231,7 @@ CLASS="PROGRAMLISTING"
><HR><DIV
CLASS="REFSECT2"
><A
NAME="AEN7796"
NAME="AEN7864"
></A
><H3
><A
......@@ -257,7 +257,7 @@ CLASS="PROGRAMLISTING"
><HR><DIV
CLASS="REFSECT2"
><A
NAME="AEN7801"
NAME="AEN7869"
></A
><H3
><A
......@@ -283,7 +283,7 @@ CLASS="PROGRAMLISTING"
><HR><DIV
CLASS="REFSECT2"
><A
NAME="AEN7806"
NAME="AEN7874"
></A
><H3
><A
......@@ -386,7 +386,7 @@ VALIGN="TOP"
><HR><DIV
CLASS="REFSECT2"
><A
NAME="AEN7831"
NAME="AEN7899"
></A
><H3
><A
......@@ -470,7 +470,7 @@ VALIGN="TOP"
><HR><DIV
CLASS="REFSECT2"
><A
NAME="AEN7852"
NAME="AEN7920"
></A
><H3
><A
......
......@@ -115,7 +115,7 @@ SIZE="3"
><DIV
CLASS="REFNAMEDIV"
><A
NAME="AEN8149"
NAME="AEN8217"
></A
><H2
>Name</H2
......@@ -123,7 +123,7 @@ NAME="AEN8149"