Various small bugfixes, Daniel.
diff --git a/ChangeLog b/ChangeLog
index 3ead3d8..02075e7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+Sat Oct 9 11:02:57 CEST 1999 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * Makefile.am: Arturo patch for xmlConf.sh version info
+ * parser.c: Tim Josling patch for single quoted items
+ * tester.c: Tim Josling patch for tester options usage
+ * tree.h: indent cleanup
+
Fri Oct 8 16:35:37 CEST 1999 Daniel Veillard <Daniel.Veillard@w3.org>
* HTMLparser.c parser.h : Fixed problems with HTML parsing
diff --git a/Makefile.am b/Makefile.am
index 83a5c20..52dd27b 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -259,5 +259,6 @@
sed -e 's?\@XML_LIBDIR\@?$(XML_LIBDIR)?g' \
-e 's?\@XML_INCLUDEDIR\@?$(XML_INCLUDEDIR)?g' \
-e 's?\@XML_LIBS\@?$(XML_LIBS)?g' \
+ -e 's?\@VERSION\@?$(VERSION)?g' \
< $(srcdir)/xmlConf.sh.in > xmlConf.tmp \
&& mv xmlConf.tmp xmlConf.sh
diff --git a/include/libxml/tree.h b/include/libxml/tree.h
index bd29083..6c7e795 100644
--- a/include/libxml/tree.h
+++ b/include/libxml/tree.h
@@ -99,17 +99,17 @@
typedef struct xmlEnumeration {
struct xmlEnumeration *next; /* next one */
- const xmlChar *name; /* Enumeration name */
+ const xmlChar *name; /* Enumeration name */
} xmlEnumeration;
typedef xmlEnumeration *xmlEnumerationPtr;
typedef struct xmlAttribute {
- const xmlChar *elem; /* Element holding the attribute */
- const xmlChar *name; /* Attribute name */
+ const xmlChar *elem; /* Element holding the attribute */
+ const xmlChar *name; /* Attribute name */
struct xmlAttribute *next; /* list of attributes of an element */
xmlAttributeType type; /* The type */
xmlAttributeDefault def; /* the default */
- const xmlChar *defaultValue;/* or the default value */
+ const xmlChar *defaultValue;/* or the default value */
xmlEnumerationPtr tree; /* or the enumeration tree if any */
} xmlAttribute;
typedef xmlAttribute *xmlAttributePtr;
@@ -134,7 +134,7 @@
typedef struct xmlElementContent {
xmlElementContentType type; /* PCDATA, ELEMENT, SEQ or OR */
xmlElementContentOccur ocur; /* ONCE, OPT, MULT or PLUS */
- const xmlChar *name; /* Element name */
+ const xmlChar *name; /* Element name */
struct xmlElementContent *c1; /* first child */
struct xmlElementContent *c2; /* second child */
} xmlElementContent;
@@ -148,7 +148,7 @@
} xmlElementTypeVal;
typedef struct xmlElement {
- const xmlChar *name; /* Element name */
+ const xmlChar *name; /* Element name */
xmlElementTypeVal type; /* The type */
xmlElementContentPtr content; /* the allowed element content */
xmlAttributePtr attributes; /* List of the declared attributes */
@@ -169,8 +169,8 @@
typedef struct xmlNs {
struct xmlNs *next; /* next Ns link for this node */
xmlNsType type; /* global or local */
- const xmlChar *href; /* URL for the namespace */
- const xmlChar *prefix; /* prefix for the namespace */
+ const xmlChar *href; /* URL for the namespace */
+ const xmlChar *prefix; /* prefix for the namespace */
} xmlNs;
typedef xmlNs *xmlNsPtr;
@@ -178,9 +178,9 @@
* An XML DtD, as defined by <!DOCTYPE.
*/
typedef struct xmlDtd {
- const xmlChar *name; /* Name of the DTD */
- const xmlChar *ExternalID; /* External identifier for PUBLIC DTD */
- const xmlChar *SystemID; /* URI for a SYSTEM or PUBLIC DTD */
+ const xmlChar *name; /* Name of the DTD */
+ const xmlChar *ExternalID; /* External identifier for PUBLIC DTD */
+ const xmlChar *SystemID; /* URI for a SYSTEM or PUBLIC DTD */
void *notations; /* Hash table for notations if any */
void *elements; /* Hash table for elements if any */
void *attributes; /* Hash table for attributes if any */
@@ -200,7 +200,7 @@
xmlElementType type; /* XML_ATTRIBUTE_NODE, must be third ! */
struct xmlNode *node; /* attr->node link */
struct xmlAttr *next; /* attribute list link */
- const xmlChar *name; /* the name of the property */
+ const xmlChar *name; /* the name of the property */
struct xmlNode *val; /* the value of the property */
xmlNs *ns; /* pointer to the associated namespace */
} xmlAttr;
@@ -212,7 +212,7 @@
typedef struct xmlID {
struct xmlID *next; /* next ID */
- const xmlChar *value; /* The ID name */
+ const xmlChar *value; /* The ID name */
xmlAttrPtr attr; /* The attribut holding it */
} xmlID;
typedef xmlID *xmlIDPtr;
@@ -223,7 +223,7 @@
typedef struct xmlRef {
struct xmlRef *next; /* next Ref */
- const xmlChar *value; /* The Ref name */
+ const xmlChar *value; /* The Ref name */
xmlAttrPtr attr; /* The attribut holding it */
} xmlRef;
typedef xmlRef *xmlRefPtr;
@@ -244,10 +244,10 @@
struct xmlNode *childs; /* parent->childs link */
struct xmlNode *last; /* last child link */
struct xmlAttr *properties; /* properties list */
- const xmlChar *name; /* the name of the node, or the entity */
+ const xmlChar *name; /* the name of the node, or the entity */
xmlNs *ns; /* pointer to the associated namespace */
xmlNs *nsDef; /* namespace definitions on this node */
- xmlChar *content; /* the content */
+ xmlChar *content; /* the content */
} _xmlNode;
typedef _xmlNode xmlNode;
typedef _xmlNode *xmlNodePtr;
@@ -262,8 +262,8 @@
#endif
xmlElementType type; /* XML_DOCUMENT_NODE, must be second ! */
char *name; /* name/filename/URI of the document */
- const xmlChar *version; /* the XML version string */
- const xmlChar *encoding; /* encoding, if any */
+ const xmlChar *version; /* the XML version string */
+ const xmlChar *encoding; /* encoding, if any */
int compression;/* level of zlib compression */
int standalone; /* standalone document (no external refs) */
struct xmlDtd *intSubset; /* the document internal subset */
@@ -333,7 +333,7 @@
const xmlChar *href,
const xmlChar *prefix);
void xmlFreeNs (xmlNsPtr cur);
-xmlDocPtr xmlNewDoc (const xmlChar *version);
+xmlDocPtr xmlNewDoc (const xmlChar *version);
void xmlFreeDoc (xmlDocPtr cur);
xmlAttrPtr xmlNewDocProp (xmlDocPtr doc,
const xmlChar *name,
@@ -434,14 +434,14 @@
xmlAttrPtr xmlSetProp (xmlNodePtr node,
const xmlChar *name,
const xmlChar *value);
-xmlChar * xmlGetProp (xmlNodePtr node,
+xmlChar * xmlGetProp (xmlNodePtr node,
const xmlChar *name);
xmlNodePtr xmlStringGetNodeList (xmlDocPtr doc,
const xmlChar *value);
xmlNodePtr xmlStringLenGetNodeList (xmlDocPtr doc,
const xmlChar *value,
int len);
-xmlChar * xmlNodeListGetString (xmlDocPtr doc,
+xmlChar * xmlNodeListGetString (xmlDocPtr doc,
xmlNodePtr list,
int inLine);
void xmlNodeSetContent (xmlNodePtr cur,
@@ -454,7 +454,7 @@
void xmlNodeAddContentLen (xmlNodePtr cur,
const xmlChar *content,
int len);
-xmlChar * xmlNodeGetContent (xmlNodePtr cur);
+xmlChar * xmlNodeGetContent (xmlNodePtr cur);
const xmlChar * xmlNodeGetLang (xmlNodePtr cur);
void xmlNodeSetLang (xmlNodePtr cur,
const xmlChar *lang);
diff --git a/parser.c b/parser.c
index 774a993..ce1d1fa 100644
--- a/parser.c
+++ b/parser.c
@@ -2615,9 +2615,7 @@
xmlParsePubidLiteral(xmlParserCtxtPtr ctxt) {
const xmlChar *q;
xmlChar *ret = NULL;
- /*
- * Name ::= (Letter | '_') (NameChar)*
- */
+
SHRINK;
if (CUR == '"') {
NEXT;
@@ -2635,10 +2633,9 @@
} else if (CUR == '\'') {
NEXT;
q = CUR_PTR;
- while ((IS_LETTER(CUR)) && (CUR != '\''))
- NEXT;
- if (!IS_LETTER(CUR)) {
- if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL))
+ while (IS_PUBIDCHAR(CUR)) NEXT;
+ if (CUR != '\'') {
+ if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL))
ctxt->sax->error(ctxt->userData, "Unfinished PubidLiteral\n");
ctxt->errNo = XML_ERR_LITERAL_NOT_FINISHED;
ctxt->wellFormed = 0;
diff --git a/tester.c b/tester.c
index 1357eca..cff492c 100644
--- a/tester.c
+++ b/tester.c
@@ -228,7 +228,7 @@
}
}
if (files == 0) {
- printf("Usage : %s [--debug] [--copy] [--recover] [--noent] [--noout] XMLfiles ...\n",
+ printf("Usage : %s [--debug] [--copy] [--recover] [--noent] [--noout] [--valid] [--repeat] XMLfiles ...\n",
argv[0]);
printf("\tParse the XML files and output the result of the parsing\n");
printf("\t--debug : dump a debug tree of the in-memory document\n");
@@ -236,6 +236,7 @@
printf("\t--recover : output what is parsable on broken XmL documents\n");
printf("\t--noent : substitute entity references by their value\n");
printf("\t--noout : don't output the result\n");
+ printf("\t--valid : validate the document in addition to std well-formed check\n");
printf("\t--repeat : parse the file 100 times, for timing or profiling\n");
}
xmlMemoryDump();
diff --git a/tree.h b/tree.h
index bd29083..6c7e795 100644
--- a/tree.h
+++ b/tree.h
@@ -99,17 +99,17 @@
typedef struct xmlEnumeration {
struct xmlEnumeration *next; /* next one */
- const xmlChar *name; /* Enumeration name */
+ const xmlChar *name; /* Enumeration name */
} xmlEnumeration;
typedef xmlEnumeration *xmlEnumerationPtr;
typedef struct xmlAttribute {
- const xmlChar *elem; /* Element holding the attribute */
- const xmlChar *name; /* Attribute name */
+ const xmlChar *elem; /* Element holding the attribute */
+ const xmlChar *name; /* Attribute name */
struct xmlAttribute *next; /* list of attributes of an element */
xmlAttributeType type; /* The type */
xmlAttributeDefault def; /* the default */
- const xmlChar *defaultValue;/* or the default value */
+ const xmlChar *defaultValue;/* or the default value */
xmlEnumerationPtr tree; /* or the enumeration tree if any */
} xmlAttribute;
typedef xmlAttribute *xmlAttributePtr;
@@ -134,7 +134,7 @@
typedef struct xmlElementContent {
xmlElementContentType type; /* PCDATA, ELEMENT, SEQ or OR */
xmlElementContentOccur ocur; /* ONCE, OPT, MULT or PLUS */
- const xmlChar *name; /* Element name */
+ const xmlChar *name; /* Element name */
struct xmlElementContent *c1; /* first child */
struct xmlElementContent *c2; /* second child */
} xmlElementContent;
@@ -148,7 +148,7 @@
} xmlElementTypeVal;
typedef struct xmlElement {
- const xmlChar *name; /* Element name */
+ const xmlChar *name; /* Element name */
xmlElementTypeVal type; /* The type */
xmlElementContentPtr content; /* the allowed element content */
xmlAttributePtr attributes; /* List of the declared attributes */
@@ -169,8 +169,8 @@
typedef struct xmlNs {
struct xmlNs *next; /* next Ns link for this node */
xmlNsType type; /* global or local */
- const xmlChar *href; /* URL for the namespace */
- const xmlChar *prefix; /* prefix for the namespace */
+ const xmlChar *href; /* URL for the namespace */
+ const xmlChar *prefix; /* prefix for the namespace */
} xmlNs;
typedef xmlNs *xmlNsPtr;
@@ -178,9 +178,9 @@
* An XML DtD, as defined by <!DOCTYPE.
*/
typedef struct xmlDtd {
- const xmlChar *name; /* Name of the DTD */
- const xmlChar *ExternalID; /* External identifier for PUBLIC DTD */
- const xmlChar *SystemID; /* URI for a SYSTEM or PUBLIC DTD */
+ const xmlChar *name; /* Name of the DTD */
+ const xmlChar *ExternalID; /* External identifier for PUBLIC DTD */
+ const xmlChar *SystemID; /* URI for a SYSTEM or PUBLIC DTD */
void *notations; /* Hash table for notations if any */
void *elements; /* Hash table for elements if any */
void *attributes; /* Hash table for attributes if any */
@@ -200,7 +200,7 @@
xmlElementType type; /* XML_ATTRIBUTE_NODE, must be third ! */
struct xmlNode *node; /* attr->node link */
struct xmlAttr *next; /* attribute list link */
- const xmlChar *name; /* the name of the property */
+ const xmlChar *name; /* the name of the property */
struct xmlNode *val; /* the value of the property */
xmlNs *ns; /* pointer to the associated namespace */
} xmlAttr;
@@ -212,7 +212,7 @@
typedef struct xmlID {
struct xmlID *next; /* next ID */
- const xmlChar *value; /* The ID name */
+ const xmlChar *value; /* The ID name */
xmlAttrPtr attr; /* The attribut holding it */
} xmlID;
typedef xmlID *xmlIDPtr;
@@ -223,7 +223,7 @@
typedef struct xmlRef {
struct xmlRef *next; /* next Ref */
- const xmlChar *value; /* The Ref name */
+ const xmlChar *value; /* The Ref name */
xmlAttrPtr attr; /* The attribut holding it */
} xmlRef;
typedef xmlRef *xmlRefPtr;
@@ -244,10 +244,10 @@
struct xmlNode *childs; /* parent->childs link */
struct xmlNode *last; /* last child link */
struct xmlAttr *properties; /* properties list */
- const xmlChar *name; /* the name of the node, or the entity */
+ const xmlChar *name; /* the name of the node, or the entity */
xmlNs *ns; /* pointer to the associated namespace */
xmlNs *nsDef; /* namespace definitions on this node */
- xmlChar *content; /* the content */
+ xmlChar *content; /* the content */
} _xmlNode;
typedef _xmlNode xmlNode;
typedef _xmlNode *xmlNodePtr;
@@ -262,8 +262,8 @@
#endif
xmlElementType type; /* XML_DOCUMENT_NODE, must be second ! */
char *name; /* name/filename/URI of the document */
- const xmlChar *version; /* the XML version string */
- const xmlChar *encoding; /* encoding, if any */
+ const xmlChar *version; /* the XML version string */
+ const xmlChar *encoding; /* encoding, if any */
int compression;/* level of zlib compression */
int standalone; /* standalone document (no external refs) */
struct xmlDtd *intSubset; /* the document internal subset */
@@ -333,7 +333,7 @@
const xmlChar *href,
const xmlChar *prefix);
void xmlFreeNs (xmlNsPtr cur);
-xmlDocPtr xmlNewDoc (const xmlChar *version);
+xmlDocPtr xmlNewDoc (const xmlChar *version);
void xmlFreeDoc (xmlDocPtr cur);
xmlAttrPtr xmlNewDocProp (xmlDocPtr doc,
const xmlChar *name,
@@ -434,14 +434,14 @@
xmlAttrPtr xmlSetProp (xmlNodePtr node,
const xmlChar *name,
const xmlChar *value);
-xmlChar * xmlGetProp (xmlNodePtr node,
+xmlChar * xmlGetProp (xmlNodePtr node,
const xmlChar *name);
xmlNodePtr xmlStringGetNodeList (xmlDocPtr doc,
const xmlChar *value);
xmlNodePtr xmlStringLenGetNodeList (xmlDocPtr doc,
const xmlChar *value,
int len);
-xmlChar * xmlNodeListGetString (xmlDocPtr doc,
+xmlChar * xmlNodeListGetString (xmlDocPtr doc,
xmlNodePtr list,
int inLine);
void xmlNodeSetContent (xmlNodePtr cur,
@@ -454,7 +454,7 @@
void xmlNodeAddContentLen (xmlNodePtr cur,
const xmlChar *content,
int len);
-xmlChar * xmlNodeGetContent (xmlNodePtr cur);
+xmlChar * xmlNodeGetContent (xmlNodePtr cur);
const xmlChar * xmlNodeGetLang (xmlNodePtr cur);
void xmlNodeSetLang (xmlNodePtr cur,
const xmlChar *lang);