diff options
-rw-r--r-- | doc/reference.html | 6 | ||||
-rw-r--r-- | lib/expat.h | 1 |
2 files changed, 7 insertions, 0 deletions
diff --git a/doc/reference.html b/doc/reference.html index 8cdfcd6..4142ee0 100644 --- a/doc/reference.html +++ b/doc/reference.html @@ -1000,6 +1000,12 @@ called for processing an external DTD subset if parameter entity parsing is in effect. (See <a href="#XML_SetParamEntityParsing"> <code>XML_SetParamEntityParsing</code></a>.)</p> +<p>The context parameter specifies the parsing context in the format +expected by the context argument to XML_ExternalEntityParserCreate. +context is valid only until the handler returns, so if the +referenced entity is to be parsed later, it must be copied. +context is NULL only when the entity is a parameter entity, which +is how one can differentiate between general and parameter entities.</p> <p>The base parameter is the base to use for relative system identifiers. It is set by <a href="#XML_SetBase">XML_SetBase</a> and may be null. The diff --git a/lib/expat.h b/lib/expat.h index 5e4b237..ccd52b0 100644 --- a/lib/expat.h +++ b/lib/expat.h @@ -399,6 +399,7 @@ typedef int (*XML_NotStandaloneHandler)(void *userData); expected by the context argument to XML_ExternalEntityParserCreate; context is valid only until the handler returns, so if the referenced entity is to be parsed later, it must be copied. + context is NULL only when the entity is a parameter entity. The handler should return 0 if processing should not continue because of a fatal error in the handling of the external entity. |