[Expat-checkins] expat/doc reference.html, 1.47, 1.48 style.css, 1.4, 1.5

Fred L. Drake fdrake at users.sourceforge.net
Tue Oct 7 23:32:27 EDT 2003


Update of /cvsroot/expat/expat/doc
In directory sc8-pr-cvs1:/tmp/cvs-serv6105

Modified Files:
	reference.html style.css 
Log Message:
Added documentation for the pre-processor macros used to configure Expat.

Index: reference.html
===================================================================
RCS file: /cvsroot/expat/expat/doc/reference.html,v
retrieving revision 1.47
retrieving revision 1.48
diff -u -d -r1.47 -r1.48
--- reference.html	28 Aug 2003 13:12:34 -0000	1.47
+++ reference.html	8 Oct 2003 03:32:25 -0000	1.48
@@ -607,6 +607,57 @@
 <p>In order to read an external DTD, you also have to set an external
 entity reference handler as described above.</p>
 
+<h3>Configuring Expat Using the Pre-Processor</h3>
+
+<p>Expat's feature set can be configured using a small number of
+pre-processor definitions.  The definition of this symbols does not
+affect the set of entry points for Expat, only the behavior of the API
+and the definition of character types in the case of
+<code>XML_UNICODE_WCHAR_T</code>.  The symbols are:</p>
+
+<dl class="cpp-symbols">
+<dt>XML_DTD</dt>
+<dd>Include support for using and reporting DTD-based content.  If
+this is defined, default attribute values from the DTD are reported
+and attribute value normalization occurs based on the type of
+attributes.  Callbacks can be registered which report information from
+the DTD (including content models and attribute definitions) only if
+this is defined.  Without this, Expat has a smaller memory footprint
+and can be faster.</dd>
+
+<dt>XML_NS</dt>
+<dd>When defined, support for the <cite><a href=
+"http://www.w3.org/TR/REC-xml-names/" >Namespaces in XML</a></cite>
+specification is included.</dd>
+
+<dt>XML_UNICODE</dt>
+<dd>When defined, character data reported to the application is
+encoded in UTF-16 using wide characters of the type
+<code>XML_Char</code>.  This is implied if
+<code>XML_UNICODE_WCHAR_T</code> is defined.</dt>
+
+<dt>XML_UNICODE_WCHAR_T</dt>
+<dd>If defined, causes the <code>XML_Char</code> character type to be
+defined using the <code>wchar_t</code> type; otherwise, <code>unsigned
+short</code> is used.  Defining this implies
+<code>XML_UNICODE</code>.</dd>
+
+<dt>XML_CONTEXT_BYTES</dt>
+<dd>The number of input bytes of markup context which the parser will
+ensure are available for reporting via <code><a href=
+"#XML_GetInputContext" >XML_GetInputContext</a></code>.  This is
+normally set to 1024.  If this is not defined, the input context will
+not be available and <code><a href= "#XML_GetInputContext"
+>XML_GetInputContext</a></code> will always report NULL.  Without
+this, Expat has a smaller memory footprint and can be faster.</dd>
+
+<dt>XML_STATIC</dt>
+<dd>On Windows, this should be set if Expat is going to be linked
+statically with the code that calls it; this is required to get all
+the right MSVC magic annotations correct.  This is ignored on other
+platforms.</dd>
+</dl>
+
 <hr />
 <!-- ================================================================ -->
 

Index: style.css
===================================================================
RCS file: /cvsroot/expat/expat/doc/style.css,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- style.css	26 Aug 2002 17:27:29 -0000	1.4
+++ style.css	8 Oct 2003 03:32:25 -0000	1.5
@@ -49,3 +49,10 @@
 dd {
   margin-bottom: 2em;
 }
+
+.cpp-symbols dt {
+  font-family: monospace;
+}
+.cpp-symbols dd {
+  margin-bottom: 1em;
+}





More information about the Expat-checkins mailing list