diff -r 10c30b63873a -r 1506d4582d44 doc/us/manual.html
--- 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 @@
Building
-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.
LuaExpat offers a Makefile and a separate configuration file,
@@ -131,11 +131,13 @@
Constructor
- - lxp.new(callbacks [, separator])
+ - lxp.new(callbacks [, separator[, merge_character_data]])
- The parser is created by a call to the function lxp.new,
which returns the created parser or raises a Lua error. It
receives the callbacks table and optionally the parser
- separator character used in the namespace expanded element names.
+ separator character used in the namespace expanded element names.
+ If merge_character_data is false then LuaExpat will not combine multiple
+ CharacterData calls into one. For more info on this behaviour see CharacterData below.
Methods
@@ -167,6 +169,12 @@
Returns three results: the current parsing line, column, and
absolute position.
+ parser:getcurrentbytecount()
+ 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).
+
parser:setbase(base)
Sets the base to be used for resolving relative URIs in
system identifiers.
@@ -205,8 +213,8 @@
ExternalEntityRef, NotStandalone,
NotationDecl, ProcessingInstruction,
StartCDataSection, StartElement,
-StartNamespaceDecl, UnparsedEntityDecl
-and StartDoctypeDecl.
+StartNamespaceDecl, UnparsedEntityDecl,
+XmlDecl and StartDoctypeDecl.
These indices can be references to functions with
specific signatures, as seen below. The parser constructor also
@@ -226,7 +234,10 @@
- callbacks.CharacterData = function(parser, string)
- - Called when the parser recognizes an XML CDATA string.
+ - Called when the parser recognizes an XML CDATA string.
+ Note that LuaExpat automatically combines multiple CharacterData events
+ from Expat into a single call to this handler, unless merge_character_data
+ is set to false when calling lxp.new().
- callbacks.Comment = function(parser, string)
- Called when the parser recognizes an XML comment
@@ -300,6 +311,11 @@
- Called when the parser detects the begining of an XML
CDATA section.
+ - callbacks.XmlDecl = function(parser, version, encoding)
+ - Called when the parser encounters an XML document declaration (these are
+ optional, and valid only at the start of the document). The callback receives
+ the declared XML version and document encoding.
+
- callbacks.StartElement = function(parser, elementName, attributes)
- Called when the parser detects the begining of an XML
element with elementName.
@@ -371,7 +387,6 @@
-
$Id: manual.html,v 1.27 2007/06/05 20:03:12 carregal Exp $