summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDaniel Veillard <veillard@src.gnome.org>2002-12-20 00:16:24 +0000
committerDaniel Veillard <veillard@src.gnome.org>2002-12-20 00:16:24 +0000
commitea7751d53bf497e873dca39b2c305e300e2574f9 (patch)
treeac3127bbb39d53b9f6f9df897470ab298147597a /include
parentc84f8b58e1c2772280ef92d5d0db86f79e3ed2b1 (diff)
downloadlibxml2-ea7751d53bf497e873dca39b2c305e300e2574f9.tar.gz
working on DTD validation on top of xml reader interfaces. Allows to
* testReader.c xmlreader.c valid.c include/libxml/tree.h include/libxml/valid.h include/libxml/xmlreader.h: working on DTD validation on top of xml reader interfaces. Allows to validate arbitrary large instances. This required some extensions to the valid module interface and augmenting the size of xmlID and xmlRef structs a bit. * uri.c xmlregexp.c: simple cleanup. Daniel
Diffstat (limited to 'include')
-rw-r--r--include/libxml/tree.h4
-rw-r--r--include/libxml/valid.h11
-rw-r--r--include/libxml/xmlreader.h3
3 files changed, 17 insertions, 1 deletions
diff --git a/include/libxml/tree.h b/include/libxml/tree.h
index 93d57e31..0f47268c 100644
--- a/include/libxml/tree.h
+++ b/include/libxml/tree.h
@@ -387,6 +387,8 @@ struct _xmlID {
struct _xmlID *next; /* next ID */
const xmlChar *value; /* The ID name */
xmlAttrPtr attr; /* The attribute holding it */
+ const xmlChar *name; /* The attribute if attr is not available */
+ int lineno; /* The line number if attr is not available */
};
/**
@@ -401,6 +403,8 @@ struct _xmlRef {
struct _xmlRef *next; /* next Ref */
const xmlChar *value; /* The Ref name */
xmlAttrPtr attr; /* The attribute holding it */
+ const xmlChar *name; /* The attribute if attr is not available */
+ int lineno; /* The line number if attr is not available */
};
/**
diff --git a/include/libxml/valid.h b/include/libxml/valid.h
index 4cc5f978..36373e17 100644
--- a/include/libxml/valid.h
+++ b/include/libxml/valid.h
@@ -312,6 +312,17 @@ int xmlValidateNmtokensValue(const xmlChar *value);
int xmlValidBuildContentModel(xmlValidCtxtPtr ctxt,
xmlElementPtr elem);
+int xmlValidatePushElement (xmlValidCtxtPtr ctxt,
+ xmlDocPtr doc,
+ xmlNodePtr elem,
+ const xmlChar *qname);
+int xmlValidatePushCData (xmlValidCtxtPtr ctxt,
+ const xmlChar *data,
+ int len);
+int xmlValidatePopElement (xmlValidCtxtPtr ctxt,
+ xmlDocPtr doc,
+ xmlNodePtr elem,
+ const xmlChar *qname);
#endif /* LIBXML_REGEXP_ENABLED */
#ifdef __cplusplus
}
diff --git a/include/libxml/xmlreader.h b/include/libxml/xmlreader.h
index 27c8ba3b..fbe1de0f 100644
--- a/include/libxml/xmlreader.h
+++ b/include/libxml/xmlreader.h
@@ -28,7 +28,8 @@ typedef xmlTextReader *xmlTextReaderPtr;
/*
* Constructors & Destructor
*/
-xmlTextReaderPtr xmlNewTextReader (xmlParserInputBufferPtr input);
+xmlTextReaderPtr xmlNewTextReader (xmlParserInputBufferPtr input,
+ const char *URI);
xmlTextReaderPtr xmlNewTextReaderFilename(const char *URI);
void xmlFreeTextReader (xmlTextReaderPtr reader);