Thu, 03 Apr 2014 00:01:12 +0100
Update _VERSION, makefile, README and documentation to 1.3.0
Makefile | file | annotate | diff | comparison | revisions | |
README | file | annotate | diff | comparison | revisions | |
doc/us/index.html | file | annotate | diff | comparison | revisions | |
doc/us/manual.html | file | annotate | diff | comparison | revisions |
--- a/Makefile Wed Apr 02 21:02:29 2014 +0100 +++ b/Makefile Thu Apr 03 00:01:12 2014 +0100 @@ -31,4 +31,4 @@ $(INSTALL_PROGRAM) -D src/$T/lom.lua $(DESTDIR)$(LUA_LDIR)/$T/lom.lua clean: - $(RM) src/$(LIBNAME) $(OBJS) \ No newline at end of file + $(RM) src/$(LIBNAME) $(OBJS)
--- a/README Wed Apr 02 21:02:29 2014 +0100 +++ b/README Thu Apr 03 00:01:12 2014 +0100 @@ -8,8 +8,8 @@ Status -Current version is 1.2.0. It was developed for both Lua 5.0 and Lua 5.1, -and has been tested on Linux, Windows (2000/XP) and MacOS X with Expat 2.0.0. +Current version is 1.3.0. It was developed for both Lua 5.1 and Lua 5.2, +and has been tested on Linux, Windows (XP) and MacOS X with Expat 2.1.0. Download @@ -18,6 +18,12 @@ History +Version 1.3.0 [04/Apr/2014] + + * support for the XmlDecl handler + * add parser:getcurrentbytecount() (XML_GetCurrentByteCount) + * ability to disable CharacterData merging + Version 1.2.0 [02/Jun/2011] * support for the StartDoctypeDecl handler
--- a/doc/us/index.html Wed Apr 02 21:02:29 2014 +0100 +++ b/doc/us/index.html Thu Apr 03 00:01:12 2014 +0100 @@ -66,8 +66,8 @@ <h2><a name="status"></a>Status</h2> -<p>Current version is 1.2.0. It was developed for both Lua 5.0 and Lua 5.1, and has been tested on -Linux, Windows (2000/XP) and MacOS X with Expat 2.0.0.</p> +<p>Current version is 1.3.0. It was developed for both Lua 5.1 and Lua 5.2, and has been tested on +Linux, Windows (XP) and MacOS X with Expat 2.1.0.</p> <h2><a name="download"></a>Download</h2> @@ -79,6 +79,15 @@ <h2><a name="history"></a>History</h2> <dl class="history"> + <dt><strong>Version 1.3.0</strong> [02/Apr/2014]</dt> + <dd> + <ul> + <li>support for the XmlDecl handler</li> + <li>add parser:getcurrentbytecount() (XML_GetCurrentByteCount)</li> + <li>ability to disable CharacterData merging</li> + </ul> + </dd> + <dt><strong>Version 1.2.0</strong> [02/Jun/2011]</dt> <dd> <ul> @@ -156,7 +165,6 @@ <div id="about"> <p><a href="http://validator.w3.org/check?uri=referer"> <img src="http://www.w3.org/Icons/valid-xhtml10" alt="Valid XHTML 1.0!" height="31" width="88" /></a></p> - <p><small>$Id: index.html,v 1.45 2007/06/05 21:11:29 carregal Exp $</small></p> </div> <!-- id="about" --> </div> <!-- id="container" -->
--- a/doc/us/manual.html Wed Apr 02 21:02:29 2014 +0100 +++ b/doc/us/manual.html Thu Apr 03 00:01:12 2014 +0100 @@ -85,11 +85,11 @@ <h2><a name="building"></a>Building</h2> <p> -LuaExpat could be built to Lua 5.0 or to Lua 5.1. +LuaExpat could be built to Lua 5.1 or to Lua 5.2. In both cases, the language library and headers files for the desired version must be installed properly. -LuaExpat also depends on Expat 2.0.0 which should also be installed. +LuaExpat also depends on Expat 2.0.0+ which should also be installed. </p> <p> LuaExpat offers a Makefile and a separate configuration file, @@ -131,11 +131,13 @@ <h4>Constructor</h4> <dl class="reference"> - <dt><strong>lxp.new(<em>callbacks [, separator]</em>)</strong></dt> + <dt><strong>lxp.new(<em>callbacks [, separator[, merge_character_data]]</em>)</strong></dt> <dd>The parser is created by a call to the function <strong>lxp.new</strong>, which returns the created parser or raises a Lua error. It receives the callbacks table and optionally the parser <a href="#separator"> - separator character</a> used in the namespace expanded element names.</dd> + separator character</a> used in the namespace expanded element names. + If <em>merge_character_data</em> is false then LuaExpat will not combine multiple + CharacterData calls into one. For more info on this behaviour see CharacterData below.</dd> </dl> <h4>Methods</h4> @@ -167,6 +169,12 @@ <dd>Returns three results: the current parsing line, column, and absolute position.</dd> + <dt><strong>parser:getcurrentbytecount()</strong></dt> + <dd>Return the number of bytes of input corresponding to the current + event. This function can only be called inside a handler, in other + contexts it will return 0. Do not use inside a CharacterData handler + unless CharacterData merging has been disabled (see lxp.new).</dd> + <dt><strong>parser:setbase(base)</strong></dt> <dd>Sets the <em>base</em> to be used for resolving relative URIs in system identifiers.</dd> @@ -205,8 +213,8 @@ <em>ExternalEntityRef</em>, <em>NotStandalone</em>, <em>NotationDecl</em>, <em>ProcessingInstruction</em>, <em>StartCDataSection</em>, <em>StartElement</em>, -<em>StartNamespaceDecl</em>, <em>UnparsedEntityDecl</em> -and <em>StartDoctypeDecl</em>.</p> +<em>StartNamespaceDecl</em>, <em>UnparsedEntityDecl</em>, +<em>XmlDecl</em> and <em>StartDoctypeDecl</em>.</p> <p>These indices can be references to functions with specific signatures, as seen below. The parser constructor also @@ -226,7 +234,10 @@ <dl class="reference"> <dt><strong>callbacks.CharacterData = function(parser, string)</strong></dt> - <dd>Called when the <em>parser</em> recognizes an XML CDATA <em>string</em>.</dd> + <dd>Called when the <em>parser</em> recognizes an XML CDATA <em>string</em>. + Note that LuaExpat automatically combines multiple CharacterData events + from Expat into a single call to this handler, unless <em>merge_character_data</em> + is set to false when calling lxp.new().</dd> <dt><strong>callbacks.Comment = function(parser, string)</strong></dt> <dd>Called when the <em>parser</em> recognizes an XML comment @@ -300,6 +311,11 @@ <dd>Called when the <em>parser</em> detects the begining of an XML CDATA section.</dd> + <dt><strong>callbacks.XmlDecl = function(parser, version, encoding)</strong></dt> + <dd>Called when the <em>parser</em> encounters an XML document declaration (these are + optional, and valid only at the start of the document). The callback receives + the declared XML <em>version</em> and document <em>encoding</em>.</dd> + <dt><strong>callbacks.StartElement = function(parser, elementName, attributes)</strong></dt> <dd>Called when the <em>parser</em> detects the begining of an XML element with <em>elementName</em>.<br/> @@ -371,7 +387,6 @@ <div id="about"> <p><a href="http://validator.w3.org/check?uri=referer"> <img src="http://www.w3.org/Icons/valid-xhtml10" alt="Valid XHTML 1.0!" height="31" width="88" /></a></p> - <p><small>$Id: manual.html,v 1.27 2007/06/05 20:03:12 carregal Exp $</small></p> </div> <!-- id="about" --> </div> <!-- id="container" -->