Initial commit of LuaExpat 1.1.0

Wed, 01 Jun 2011 22:14:25 +0100

author
Matthew Wild <mwild1@gmail.com>
date
Wed, 01 Jun 2011 22:14:25 +0100
changeset 0
24d141cb2d1e
child 1
304b5a6f85e4

Initial commit of LuaExpat 1.1.0

README file | annotate | diff | comparison | revisions
config file | annotate | diff | comparison | revisions
debian/Makefile.Debian.conf file | annotate | diff | comparison | revisions
debian/changelog file | annotate | diff | comparison | revisions
debian/control file | annotate | diff | comparison | revisions
debian/copyright file | annotate | diff | comparison | revisions
debian/liblua5.1-expat-dev.docs file | annotate | diff | comparison | revisions
debian/patches/00dpatch.conf file | annotate | diff | comparison | revisions
debian/rules file | annotate | diff | comparison | revisions
debian/watch file | annotate | diff | comparison | revisions
doc/us/examples.html file | annotate | diff | comparison | revisions
doc/us/index.html file | annotate | diff | comparison | revisions
doc/us/license.html file | annotate | diff | comparison | revisions
doc/us/lom.html file | annotate | diff | comparison | revisions
doc/us/luaexpat.png file | annotate | diff | comparison | revisions
doc/us/manual.html file | annotate | diff | comparison | revisions
makefile file | annotate | diff | comparison | revisions
makefile.win file | annotate | diff | comparison | revisions
src/lxp.def file | annotate | diff | comparison | revisions
src/lxp/lom.lua file | annotate | diff | comparison | revisions
src/lxplib.c file | annotate | diff | comparison | revisions
src/lxplib.h file | annotate | diff | comparison | revisions
tests/test-lom.lua file | annotate | diff | comparison | revisions
tests/test.lua file | annotate | diff | comparison | revisions
vc6/README file | annotate | diff | comparison | revisions
vc6/luaexpat.dsw file | annotate | diff | comparison | revisions
vc6/luaexpat_dll.dsp file | annotate | diff | comparison | revisions
vc6/luaexpat_static.dsp file | annotate | diff | comparison | revisions
vc6/lxp.def file | annotate | diff | comparison | revisions
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/README	Wed Jun 01 22:14:25 2011 +0100
@@ -0,0 +1,56 @@
+LuaExpat (http://www.keplerproject.org/luaexpat/)
+-------------------------------------------------
+
+Overview
+
+LuaExpat is a SAX XML parser based on the Expat library. LuaExpat is free
+software and uses the same license as Lua 5.1.
+
+Status
+
+Current version is 1.1.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.
+
+Download
+
+LuaExpat source can be downloaded from its LuaForge page. If you are using
+LuaBinaries a Windows binary version of LuaExpat can be found at the LuaForge page.
+
+History
+
+Version 1.1.0 [05/Jun/2006]
+
+        * adapted to work on both Lua 5.0 and Lua 5.1
+        * updated to Expat 2.0.0 
+
+Version 1.0.2 [23/Mar/2006]
+
+        * minor bugfix, lom correct module name is lxp.lom 
+
+Version 1.0.1 [06/Jun/2005]
+
+        * minor changes for compatibility with Expat version 1.95.8 
+
+Version 1.0 [2/Dec/2004]
+Version 1.0 Beta [4/Apr/2004]
+Version 1.0 Alpha [10/Dec/2003]
+
+References
+
+LuaExpat uses the Expat library. For details on the C API please refer to the article "Using Expat".
+LuaExpat implements the SAX API.
+
+Credits
+
+Version 1.0 was designed by Roberto Ierusalimschy, André Carregal and Tomás Guisasola
+as part of the Kepler Project which holds its copyright. The implementation was coded
+by Roberto Ierusalimschy, based on a previous design by Jay Carlson.
+
+LuaExpat development was sponsored by Fábrica Digital and FINEP.
+
+Contact
+
+For more information please contact us (info at keplerproject dot org). Comments are welcome!
+You can also reach other Kepler developers and users on the Kepler Project mailing list.
+
+$Id: README,v 1.2 2007/06/05 20:03:12 carregal Exp $
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/config	Wed Jun 01 22:14:25 2011 +0100
@@ -0,0 +1,36 @@
+# Installation directories
+# System's libraries directory (where binary libraries are installed)
+LUA_LIBDIR= /usr/local/lib/lua/5.0
+# System's lua directory (where Lua libraries are installed)
+LUA_DIR= /usr/local/share/lua/5.0
+# Lua includes directory
+LUA_INC= /usr/local/include
+# Expat includes directory
+EXPAT_INC= /usr/local/include
+
+# OS dependent
+LIB_OPTION= -shared #for Linux
+#LIB_OPTION= -bundle -undefined dynamic_lookup #for MacOS X
+
+LIBNAME= $T.so.$V
+# Lua version number
+# (according to Lua 5.1 definition:
+# first version digit * 100 + second version digit
+# e.g. Lua 5.0.2 => 500, Lua 5.1 => 501, Lua 5.1.1 => 501)
+LUA_VERSION_NUM= 500
+COMPAT_DIR= ../compat/src
+
+# Compilation parameters
+CWARNS = -Wall -pedantic \
+        -Waggregate-return \
+        -Wcast-align \
+        -Wmissing-prototypes \
+        -Wstrict-prototypes \
+        -Wnested-externs \
+        -Wpointer-arith \
+        -Wshadow \
+        -Wwrite-strings
+
+CFLAGS = $(CWARNS) -ansi -O2 -I$(LUA_INC) \
+   -I$(COMPAT_DIR) -I$(EXPAT_INC)
+CC = gcc
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/debian/Makefile.Debian.conf	Wed Jun 01 22:14:25 2011 +0100
@@ -0,0 +1,20 @@
+PKG_NAME=expat
+
+### things relative to the C library part
+CLIB_CFLAGS= -I src/
+CLIB_LDFLAGS= -lexpat
+CLIB_OBJS= src/lxplib.lo
+VERSION_INFO=0:0:0
+
+### things relative to the lua library part
+LUA_HEADER=src/lxplib.h
+LUA_SOURCES=src/lxp
+LUA_MODNAME=lxp
+LUA_TEST=/usr/bin/shake tests/test.lua
+
+### this part is relative to pkg-config
+PKG_VERSION=$(shell dpkg-parsechangelog|grep ^Ver|cut -d ' ' -f 2|cut -d '-' -f 1)
+PKG_LIBS_PRIVATE=
+PKG_URL=http://luaforge.net/projects/luaexpat/
+PKG_REQUIRES=
+PKG_CONFLICTS=
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/debian/changelog	Wed Jun 01 22:14:25 2011 +0100
@@ -0,0 +1,60 @@
+lua-expat (1.1.0-3) unstable; urgency=low
+
+  * depend on lua5.1-policy-dev >= 22
+  * changed lua to Lua in the package description
+  * bumped standards-version to 3.8.2, no changes needed 
+
+ -- Enrico Tassi <gareuselesinge@debian.org>  Tue, 21 Jul 2009 12:48:09 +0200
+
+lua-expat (1.1.0-2) unstable; urgency=low
+
+  * Renamed cdbs deprecated variable
+  * Vcs- fields fixed
+  * Use shake to run compilation tests
+  * Added Homepage control field
+  * Removed dpatch build dependency
+  * Moved -dev package in section libdevel
+
+ -- Enrico Tassi <gareuselesinge@debian.org>  Tue, 18 Mar 2008 17:12:50 +0100
+
+lua-expat (1.1.0-1) unstable; urgency=low
+
+  * new upstream release, works out of the box with lua5.1
+
+ -- Enrico Tassi <gareuselesinge@debian.org>  Fri, 08 Jun 2007 18:42:44 +0200
+
+lua-expat (1.0.2-5) unstable; urgency=low
+
+  * Updated to policy 10 that fixes clean target (Closes: #424551)
+
+ -- Enrico Tassi <gareuselesinge@debian.org>  Wed, 16 May 2007 16:20:50 +0200
+
+lua-expat (1.0.2-4) unstable; urgency=low
+
+  * made control file binNMU safe
+  * Added a note about the documentation shipped within the -dev package
+    in the control file
+  * Added call to lua5.1-policy-apply --reverse in the clean:: hook
+
+ -- Enrico Tassi <gareuselesinge@debian.org>  Mon,  8 Jan 2007 17:32:37 +0100
+
+lua-expat (1.0.2-3) unstable; urgency=low
+
+  * Moved to policy version 7 
+  * The FTBFS bug #405990 is because of an incompatibility with the policy 
+    version 7 that is not in etch. This incompatibility has been fixed
+    (Closes: #405990)
+
+ -- Enrico Tassi <gareuselesinge@debian.org>  Mon,  8 Jan 2007 17:30:34 +0100
+
+lua-expat (1.0.2-2) unstable; urgency=low
+
+  * added XS-X-Vcs-svn field to control.
+
+ -- Enrico Tassi <gareuselesinge@debian.org>  Sun,  3 Sep 2006 10:26:13 +0200
+
+lua-expat (1.0.2-1) unstable; urgency=low
+
+  * Initial release. (Closes: #384350)
+
+ -- Enrico Tassi <gareuselesinge@debian.org>  Wed, 23 Aug 2006 20:12:16 +0200
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/debian/control	Wed Jun 01 22:14:25 2011 +0100
@@ -0,0 +1,25 @@
+Source: lua-expat
+Section: interpreters
+Priority: optional
+Maintainer: Enrico Tassi <gareuselesinge@debian.org>
+Build-Depends: cdbs (>= 0.4.23-1.1), debhelper (>= 5), lua5.1-policy-dev (>= 22), libexpat1-dev, shake
+Standards-Version: 3.8.2
+Vcs-Svn: svn://svn.debian.org/pkg-lua/packages/lua-expat
+Vcs-Browser: http://svn.debian.org/viewsvn/pkg-lua/packages/lua-expat
+Homepage: http://www.keplerproject.org/luaexpat/
+
+Package: liblua5.1-expat0
+Architecture: any
+Depends: ${shlibs:Depends}
+Description: libexpat bindings for the Lua language version 5.1
+ This package contains the bindings for the expat library.
+
+Package: liblua5.1-expat-dev
+Architecture: any
+Depends: liblua5.1-expat0 (= ${binary:Version})
+Section: libdevel
+Description: libexpat development files for the Lua language version 5.1
+ This package contains the development files of the libexpat lua5.1 bindings,
+ useful to create a statically linked binary (like a C application or a
+ standalone Lua interpreter).
+ Documentation is also shipped within this package.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/debian/copyright	Wed Jun 01 22:14:25 2011 +0100
@@ -0,0 +1,26 @@
+This package was debianized by Enrico Tassi <gareuselesinge@debian.org>
+Thu Aug 21 12:39:13 CEST 2006.
+
+It was downloaded from http://luaforge.net/projects/luaexpat/.
+
+
+Copyright © 2003-2006 The Kepler Project.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
+of the Software, and to permit persons to whom the Software is furnished to do
+so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/debian/liblua5.1-expat-dev.docs	Wed Jun 01 22:14:25 2011 +0100
@@ -0,0 +1,1 @@
+doc/us
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/debian/patches/00dpatch.conf	Wed Jun 01 22:14:25 2011 +0100
@@ -0,0 +1,2 @@
+conf_debianonly=1
+conf_origtargzpath=../tarballs/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/debian/rules	Wed Jun 01 22:14:25 2011 +0100
@@ -0,0 +1,3 @@
+#!/usr/bin/make -f
+
+include /usr/share/cdbs/1/class/lua.mk
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/debian/watch	Wed Jun 01 22:14:25 2011 +0100
@@ -0,0 +1,6 @@
+# test this watch file using:
+# uscan --watchfile debian/watch --upstream-version 0.0.1 --package luaexpat
+#
+version=3
+http://luaforge.net/frs/?group_id=13 \
+	/frs/download.php/\d+/luaexpat-([\d\.]*).tar.gz
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/doc/us/examples.html	Wed Jun 01 22:14:25 2011 +0100
@@ -0,0 +1,201 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html>
+<head>
+	<title>LuaExpat: XML Expat parsing for the Lua programming language</title>
+    <link rel="stylesheet" href="http://www.keplerproject.org/doc.css" type="text/css"/>
+	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+</head>
+<body>
+
+<div id="container">
+	
+<div id="product">
+	<div id="product_logo"><a href="http://www.keplerproject.org">
+        <img alt="LuaExpat logo" src="luaexpat.png"/>
+	</a></div>
+	<div id="product_name"><big><strong>LuaExpat</strong></big></div>
+	<div id="product_description">XML Expat parsing for the Lua programming language</div>
+</div> <!-- id="product" -->
+
+<div id="main">
+
+<div id="navigation">
+<h1>LuaExpat</h1>
+	<ul>
+		<li><a href="index.html">Home</a>
+			<ul>
+				<li><a href="index.html#overview">Overview</a></li>
+				<li><a href="index.html#status">Status</a></li>
+				<li><a href="index.html#download">Download</a></li>
+				<li><a href="index.html#history">History</a></li>
+				<li><a href="index.html#references">References</a></li>
+				<li><a href="index.html#credits">Credits</a></li>
+				<li><a href="index.html#contact">Contact</a></li>
+			</ul>
+		</li>
+		<li><a href="manual.html">Manual</a>
+			<ul>
+				<li><a href="manual.html#introduction">Introduction</a></li>
+				<li><a href="manual.html#installation">Installation</a></li>
+				<li><a href="manual.html#parser">Parser Objects</a></li>
+			</ul>
+		</li>
+		<li><strong>Examples</strong></li>
+		<li><a href="lom.html">Lua Object Model</a></li>
+        <li><a href="http://luaforge.net/projects/luaexpat/">Project</a>
+            <ul>
+                <li><a href="http://luaforge.net/tracker/?group_id=13">Bug Tracker</a></li>
+                <li><a href="http://luaforge.net/scm/?group_id=13">CVS</a></li>
+            </ul>
+        </li>
+		<li><a href="license.html">License</a></li>
+	</ul>
+</div> <!-- id="navigation" -->
+
+<div id="content">
+
+<h2><a name="examples"></a>Examples</h2>
+
+<p>The code excerpt below creates a parser with 2 callbacks and
+feeds a test string to it. The parsing of the test string triggers
+the callbacks, printing the results.</p>
+
+<pre class="example">
+require"lxp"
+
+local count = 0
+callbacks = {
+    StartElement = function (parser, name)
+        io.write("+ ", string.rep(" ", count), name, "\n")
+        count = count + 1
+    end,
+    EndElement = function (parser, name)
+        count = count - 1
+        io.write("- ", string.rep(" ", count), name, "\n")
+    end
+}
+
+p = lxp.new(callbacks)
+
+for l in io.lines() do  -- iterate lines
+    p:parse(l)          -- parses the line
+    p:parse("\n")       -- parses the end of line
+end
+p:parse()               -- finishes the document
+p:close()               -- closes the parser
+</pre>
+
+<p>For a test string like</p>
+
+<pre class="example">
+&lt;elem1&gt;
+    text
+    &lt;elem2/&gt;
+    more text
+&lt;/elem1&gt;
+</pre>
+
+<p>The example would print</p>
+
+<pre class="example">
++ elem1
+    + elem2
+    - elem2
+- elem1
+</pre>
+
+<p>Note that the text parts are not handled since the corresponding
+callback (<em>CharacterData</em>) has not been defined. Also note
+that defining this callback after the call to lxp.new would make no
+difference. But had the callback table been defined as</p>
+
+<pre class="example">
+callbacks = {
+    StartElement = function (parser, name)
+        io.write("+ ", string.rep(" ", count), name, "\n")
+        count = count + 1
+    end,
+    EndElement = function (parser, name)
+        count = count - 1
+        io.write("- ", string.rep(" ", count), name, "\n")
+    end,
+    CharacterData = function (parser, string)
+        io.write("* ", string.rep(" ", count), string, "\n")
+    end
+}
+</pre>
+
+<p>The results would have been</p>
+
+<pre class="example">
++ elem1
+* text
+    + elem2
+    - elem2
+* more text
+- elem1
+</pre>
+
+<p>Another example would be the use of <em>false</em> as a
+placeholder for the callback. Suppose that we would like to print
+only the text associated with <em>elem2</em> elements and that the
+XML sample is</p>
+
+<pre class="example">
+ &lt;elem1&gt;
+    text
+    &lt;elem2&gt;
+        inside text
+    &lt;/elem2&gt;
+    more text
+&lt;/elem1&gt;
+</pre>
+
+<p>We could define the new callback table as</p>
+
+<pre class="example">
+callbacks = {
+    StartElement = function (parser, name)
+      if name == "elem2" then
+        -- redefines CharacterData behaviour
+        callbacks.CharacterData = function (parser, string)
+          io.write(string, "\n")
+        end
+      end
+    end,
+
+    EndElement = function (parser, name)
+      if name == "elem2" then
+        callbacks.CharacterData = false -- restores placeholder
+      end
+    end,
+
+    CharacterData = false               -- placeholder
+}
+</pre>
+
+<p>The results would have been</p>
+
+<pre class="example">
+inside text
+</pre>
+
+<p>Note that this example assumes no other elements are present
+inside elem2 tags.</p>
+
+</div> <!-- id="content" -->
+
+</div> <!-- id="main" -->
+
+<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: examples.html,v 1.5 2006/03/23 00:19:37 carregal Exp $
+	</small></p>
+</div> <!-- id="about" -->
+
+</div> <!-- id="container" -->
+
+</body>
+</html> 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/doc/us/index.html	Wed Jun 01 22:14:25 2011 +0100
@@ -0,0 +1,157 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html>
+<head>
+	<title>LuaExpat: XML Expat parsing for the Lua programming language</title>
+    <link rel="stylesheet" href="http://www.keplerproject.org/doc.css" type="text/css"/>
+	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+</head>
+<body>
+
+<div id="container">
+	
+<div id="product">
+	<div id="product_logo">
+        <a href="http://www.keplerproject.org"><img alt="LuaExpat logo" src="luaexpat.png"/></a>
+    </div>
+	<div id="product_name"><big><strong>LuaExpat</strong></big></div>
+	<div id="product_description">XML Expat parsing for the Lua programming language</div>
+</div> <!-- id="product" -->
+
+<div id="main">
+
+<div id="navigation">
+<h1>LuaExpat</h1>
+	<ul>
+		<li><strong>Home</strong>
+			<ul>
+				<li><a href="index.html#overview">Overview</a></li>
+				<li><a href="index.html#status">Status</a></li>
+				<li><a href="index.html#download">Download</a></li>
+				<li><a href="index.html#history">History</a></li>
+				<li><a href="index.html#references">References</a></li>
+				<li><a href="index.html#credits">Credits</a></li>
+				<li><a href="index.html#contact">Contact</a></li>
+			</ul>
+		</li>
+		<li><a href="manual.html">Manual</a>
+			<ul>
+				<li><a href="manual.html#introduction">Introduction</a></li>
+				<li><a href="manual.html#building">Building</a></li>
+				<li><a href="manual.html#installation">Installation</a></li>
+				<li><a href="manual.html#parser">Parser Objects</a></li>
+			</ul>
+		</li>
+		<li><a href="examples.html">Examples</a></li>
+		<li><a href="lom.html">Lua Object Model</a></li>
+        <li><a href="http://luaforge.net/projects/luaexpat/">Project</a>
+            <ul>
+                <li><a href="http://luaforge.net/tracker/?group_id=13">Bug Tracker</a></li>
+                <li><a href="http://luaforge.net/scm/?group_id=13">CVS</a></li>
+            </ul>
+        </li>
+		<li><a href="license.html">License</a></li>
+	</ul>
+</div> <!-- id="navigation" -->
+
+<div id="content">
+
+<h2><a name="overview"></a>Overview</h2>
+
+<p>LuaExpat is a <a href="http://www.saxproject.org/">SAX</a> XML parser based on the
+<a href="http://www.libexpat.org/">Expat</a> library.</p>
+
+<p>LuaExpat is free software and uses the same <a href="license.html">license</a>
+as Lua 5.1.</p>
+
+<h2><a name="status"></a>Status</h2>
+
+<p>Current version is 1.1.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>
+
+<h2><a name="download"></a>Download</h2>
+
+<p>LuaExpat source can be downloaded from its
+<a href="http://luaforge.net/projects/luaexpat/files">LuaForge</a>
+page. If you are using <a href="http://luabinaries.luaforge.net">LuaBinaries</a>
+a Windows binary version of LuaExpat can be found at the LuaForge page.</p>
+
+<h2><a name="history"></a>History</h2>
+
+<dl class="history">
+    <dt><strong>Version 1.1.0</strong> [05/Jun/2007]</dt>
+    <dd>
+      <ul>
+        <li>adapted to work on both Lua 5.0 and Lua 5.1</li>
+        <li>updated to use Expat 2.0.0</li>
+      </ul>
+    </dd>
+
+    <dt><strong><a href="http://www.keplerproject.org/luaexpat/1.0">Version 1.0.2</a></strong> [23/Mar/2006]</dt>
+    <dd>
+      <ul>
+        <li>minor bugfix, <code>lom</code> correct module name is <code>lxp.lom</code></li>
+      </ul>
+    </dd>
+
+    <dt><strong>Version 1.0.1</strong> [06/Jun/2005]</dt>
+    <dd>
+      <ul>
+        <li>minor changes for compatibility with Expat version 1.95.8</li>
+      </ul>
+    </dd>
+
+    <dt><strong>Version 1.0</strong> [2/Dec/2004]</dt>
+    <dd />
+
+    <dt><strong>Version 1.0 Beta</strong> [4/Apr/2004]</dt>
+    <dd />
+
+    <dt><strong>Version 1.0 Alpha</strong> [10/Dec/2003]</dt>
+    <dd />
+</dl>
+
+<h2><a name="references"></a>References</h2>
+
+<p>LuaExpat uses the
+<a href="http://www.libexpat.org/">Expat</a> library.
+For details on the C API please refer to the article
+<a href="http://www.xml.com/pub/a/1999/09/expat/index.html?page=1">"Using Expat"</a>.</p>
+
+<p>LuaExpat implements the <a href="http://www.saxproject.org/">SAX</a> API.</p>
+
+<h2><a name="credits"></a>Credits</h2>
+
+<p>Version 1.0 was designed by Roberto Ierusalimschy, Andr&eacute;
+Carregal and Tom&aacute;s Guisasola as part of the Kepler Project
+which holds its copyright. The implementation was coded by
+Roberto Ierusalimschy, based on a previous design by
+<a href="http://www.place.org/~nop/lua">Jay Carlson</a>.</p>
+
+<p>LuaExpat development was sponsored by
+<a href="http://www.fabricadigital.com.br">F&aacute;brica Digital</a> and
+FINEP.</p>
+
+<h2><a name="contact"></a>Contact</h2>
+
+<p>For more information please
+<a href="mailto:info-NO-SPAM-THANKS@keplerproject.org">contact us</a>.
+Comments are welcome!</p>
+
+<p>You can also reach other Kepler developers and users on the Kepler Project
+<a href="http://luaforge.net/mail/?group_id=104">mailing list</a>.</p>
+
+</div> <!-- id="content" -->
+
+</div> <!-- id="main" -->
+
+<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" -->
+
+</body>
+</html> 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/doc/us/license.html	Wed Jun 01 22:14:25 2011 +0100
@@ -0,0 +1,120 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html>
+<head>
+	<title>LuaExpat: XML Expat parsing for the Lua programming language</title>
+    <link rel="stylesheet" href="http://www.keplerproject.org/doc.css" type="text/css"/>
+	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+</head>
+<body>
+
+<div id="container">
+	
+<div id="product">
+	<div id="product_logo"><a href="http://www.keplerproject.org">
+        <img alt="LuaExpat logo" src="luaexpat.png"/>
+	</a></div>
+	<div id="product_name"><big><strong>LuaExpat</strong></big></div>
+	<div id="product_description">XML Expat parsing for the Lua programming language</div>
+</div> <!-- id="product" -->
+
+<div id="main">
+
+<div id="navigation">
+<h1>LuaExpat</h1>
+	<ul>
+		<li><a href="index.html">Home</a>
+			<ul>
+				<li><a href="index.html#overview">Overview</a></li>
+				<li><a href="index.html#status">Status</a></li>
+				<li><a href="index.html#download">Download</a></li>
+				<li><a href="index.html#history">History</a></li>
+				<li><a href="index.html#references">References</a></li>
+				<li><a href="index.html#credits">Credits</a></li>
+				<li><a href="index.html#contact">Contact</a></li>
+			</ul>
+		</li>
+		<li><a href="manual.html">Manual</a>
+			<ul>
+				<li><a href="manual.html#introduction">Introduction</a></li>
+				<li><a href="manual.html#installation">Installation</a></li>
+				<li><a href="manual.html#parser">Parser Objects</a></li>
+			</ul>
+		</li>
+		<li><a href="examples.html">Examples</a></li>
+		<li><a href="lom.html">Lua Object Model</a></li>
+        <li><a href="http://luaforge.net/projects/luaexpat/">Project</a>
+            <ul>
+                <li><a href="http://luaforge.net/tracker/?group_id=13">Bug Tracker</a></li>
+                <li><a href="http://luaforge.net/scm/?group_id=13">CVS</a></li>
+            </ul>
+        </li>
+		<li><strong>License</strong></li>
+	</ul>
+</div> <!-- id="navigation" -->
+
+<div id="content">
+
+<h2>License</h2>
+
+<p>
+LuaExpat is free software: it can be used for both academic and
+commercial purposes at absolutely no cost. There are no royalties
+or GNU-like "copyleft" restrictions. LuaExpat qualifies as <a href=
+"http://www.opensource.org/docs/definition.html">Open Source</a>
+software. Its licenses are compatible with <a href=
+"http://www.gnu.org/licenses/gpl.html">GPL</a>. LuaExpat is not in
+the public domain and the
+<a href="http://www.keplerproject.org">Kepler Project</a>
+keep its copyright. The legal details are below.
+</p>
+
+<p>The spirit of the license is that you are free to use LuaExpat
+for any purpose at no cost without having to ask us. The only
+requirement is that if you do use LuaExpat, then you should give us
+credit by including the appropriate copyright notice somewhere in
+your product or its documentation.</p>
+
+<p>The LuaExpat library is designed and implemented by Roberto
+Ierusalimschy. The implementation is not derived from licensed
+software.</p>
+
+<hr/>
+<p>Copyright &copy; 2003-2007 The Kepler Project. 
+</p>
+
+<p>Permission is hereby granted, free of charge, to any person
+obtaining a copy of this software and associated documentation
+files (the "Software"), to deal in the Software without
+restriction, including without limitation the rights to use, copy,
+modify, merge, publish, distribute, sublicense, and/or sell copies
+of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:</p>
+
+<p>The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.</p>
+
+<p>THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.</p>
+
+</div> <!-- id="content" -->
+
+</div> <!-- id="main" -->
+
+<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: license.html,v 1.9 2007/06/05 20:03:12 carregal Exp $
+	</small></p>
+</div> <!-- id="about" -->
+
+</div> <!-- id="container" -->
+
+</body>
+</html> 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/doc/us/lom.html	Wed Jun 01 22:14:25 2011 +0100
@@ -0,0 +1,178 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html>
+<head>
+	<title>LuaExpat: XML Expat parsing for the Lua programming language</title>
+    <link rel="stylesheet" href="http://www.keplerproject.org/doc.css" type="text/css"/>
+	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+</head>
+<body>
+
+<div id="container">
+	
+<div id="product">
+	<div id="product_logo"><a href="http://www.keplerproject.org">
+        <img alt="LuaExpat logo" src="luaexpat.png"/>
+	</a></div>
+	<div id="product_name"><big><strong>LuaExpat</strong></big></div>
+	<div id="product_description">XML Expat parsing for the Lua programming language</div>
+</div> <!-- id="product" -->
+
+<div id="main">
+
+<div id="navigation">
+<h1>LuaExpat</h1>
+	<ul>
+		<li><a href="index.html">Home</a>
+			<ul>
+				<li><a href="index.html#overview">Overview</a></li>
+				<li><a href="index.html#status">Status</a></li>
+				<li><a href="index.html#download">Download</a></li>
+				<li><a href="index.html#history">History</a></li>
+				<li><a href="index.html#references">References</a></li>
+				<li><a href="index.html#credits">Credits</a></li>
+				<li><a href="index.html#contact">Contact</a></li>
+			</ul>
+		</li>
+		<li><a href="manual.html">Manual</a>
+			<ul>
+				<li><a href="manual.html#introduction">Introduction</a></li>
+				<li><a href="manual.html#installation">Installation</a></li>
+				<li><a href="manual.html#parser">Parser Objects</a></li>
+			</ul>
+		</li>
+		<li><a href="examples.html">Examples</a></li>
+		<li><strong>Lua Object Model</strong></li>
+        <li><a href="http://luaforge.net/projects/luaexpat/">Project</a>
+            <ul>
+                <li><a href="http://luaforge.net/tracker/?group_id=13">Bug Tracker</a></li>
+                <li><a href="http://luaforge.net/scm/?group_id=13">CVS</a></li>
+            </ul>
+        </li>
+		<li><a href="license.html">License</a></li>
+	</ul>
+</div> <!-- id="navigation" -->
+
+<div id="content">
+
+<h2><a name="introduction"></a>Introduction</h2>
+
+<p>Lua Object Model (LOM) is a representation of XML elements
+through Lua data types. Currently it is not supposed to be 100%
+complete, but simple.</p>
+
+<p>LuaExpat's distribution provides an implementation of LOM that
+gets an XML documenta (a string) and transforms it to a Lua table.
+The only function exported is <strong><code>lxp.lom.parse</code></strong>.</p>
+
+ 
+<h2><a name="characteristics"></a>Characteristics</h2>
+
+<p>The model represents each XML element as a Lua table. A LOM
+table has three special characteristics:</p>
+
+<ul>
+    <li>a special field called <strong><code>tag</code></strong> that holds the
+    element's name;</li>
+
+    <li>an optional field called <strong><code>attr</code></strong> that stores
+    the element's attributes (see <a href="#attributes">attribute's
+    section</a>); and</li>
+    
+    <li>the element's children are stored at the <em>array-part</em> of
+    the table. A child could be an ordinary string or another XML
+    element that will be represented by a Lua table following these
+    same rules.</li>
+</ul>
+
+
+<h3><a name="attributes"></a>Attributes</h3>
+
+<p>The special field <strong><code>attr</code></strong> is a Lua table that
+stores the XML element's attributes as pairs
+<em>&lt;key&gt;=&lt;value&gt;</em>. To assure an order (if
+necessary), the sequence of <em>key</em>s could be placed at the
+<em>array-part</em> of this same table.</p>
+
+
+<h2><a name="examples"></a>Examples</h2>
+
+<p>For a simple string like</p>
+
+<pre class="example">
+    s = [[&lt;abc a1="A1" a2="A2"&gt;inside tag `abc'&lt;/abc&gt;]]
+</pre>
+
+<p>A call like</p>
+
+<pre class="example">
+    tab = lxp.lom.parse (s))
+</pre>
+
+<p>Would result in a table equivalent to</p>
+
+<pre class="example">
+tab = {
+        ["attr"] = {
+                [1] = "a1",
+                [2] = "a2",
+                ["a2"] = "A2",
+                ["a1"] = "A1",
+        },
+        [1] = "inside tag `abc'",
+        ["tag"] = "abc",
+}
+</pre>
+
+<p>Now an example with an element nested inside another element</p>
+
+<pre class="example">
+tab = lxp.lom.parse(
+[[&lt;qwerty q1="q1" q2="q2"&gt;
+    &lt;asdf&gt;some text&lt;/asdf&gt;
+&lt;/qwerty&gt;]]
+)
+</pre>
+
+<p>The result would have been a table equivalent to</p>
+
+<pre class="example">
+tab = {
+        [1] = "\
+        ",
+        [2] = {
+                ["attr"] = {
+                },
+                [1] = "some text",
+                ["tag"] = "asdf",
+        },
+        ["attr"] = {
+                [1] = "q1",
+                [2] = "q2",
+                ["q2"] = "q2",
+                ["q1"] = "q1",
+        },
+        [3] = "\
+",
+        ["tag"] = "qwerty",
+}
+</pre>
+
+<p>Note that even the <em>new-line</em> and <em>tab</em> characters are stored 
+on the table.</p>
+
+</div> <!-- id="content" -->
+
+</div> <!-- id="main" -->
+
+<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: lom.html,v 1.6 2006/03/20 22:26:00 carregal Exp $
+	</small></p>
+</div> <!-- id="about" -->
+
+</div> <!-- id="container" -->
+
+</body>
+</html> 
Binary file doc/us/luaexpat.png has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/doc/us/manual.html	Wed Jun 01 22:14:25 2011 +0100
@@ -0,0 +1,363 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html>
+<head>
+	<title>LuaExpat: XML Expat parsing for the Lua programming language</title>
+    <link rel="stylesheet" href="http://www.keplerproject.org/doc.css" type="text/css"/>
+	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+</head>
+<body>
+
+<div id="container">
+	
+<div id="product">
+	<div id="product_logo"><a href="http://www.keplerproject.org">
+        <img alt="LuaExpat logo" src="luaexpat.png"/>
+	</a></div>
+	<div id="product_name"><big><strong>LuaExpat</strong></big></div>
+	<div id="product_description">XML Expat parsing for the Lua programming language</div>
+</div> <!-- id="product" -->
+
+<div id="main">
+
+<div id="navigation">
+<h1>LuaExpat</h1>
+	<ul>
+		<li><a href="index.html">Home</a>
+			<ul>
+				<li><a href="index.html#overview">Overview</a></li>
+				<li><a href="index.html#status">Status</a></li>
+				<li><a href="index.html#download">Download</a></li>
+				<li><a href="index.html#history">History</a></li>
+				<li><a href="index.html#references">References</a></li>
+				<li><a href="index.html#credits">Credits</a></li>
+				<li><a href="index.html#contact">Contact</a></li>
+			</ul>
+		</li>
+		<li><strong>Manual</strong>
+			<ul>
+				<li><a href="manual.html#introduction">Introduction</a></li>
+				<li><a href="manual.html#installation">Installation</a></li>
+				<li><a href="manual.html#parser">Parser Objects</a></li>
+			</ul>
+		</li>
+		<li><a href="examples.html">Examples</a></li>
+		<li><a href="lom.html">Lua Object Model</a></li>
+        <li><a href="http://luaforge.net/projects/luaexpat/">Project</a>
+            <ul>
+                <li><a href="http://luaforge.net/tracker/?group_id=13">Bug Tracker</a></li>
+                <li><a href="http://luaforge.net/scm/?group_id=13">CVS</a></li>
+            </ul>
+        </li>
+		<li><a href="license.html">License</a></li>
+	</ul>
+</div> <!-- id="navigation" -->
+
+<div id="content">
+
+<h2><a name="introduction"></a>Introduction</h2>
+
+<p>LuaExpat is a <a href="http://www.saxproject.org/">SAX</a> XML
+parser based on the <a href="http://www.libexpat.org/">Expat</a> library.
+SAX is the <em>Simple API for XML</em> and allows programs to:
+</p>
+
+<ul>
+    <li>process a XML document incrementally, thus being able to handle
+    huge documents without memory penalties;</li>
+    
+    <li>register handler functions which are called by the parser during
+    the processing of the document, handling the document elements or
+    text.</li>
+</ul>
+
+<p>With an event-based API like SAX the XML document can be fed to
+the parser in chunks, and the parsing begins as soon as the parser
+receives the first document chunk. LuaExpat reports parsing events
+(such as the start and end of elements) directly to the application
+through callbacks. The parsing of huge documents can benefit from
+this piecemeal operation.</p>
+
+<p>LuaExpat is distributed as a library and a file <code>lom.lua</code> that
+implements the <a href="lom.html">Lua Object Model</a>.</p>
+
+
+<h2><a name="building"></a>Building</h2>
+
+<p>
+LuaExpat could be built to Lua 5.0 or to Lua 5.1.
+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.
+</p>
+<p>
+LuaExpat offers a Makefile and a separate configuration file,
+<code>config</code>,
+which should be edited to suit the particularities of the target platform
+before running
+<code>make</code>.
+The file has some definitions like paths to the external libraries,
+compiler options and the like.
+One important definition is the version of Lua language,
+which is not obtained from the installed software.
+</p>
+
+
+<h2><a name="installation"></a>Installation</h2>
+
+<p>The compiled binary file should be copied to a directory in your
+<a href="http://www.lua.org/manual/5.1/manual.html#pdf-package.cpath">C path</a>.
+Lua 5.0 users should also install
+<a href="http://www.keplerproject.org/compat">Compat-5.1</a>.</p>
+
+<p>Windows users can use the binary version of LuaExpat (<code>lxp.dll</code>, compatible with
+<a href="http://luabinaries.luaforge.net">LuaBinaries</a>) available at
+<a href="http://luaforge.net/projects/luaexpat/files">LuaForge</a>.</p>
+
+<p>The file <code>lom.lua</code> should be copied to a directory in your
+<a href="http://www.lua.org/manual/5.1/manual.html#pdf-package.path">Lua path</a>.</p>
+
+<h2><a name="parser"></a>Parser objects</h2>
+
+<p>Usually SAX implementations base all operations on the
+concept of a parser that allows the registration of callback
+functions. LuaExpat offers the same functionality but uses a
+different registration method, based on a table of callbacks. This
+table contains references to the callback functions which are
+responsible for the handling of the document parts. The parser will
+assume no behaviour for any undeclared callbacks.</p>
+
+<h4>Constructor</h4>
+
+<dl class="reference">
+    <dt><strong>lxp.new(<em>callbacks [, separator]</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>
+</dl>
+
+<h4>Methods</h4>
+
+<dl class="reference">
+    <dt><strong>parser:close()</strong></dt>
+    <dd>Closes the parser, freeing all memory used by it. A call to
+    parser:close() without a previous call to parser:parse() could
+    result in an error.</dd>
+   
+    <dt><strong>parser:getbase()</strong></dt>
+    <dd>Returns the base for resolving relative URIs.</dd>
+    
+    <dt><strong>parser:getcallbacks()</strong></dt>
+    <dd>Returns the callbacks table.</dd>
+    
+    <dt><strong>parser:parse(s)</strong></dt>
+    <dd>Parse some more of the document. The string <em>s</em> contains
+    part (or perhaps all) of the document. When called without
+    arguments the document is closed (but the parser still has to be
+    closed).<br/>
+    The function returns a non nil value when the parser has been
+    succesfull, and when the parser finds an error it returns five
+    results: nil, <em>msg</em>, <em>line</em>, <em>col</em>, and
+    <em>pos</em>, which are the error message, the line number,
+    column number and absolute position of the error in the XML document.</dd>
+
+    <dt><strong>parser:pos()</strong></dt>
+    <dd>Returns three results: the current parsing line, column, and
+    absolute position.</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>
+
+    <dt><strong>parser:setencoding(encoding)</strong></dt>
+    <dd>Set the encoding to be used by the parser. There are four
+    built-in encodings, passed as strings: "US-ASCII",
+    "UTF-8", "UTF-16", and "ISO-8859-1".</dd>
+</dl>
+
+<h4>Callbacks</h4>
+
+<p>The Lua callbacks define the handlers of the parser events. The
+use of a table in the parser constructor has some advantages over
+the registration of callbacks, since there is no need for for the API
+to provide a way to manipulate callbacks.</p>
+
+<p>Another difference lies in the behaviour of the callbacks during
+the parsing itself. The callback table contains references to the
+functions that can be redefined at will. The only restriction is
+that only the callbacks present in the table at creation time
+will be called.</p>
+
+<p>The callbacks table indices are named after the equivalent Expat
+callbacks:<br />
+<em>CharacterData</em>, <em>Comment</em>,
+<em>Default</em>, <em>DefaultExpand</em>, <em>EndCDataSection</em>,
+<em>EndElement</em>, <em>EndNamespaceDecl</em>,
+<em>ExternalEntityRef</em>, <em>NotStandalone</em>,
+<em>NotationDecl</em>, <em>ProcessingInstruction</em>,
+<em>StartCDataSection</em>, <em>StartElement</em>,
+<em>StartNamespaceDecl</em>, and <em>UnparsedEntityDecl</em>.</p>
+
+<p>These indices can be references to functions with
+specific signatures, as seen below. The parser constructor also
+checks the presence of a field called <em>_nonstrict</em> in the
+callbacks table. If <em>_nonstrict</em> is absent, only valid
+callback names are accepted as indices in the table
+(Defaultexpanded would be considered an error for example). If
+<em>_nonstrict</em> is defined, any other fieldnames can be
+used (even if not called at all).</p>
+
+<p>The callbacks can optionally be defined as <code>false</code>,
+acting thus as placeholders for future assignment of functions.</p>
+
+<p>Every callback function receives as the first parameter the
+calling parser itself, thus allowing the same functions to be used
+for more than one parser for example.</p>
+
+<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>
+
+    <dt><strong>callbacks.Comment = function(parser, string)</strong></dt>
+    <dd>Called when the <em>parser</em> recognizes an XML comment
+    <em>string</em>.</dd>
+    
+    <dt><strong>callbacks.Default = function(parser, string)</strong></dt>
+    <dd>Called when the <em>parser</em> has a <em>string</em>
+    corresponding to any characters in the document which wouldn't
+    otherwise be handled. Using this handler has the side effect of
+    turning off expansion of references to internally defined general
+    entities. Instead these references are passed to the default
+    handler.</dd>
+
+    <dt><strong>callbacks.DefaultExpand = function(parser, string)</strong></dt>
+    <dd>Called when the <em>parser</em> has a <em>string</em>
+    corresponding to any characters in the document which wouldn't
+    otherwise be handled. Using this handler doesn't affect expansion
+    of internal entity references.</dd>
+
+    <dt><strong>callbacks.EndCdataSection = function(parser)</strong></dt>
+    <dd>Called when the <em>parser</em> detects the end of a CDATA
+    section.</dd>
+
+    <dt><strong>callbacks.EndElement = function(parser, elementName)</strong></dt>
+    <dd>Called when the <em>parser</em> detects the ending of an XML
+    element with <em>elementName</em>.</dd>
+
+    <dt><strong>callbacks.EndNamespaceDecl = function(parser, namespaceName)</strong></dt>
+    <dd>Called when the <em>parser</em> detects the ending of an XML
+    namespace with <em>namespaceName</em>. The handling of the end
+    namespace is done after the handling of the end tag for the element
+    the namespace is associated with.</dd>
+
+    <dt><strong>callbacks.ExternalEntityRef = function(parser, subparser, base, systemId, publicId)</strong></dt>
+    <dd>Called when the <em>parser</em> detects an external entity
+    reference.<br/><br/>
+    The <em>subparser</em> is a LuaExpat parser created with the
+    same callbacks and Expat context as the <em>parser</em> and should
+    be used to parse the external entity.<br/>
+    The <em>base</em> parameter is the base to use for relative
+    system identifiers. It is set by parser:setbase and may be nil.<br/>
+    The <em>systemId</em> parameter is the system identifier
+    specified in the entity declaration and is never nil.<br/>
+    The <em>publicId</em> parameter is the public id given in the
+    entity declaration and may be nil.</dd>
+
+    <dt><strong>callbacks.NotStandalone = function(parser)</strong></dt>
+    <dd>Called when the <em>parser</em> detects that the document is not
+    "standalone". This happens when there is an external subset or a
+    reference to a parameter entity, but the document does not have standalone set
+    to "yes" in an XML declaration.</dd>
+
+    <dt><strong>callbacks.NotationDecl = function(parser, notationName, base, systemId, publicId)</strong></dt>
+    <dd>Called when the <em>parser</em> detects XML notation
+    declarations with <em>notationName</em><br/>
+    The <em>base</em> parameter is the base to use for relative
+    system identifiers. It is set by parser:setbase and may be nil.<br/>
+    The <em>systemId</em> parameter is the system identifier
+    specified in the entity declaration and is never nil.<br/>
+    The <em>publicId</em> parameter is the public id given in the
+    entity declaration and may be nil.</dd>
+
+    <dt><strong>callbacks.ProcessingInstruction = function(parser, target, data)</strong></dt>
+    <dd>Called when the <em>parser</em> detects XML processing
+    instructions. The <em>target</em> is the first word in the
+    processing instruction. The <em>data</em> is the rest of the
+    characters in it after skipping all whitespace after the initial
+    word.</dd>
+
+    <dt><strong>callbacks.StartCdataSection = function(parser)</strong></dt>
+    <dd>Called when the <em>parser</em> detects the begining of an XML
+    CDATA section.</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/>
+    The <em>attributes</em> parameter is a Lua table with all the
+    element attribute names and values. The table contains an entry for
+    every attribute in the element start tag and entries for the
+    default attributes for that element.<br/>
+    The attributes are listed by name (including the inherited ones)
+    and by position (inherited attributes are not considered in the
+    position list).<br/>
+    As an example if the <em>book</em> element has attributes
+    <em>author</em>, <em>title</em> and an optional <em>format</em>
+    attribute (with "printed" as default value),
+<pre class="example">
+&lt;book author="Ierusalimschy, Roberto" title="Programming in Lua"&gt;
+</pre>
+    would be represented as<br/> 
+<pre class="example">
+{[1] = "Ierusalimschy, Roberto",
+ [2] = "Programming in Lua",
+ author = "Ierusalimschy, Roberto",
+ format = "printed",
+ title = "Programming in Lua"}
+</pre></dd>
+
+    <dt><strong>callbacks.StartNamespaceDecl = function(parser, namespaceName)</strong></dt>
+    <dd>Called when the <em>parser</em> detects an XML namespace
+    declaration with <em>namespaceName</em>. Namespace declarations
+    occur inside start tags, but the StartNamespaceDecl handler is
+    called before the StartElement handler for each namespace declared
+    in that start tag.</dd>
+
+    <dt><strong>callbacks.UnparsedEntityDecl = function(parser, entityName, base, systemId, publicId, notationName)</strong></dt>
+    <dd>Called when the <em>parser</em> receives declarations of
+    unparsed entities. These are entity declarations that have a
+    notation (NDATA) field.<br/>
+    As an example, in the chunk
+<pre class="example">
+&lt;!ENTITY logo SYSTEM "images/logo.gif" NDATA gif&gt;
+</pre>
+    <em>entityName</em> would be "logo", <em>systemId</em> would be
+    "images/logo.gif" and <em>notationName</em> would be "gif".
+    For this example the <em>publicId</em> parameter would be nil.
+    The <em>base</em> parameter would be whatever has been set with
+    <code>parser:setbase</code>. If not set, it would be nil.</dd>
+</dl>
+
+<h4><a name="separator"></a>The separator character</h4>
+
+<p>The optional separator character in the parser constructor
+defines the character used in the namespace expanded element names.
+The separator character is optional (if not defined the parser will
+not handle namespaces) but if defined it must be different from
+the character '\0'.</p>
+
+</div> <!-- id="content" -->
+
+</div> <!-- id="main" -->
+
+<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" -->
+
+</body>
+</html> 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/makefile	Wed Jun 01 22:14:25 2011 +0100
@@ -0,0 +1,30 @@
+T= lxp
+V= 1.1.0
+CONFIG= ./config
+
+include $(CONFIG)
+
+ifeq "$(LUA_VERSION_NUM)" "500"
+COMPAT_O= $(COMPAT_DIR)/compat-5.1.o
+endif
+
+OBJS= src/lxplib.o $(COMPAT_O)
+lib: src/$(LIBNAME)
+
+src/$(LIBNAME) : $(OBJS)
+	export MACOSX_DEPLOYMENT_TARGET="10.3"; $(CC) -o src/$(LIBNAME) $(LIB_OPTION) $(OBJS) -lexpat
+
+$(COMPAT_DIR)/compat-5.1.o: $(COMPAT_DIR)/compat-5.1.c
+	$(CC) -c $(CFLAGS) -o $@ $(COMPAT_DIR)/compat-5.1.c
+
+install:
+	mkdir -p $(LUA_LIBDIR)
+	cp src/$(LIBNAME) $(LUA_LIBDIR)
+	cd $(LUA_LIBDIR); ln -f -s $(LIBNAME) $T.so
+	mkdir -p $(LUA_DIR)/$T
+	cp src/$T/lom.lua $(LUA_DIR)/$T
+
+clean:
+	rm -f src/$(LIBNAME) $(OBJS)
+
+# $Id: makefile,v 1.33 2006/06/08 20:41:48 tomas Exp $
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/makefile.win	Wed Jun 01 22:14:25 2011 +0100
@@ -0,0 +1,29 @@
+LUA_INC=c:\lua5.1\include
+LUA_DIR=c:\lua5.1\lua
+LUA_LIBDIR=c:\lua5.1
+LUA_LIB=c:\lua5.1\lua5.1.lib
+
+OBJS= src\lxplib.obj
+
+EXPAT_INCLUDE=C:\Expat-2.0.0\Source\lib
+EXPAT_LIB=C:\Expat-2.0.0\Libs\libexpat.lib
+
+.c.obj:
+	cl /c /Fo$@ /O2 /I$(LUA_INC) /I$(EXPAT_INCLUDE) /D_CRT_SECURE_NO_DEPRECATE $<
+
+src\lxp.dll: $(OBJS)
+	link /dll /def:src\lxp.def /out:$@ $(OBJS) $(EXPAT_LIB) $(LUA_LIB) 
+
+install: src\lxp.dll
+	IF NOT EXIST $(LUA_LIBDIR) mkdir $(LUA_LIBDIR)
+	copy src\lxp.dll $(LUA_LIBDIR)
+	IF NOT EXIST $(LUA_DIR)\lxp mkdir $(LUA_DIR)\lxp
+	copy src\lxp\lom.lua $(LUA_DIR)\lxp
+
+clean:
+	del src\lxp.dll
+	del src\*.obj
+    del src\lxp.exp
+    del src\lxp.lib
+
+# $Id: makefile.win,v 1.3 2007/06/05 20:03:12 carregal Exp $
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/lxp.def	Wed Jun 01 22:14:25 2011 +0100
@@ -0,0 +1,2 @@
+EXPORTS
+	luaopen_lxp
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/lxp/lom.lua	Wed Jun 01 22:14:25 2011 +0100
@@ -0,0 +1,60 @@
+-- See Copyright Notice in license.html
+-- $Id: lom.lua,v 1.6 2005/06/09 19:18:40 tuler Exp $
+
+require "lxp"
+
+local tinsert, tremove, getn = table.insert, table.remove, table.getn
+local assert, type, print = assert, type, print
+local lxp = lxp
+
+module ("lxp.lom")
+
+local function starttag (p, tag, attr)
+  local stack = p:getcallbacks().stack
+  local newelement = {tag = tag, attr = attr}
+  tinsert(stack, newelement)
+end
+
+local function endtag (p, tag)
+  local stack = p:getcallbacks().stack
+  local element = tremove(stack)
+  assert(element.tag == tag)
+  local level = getn(stack)
+  tinsert(stack[level], element)
+end
+
+local function text (p, txt)
+  local stack = p:getcallbacks().stack
+  local element = stack[getn(stack)]
+  local n = getn(element)
+  if type(element[n]) == "string" then
+    element[n] = element[n] .. txt
+  else
+    tinsert(element, txt)
+  end
+end
+
+function  parse (o)
+  local c = { StartElement = starttag,
+              EndElement = endtag,
+              CharacterData = text,
+              _nonstrict = true,
+              stack = {{}}
+            }
+  local p = lxp.new(c)
+  local status, err
+  if type(o) == "string" then
+    status, err = p:parse(o)
+    if not status then return nil, err end
+  else
+    for l in o do
+      status, err = p:parse(l)
+      if not status then return nil, err end
+    end
+  end
+  status, err = p:parse()
+  if not status then return nil, err end
+  p:close()
+  return c.stack[1][1]
+end
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/lxplib.c	Wed Jun 01 22:14:25 2011 +0100
@@ -0,0 +1,544 @@
+/*
+** $Id: lxplib.c,v 1.16 2007/06/05 20:03:12 carregal Exp $
+** LuaExpat: Lua bind for Expat library
+** See Copyright Notice in license.html
+*/
+
+
+#include <assert.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "expat.h"
+
+#include "lua.h"
+#include "lauxlib.h"
+#if ! defined (LUA_VERSION_NUM) || LUA_VERSION_NUM < 501
+#include "compat-5.1.h"
+#endif
+
+
+#include "lxplib.h"
+
+
+
+enum XPState {
+  XPSpre,  /* parser just initialized */
+  XPSok,   /* state while parsing */
+  XPSfinished,  /* state after finished parsing */
+  XPSerror,
+  XPSstring  /* state while reading a string */
+};
+
+struct lxp_userdata {
+  lua_State *L;
+  XML_Parser parser;  /* associated expat parser */
+  int tableref;  /* table with callbacks for this parser */
+  enum XPState state;
+  luaL_Buffer *b;  /* to concatenate sequences of cdata pieces */
+};
+
+typedef struct lxp_userdata lxp_userdata;
+
+
+static int reporterror (lxp_userdata *xpu) {
+  lua_State *L = xpu->L;
+  XML_Parser p = xpu->parser;
+  lua_pushnil(L);
+  lua_pushstring(L, XML_ErrorString(XML_GetErrorCode(p)));
+  lua_pushnumber(L, XML_GetCurrentLineNumber(p));
+  lua_pushnumber(L, XML_GetCurrentColumnNumber(p) + 1);
+  lua_pushnumber(L, XML_GetCurrentByteIndex(p) + 1);
+  return 5;
+}
+
+
+static lxp_userdata *createlxp (lua_State *L) {
+  lxp_userdata *xpu = (lxp_userdata *)lua_newuserdata(L, sizeof(lxp_userdata));
+  xpu->tableref = LUA_REFNIL;  /* in case of errors... */
+  xpu->parser = NULL;
+  xpu->L = NULL;
+  xpu->state = XPSpre;
+  luaL_getmetatable(L, ParserType);
+  lua_setmetatable(L, -2);
+  return xpu;
+}
+
+
+static void lxpclose (lua_State *L, lxp_userdata *xpu) {
+  lua_unref(L, xpu->tableref);
+  xpu->tableref = LUA_REFNIL;
+  if (xpu->parser)
+    XML_ParserFree(xpu->parser);
+  xpu->parser = NULL;
+}
+
+
+
+
+/*
+** Auxiliary function to call a Lua handle
+*/
+static void docall (lxp_userdata *xpu, int nargs, int nres) {
+  lua_State *L = xpu->L;
+  assert(xpu->state == XPSok);
+  if (lua_pcall(L, nargs + 1, nres, 0) != 0) {
+    xpu->state = XPSerror;
+    luaL_unref(L, LUA_REGISTRYINDEX, xpu->tableref);
+    xpu->tableref = luaL_ref(L, LUA_REGISTRYINDEX);  /* error message */
+  }
+}
+
+
+/*
+** Check whether there is pending Cdata, and call its handle if necessary
+*/
+static void dischargestring (lxp_userdata *xpu) {
+  assert(xpu->state == XPSstring);
+  xpu->state = XPSok;
+  luaL_pushresult(xpu->b);
+  docall(xpu, 1, 0);
+}
+
+
+/*
+** Check whether there is a Lua handle for a given event: If so,
+** put it on the stack (to be called later), and also push `self'
+*/
+static int getHandle (lxp_userdata *xpu, const char *handle) {
+  lua_State *L = xpu->L;
+  if (xpu->state == XPSstring) dischargestring(xpu);
+  if (xpu->state == XPSerror)
+    return 0;  /* some error happened before; skip all handles */
+  lua_pushstring(L, handle);
+  lua_gettable(L, 3);
+  if (lua_toboolean(L, -1) == 0) {
+    lua_pop(L, 1);
+    return 0;
+  }
+  if (!lua_isfunction(L, -1)) {
+    luaL_error(L, "lxp `%s' callback is not a function", handle);
+  }
+  lua_pushvalue(L, 1);  /* first argument in every call (self) */
+  return 1;
+}
+
+
+
+/*
+** {======================================================
+** Handles
+** =======================================================
+*/
+
+
+static void f_StartCdata (void *ud) {
+  lxp_userdata *xpu = (lxp_userdata *)ud;
+  if (getHandle(xpu, StartCdataKey) == 0) return;  /* no handle */
+  docall(xpu, 0, 0);
+}
+
+
+static void f_EndCdataKey (void *ud) {
+  lxp_userdata *xpu = (lxp_userdata *)ud;
+  if (getHandle(xpu, EndCdataKey) == 0) return;  /* no handle */
+  docall(xpu, 0, 0);
+}
+
+
+static void f_CharData (void *ud, const char *s, int len) {
+  lxp_userdata *xpu = (lxp_userdata *)ud;
+  if (xpu->state == XPSok) {
+    if (getHandle(xpu, CharDataKey) == 0) return;  /* no handle */
+    xpu->state = XPSstring;
+    luaL_buffinit(xpu->L, xpu->b);
+  }
+  if (xpu->state == XPSstring)
+    luaL_addlstring(xpu->b, s, len);
+}
+
+
+static void f_Comment (void *ud, const char *data) {
+  lxp_userdata *xpu = (lxp_userdata *)ud;
+  if (getHandle(xpu, CommentKey) == 0) return;  /* no handle */
+  lua_pushstring(xpu->L, data);
+  docall(xpu, 1, 0);
+}
+
+
+static void f_Default (void *ud, const char *data, int len) {
+  lxp_userdata *xpu = (lxp_userdata *)ud;
+  if (getHandle(xpu, DefaultKey) == 0) return;  /* no handle */
+  lua_pushlstring(xpu->L, data, len);
+  docall(xpu, 1, 0);
+}
+
+
+static void f_DefaultExpand (void *ud, const char *data, int len) {
+  lxp_userdata *xpu = (lxp_userdata *)ud;
+  if (getHandle(xpu, DefaultExpandKey) == 0) return;  /* no handle */
+  lua_pushlstring(xpu->L, data, len);
+  docall(xpu, 1, 0);
+}
+
+
+static void f_StartElement (void *ud, const char *name, const char **attrs) {
+  lxp_userdata *xpu = (lxp_userdata *)ud;
+  lua_State *L = xpu->L;
+  int lastspec = XML_GetSpecifiedAttributeCount(xpu->parser) / 2;
+  int i = 1;
+  if (getHandle(xpu, StartElementKey) == 0) return;  /* no handle */
+  lua_pushstring(L, name);
+  lua_newtable(L);
+  while (*attrs) {
+    if (i <= lastspec) {
+      lua_pushnumber(L, i++);
+      lua_pushstring(L, *attrs);
+      lua_settable(L, -3);
+    }
+    lua_pushstring(L, *attrs++);
+    lua_pushstring(L, *attrs++);
+    lua_settable(L, -3);
+  }
+  docall(xpu, 2, 0);  /* call function with self, name, and attributes */
+}
+
+
+static void f_EndElement (void *ud, const char *name) {
+  lxp_userdata *xpu = (lxp_userdata *)ud;
+  if (getHandle(xpu, EndElementKey) == 0) return;  /* no handle */
+  lua_pushstring(xpu->L, name);
+  docall(xpu, 1, 0);
+}
+
+
+static int f_ExternaEntity (XML_Parser p, const char *context,
+                                          const char *base,
+                                          const char *systemId,
+                                          const char *publicId) {
+  lxp_userdata *xpu = (lxp_userdata *)XML_GetUserData(p);
+  lua_State *L = xpu->L;
+  lxp_userdata *child;
+  int status;
+  if (getHandle(xpu, ExternalEntityKey) == 0) return 1;  /* no handle */
+  child = createlxp(L);
+  child->parser = XML_ExternalEntityParserCreate(p, context, NULL);
+  if (!child->parser)
+    luaL_error(L, "XML_ParserCreate failed");
+  lua_getref(L, xpu->tableref);  /* child uses the same table of its father */
+  child->tableref = luaL_ref(L, LUA_REGISTRYINDEX);
+  lua_pushstring(L, base);
+  lua_pushstring(L, systemId);
+  lua_pushstring(L, publicId);
+  docall(xpu, 4, 1);
+  status = lua_toboolean(L, -1);
+  lua_pop(L, 1);
+  lxpclose(L, child);
+  return status;
+}
+
+
+static void f_StartNamespaceDecl (void *ud, const char *prefix,
+                                            const char *uri) {
+  lxp_userdata *xpu = (lxp_userdata *)ud;
+  lua_State *L = xpu->L;
+  if (getHandle(xpu, StartNamespaceDeclKey) == 0) return;  /* no handle */
+  lua_pushstring(L, prefix);
+  lua_pushstring(L, uri);
+  docall(xpu, 2, 0);
+}
+
+
+static void f_EndNamespaceDecl (void *ud, const char *prefix) {
+  lxp_userdata *xpu = (lxp_userdata *)ud;
+  if (getHandle(xpu, EndNamespaceDeclKey) == 0) return;  /* no handle */
+  lua_pushstring(xpu->L, prefix);
+  docall(xpu, 1, 0);
+}
+
+
+static void f_NotationDecl (void *ud, const char *notationName,
+                                      const char *base,
+                                      const char *systemId,
+                                      const char *publicId) {
+  lxp_userdata *xpu = (lxp_userdata *)ud;
+  lua_State *L = xpu->L;
+  if (getHandle(xpu, NotationDeclKey) == 0) return;  /* no handle */
+  lua_pushstring(L, notationName);
+  lua_pushstring(L, base);
+  lua_pushstring(L, systemId);
+  lua_pushstring(L, publicId);
+  docall(xpu, 4, 0);
+}
+
+
+static int f_NotStandalone (void *ud) {
+  int status;
+  lxp_userdata *xpu = (lxp_userdata *)ud;
+  lua_State *L = xpu->L;
+  if (getHandle(xpu, NotStandaloneKey) == 0) return 1;  /* no handle */
+  docall(xpu, 0, 1);
+  status = lua_toboolean(L, -1);
+  lua_pop(L, 1);
+  return status;
+}
+
+
+static void f_ProcessingInstruction (void *ud, const char *target,
+                                               const char *data) {
+  lxp_userdata *xpu = (lxp_userdata *)ud;
+  lua_State *L = xpu->L;
+  if (getHandle(xpu, ProcessingInstructionKey) == 0) return;  /* no handle */
+  lua_pushstring(L, target);
+  lua_pushstring(L, data);
+  docall(xpu, 2, 0);
+}
+
+
+static void f_UnparsedEntityDecl (void *ud, const char *entityName,
+                                            const char *base,
+                                            const char *systemId,
+                                            const char *publicId,
+                                            const char *notationName) {
+  lxp_userdata *xpu = (lxp_userdata *)ud;
+  lua_State *L = xpu->L;
+  if (getHandle(xpu, UnparsedEntityDeclKey) == 0) return;  /* no handle */
+  lua_pushstring(L, entityName);
+  lua_pushstring(L, base);
+  lua_pushstring(L, systemId);
+  lua_pushstring(L, publicId);
+  lua_pushstring(L, notationName);
+  docall(xpu, 5, 0);
+}
+
+/* }====================================================== */
+
+
+
+static int hasfield (lua_State *L, const char *fname) {
+  int res;
+  lua_pushstring(L, fname);
+  lua_gettable(L, 1);
+  res = !lua_isnil(L, -1);
+  lua_pop(L, 1);
+  return res;
+}
+
+
+static void checkcallbacks (lua_State *L) {
+  static const char *const validkeys[] = {
+    "StartCdataSection", "EndCdataSection", "CharacterData", "Comment",
+    "Default", "DefaultExpand", "StartElement", "EndElement",
+    "ExternalEntityRef", "StartNamespaceDecl", "EndNamespaceDecl",
+    "NotationDecl", "NotStandalone", "ProcessingInstruction",
+    "UnparsedEntityDecl", NULL};
+  if (hasfield(L, "_nonstrict")) return;
+  lua_pushnil(L);
+  while (lua_next(L, 1)) {
+    lua_pop(L, 1);  /* remove value */
+#if ! defined (LUA_VERSION_NUM) || LUA_VERSION_NUM < 501
+    if (lua_type(L, -1) != LUA_TSTRING ||
+        luaL_findstring(lua_tostring(L, -1), validkeys) < 0)
+      luaL_error(L, "invalid key `%s' in callback table", lua_tostring(L, -1));
+#else
+    luaL_checkoption(L, -1, NULL, validkeys);
+#endif
+  }
+}
+
+
+static int lxp_make_parser (lua_State *L) {
+  XML_Parser p;
+  char sep = *luaL_optstring(L, 2, "");
+  lxp_userdata *xpu = createlxp(L);
+  p = xpu->parser = (sep == '\0') ? XML_ParserCreate(NULL) :
+                                    XML_ParserCreateNS(NULL, sep);
+  if (!p)
+    luaL_error(L, "XML_ParserCreate failed");
+  luaL_checktype(L, 1, LUA_TTABLE);
+  checkcallbacks(L);
+  lua_pushvalue(L, 1);
+  xpu->tableref = luaL_ref(L, LUA_REGISTRYINDEX);
+  XML_SetUserData(p, xpu);
+  if (hasfield(L, StartCdataKey) || hasfield(L, EndCdataKey))
+    XML_SetCdataSectionHandler(p, f_StartCdata, f_EndCdataKey);
+  if (hasfield(L, CharDataKey))
+    XML_SetCharacterDataHandler(p, f_CharData);
+  if (hasfield(L, CommentKey))
+    XML_SetCommentHandler(p, f_Comment);
+  if (hasfield(L, DefaultKey))
+    XML_SetDefaultHandler(p, f_Default);
+  if (hasfield(L, DefaultExpandKey))
+    XML_SetDefaultHandlerExpand(p, f_DefaultExpand);
+  if (hasfield(L, StartElementKey) || hasfield(L, EndElementKey))
+    XML_SetElementHandler(p, f_StartElement, f_EndElement);
+  if (hasfield(L, ExternalEntityKey))
+    XML_SetExternalEntityRefHandler(p, f_ExternaEntity);
+  if (hasfield(L, StartNamespaceDeclKey) || hasfield(L, EndNamespaceDeclKey))
+    XML_SetNamespaceDeclHandler(p, f_StartNamespaceDecl, f_EndNamespaceDecl);
+  if (hasfield(L, NotationDeclKey))
+    XML_SetNotationDeclHandler(p, f_NotationDecl);
+  if (hasfield(L, NotStandaloneKey))
+    XML_SetNotStandaloneHandler(p, f_NotStandalone);
+  if (hasfield(L, ProcessingInstructionKey))
+    XML_SetProcessingInstructionHandler(p, f_ProcessingInstruction);
+  if (hasfield(L, UnparsedEntityDeclKey))
+    XML_SetUnparsedEntityDeclHandler(p, f_UnparsedEntityDecl);
+  return 1;
+}
+
+
+static lxp_userdata *checkparser (lua_State *L, int idx) {
+  lxp_userdata *xpu = (lxp_userdata *)luaL_checkudata(L, idx, ParserType);
+  luaL_argcheck(L, xpu, idx, "expat parser expected");
+  luaL_argcheck(L, xpu->parser, idx, "parser is closed");
+  return xpu;
+}
+
+
+static int parser_gc (lua_State *L) {
+  lxp_userdata *xpu = (lxp_userdata *)luaL_checkudata(L, 1, ParserType);
+  luaL_argcheck(L, xpu, 1, "expat parser expected");
+  lxpclose(L, xpu);
+  return 0;
+}
+
+
+static int setbase (lua_State *L) {
+  lxp_userdata *xpu = checkparser(L, 1);
+  if (XML_SetBase(xpu->parser, luaL_checkstring(L, 2)) == 0)
+    luaL_error(L, "no memory to store base");
+  return 0;
+}
+
+
+static int getbase (lua_State *L) {
+  lxp_userdata *xpu = checkparser(L, 1);
+  lua_pushstring(L, XML_GetBase(xpu->parser));
+  return 1;
+}
+
+
+static int getcallbacks (lua_State *L) {
+  lxp_userdata *xpu = checkparser(L, 1);
+  lua_rawgeti(L, LUA_REGISTRYINDEX, xpu->tableref);
+  return 1;
+}
+
+
+static int parse_aux (lua_State *L, lxp_userdata *xpu, const char *s,
+                      size_t len) {
+  luaL_Buffer b;
+  int status;
+  xpu->L = L;
+  xpu->state = XPSok;
+  xpu->b = &b;
+  lua_settop(L, 2);
+  lua_getref(L, xpu->tableref);  /* to be used by handlers */
+  status = XML_Parse(xpu->parser, s, (int)len, s == NULL);
+  if (xpu->state == XPSstring) dischargestring(xpu);
+  if (xpu->state == XPSerror) {  /* callback error? */
+    lua_rawgeti(L, LUA_REGISTRYINDEX, xpu->tableref);  /* get original msg. */
+    lua_error(L);
+  }
+  if (s == NULL) xpu->state = XPSfinished;
+  if (status) {
+    lua_pushboolean(L, 1);
+    return 1;
+  }
+  else { /* error */
+    return reporterror(xpu);
+  }
+}
+
+
+static int lxp_parse (lua_State *L) {
+  lxp_userdata *xpu = checkparser(L, 1);
+  size_t len;
+  const char *s = luaL_optlstring(L, 2, NULL, &len);
+  if (xpu->state == XPSfinished && s != NULL) {
+    lua_pushnil(L);
+    lua_pushliteral(L, "cannot parse - document is finished");
+    return 2;
+  }
+  return parse_aux(L, xpu, s, len);
+}
+
+
+static int lxp_close (lua_State *L) {
+  int status = 1;
+  lxp_userdata *xpu = (lxp_userdata *)luaL_checkudata(L, 1, ParserType);
+  luaL_argcheck(L, xpu, 1, "expat parser expected");
+  if (xpu->state != XPSfinished)
+    status = parse_aux(L, xpu, NULL, 0);
+  lxpclose(L, xpu);
+  if (status > 1) luaL_error(L, "error closing parser: %s",
+                                lua_tostring(L, -status+1));
+  return 0;
+}
+
+
+static int lxp_pos (lua_State *L) {
+  lxp_userdata *xpu = checkparser(L, 1);
+  XML_Parser p = xpu->parser;
+  lua_pushnumber(L, XML_GetCurrentLineNumber(p));
+  lua_pushnumber(L, XML_GetCurrentColumnNumber(p) + 1);
+  lua_pushnumber(L, XML_GetCurrentByteIndex(p) + 1);
+  return 3;
+}
+
+
+static int lxp_setencoding (lua_State *L) {
+  lxp_userdata *xpu = checkparser(L, 1);
+  const char *encoding = luaL_checkstring(L, 2);
+  luaL_argcheck(L, xpu->state == XPSpre, 1, "invalid parser state");
+  XML_SetEncoding(xpu->parser, encoding);
+  return 0;
+}
+
+
+static const struct luaL_reg lxp_meths[] = {
+  {"parse", lxp_parse},
+  {"close", lxp_close},
+  {"__gc", parser_gc},
+  {"pos", lxp_pos},
+  {"setencoding", lxp_setencoding},
+  {"getcallbacks", getcallbacks},
+  {"getbase", getbase},
+  {"setbase", setbase},
+  {NULL, NULL}
+};
+
+static const struct luaL_reg lxp_funcs[] = {
+  {"new", lxp_make_parser},
+  {NULL, NULL}
+};
+
+
+/*
+** Assumes the table is on top of the stack.
+*/
+static void set_info (lua_State *L) {
+	lua_pushliteral (L, "_COPYRIGHT");
+	lua_pushliteral (L, "Copyright (C) 2003-2007 Kepler Project");
+	lua_settable (L, -3);
+	lua_pushliteral (L, "_DESCRIPTION");
+	lua_pushliteral (L, "LuaExpat is a SAX XML parser based on the Expat library");
+	lua_settable (L, -3);
+	lua_pushliteral (L, "_VERSION");
+	lua_pushliteral (L, "LuaExpat 1.1.0");
+	lua_settable (L, -3);
+}
+
+
+int luaopen_lxp (lua_State *L) {
+  luaL_newmetatable(L, ParserType);
+  lua_pushliteral(L, "__index");
+  lua_pushvalue(L, -2);
+  lua_rawset(L, -3);
+  luaL_openlib (L, NULL, lxp_meths, 0);
+  luaL_openlib (L, "lxp", lxp_funcs, 0);
+  set_info (L);
+
+  return 1;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/lxplib.h	Wed Jun 01 22:14:25 2011 +0100
@@ -0,0 +1,23 @@
+/*
+** See Copyright Notice in license.html
+*/
+
+#define ParserType	"Expat"
+
+#define StartCdataKey			"StartCdataSection"
+#define EndCdataKey			"EndCdataSection"
+#define CharDataKey			"CharacterData"
+#define CommentKey			"Comment"
+#define DefaultKey			"Default"
+#define DefaultExpandKey		"DefaultExpand"
+#define StartElementKey			"StartElement"
+#define EndElementKey			"EndElement"
+#define ExternalEntityKey		"ExternalEntityRef"
+#define StartNamespaceDeclKey		"StartNamespaceDecl"
+#define EndNamespaceDeclKey		"EndNamespaceDecl"
+#define NotationDeclKey			"NotationDecl"
+#define NotStandaloneKey		"NotStandalone"
+#define ProcessingInstructionKey	"ProcessingInstruction"
+#define UnparsedEntityDeclKey		"UnparsedEntityDecl"
+
+int luaopen_lxp (lua_State *L);
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-lom.lua	Wed Jun 01 22:14:25 2011 +0100
@@ -0,0 +1,50 @@
+#!/usr/local/bin/lua
+
+local lom = require "lxp.lom"
+
+local tests = {
+	[[<abc a1="A1" a2="A2">inside tag `abc'</abc>]],
+	[[<qwerty q1="q1" q2="q2">
+	<asdf>some text</asdf>
+</qwerty>]],
+}
+
+function table._tostring (tab, indent, spacing)
+	local s = {}
+	spacing = spacing or ""
+	indent = indent or "\t"
+    table.insert (s, "{\n")
+    for nome, val in pairs (tab) do
+        table.insert (s, spacing..indent)
+        local t = type(nome)
+		if t == "string" then
+            table.insert (s, string.format ("[%q] = ", tostring (nome)))
+		elseif t == "number" or t == "boolean" then
+            table.insert (s, string.format ("[%s] = ", tostring (nome)))
+        else
+            table.insert (s, t)
+        end
+        t = type(val)
+        if t == "string" or t == "number" then
+            table.insert (s, string.format ("%q", val))
+        elseif t == "table" then
+            table.insert (s, table._tostring (val, indent, spacing..indent))
+        else
+            table.insert (s, t)
+        end
+        table.insert (s, ",\n")
+    end
+    table.insert (s, spacing.."}")
+	return table.concat (s)
+end
+
+function table.print (tab, indent, spacing)
+	io.write (table._tostring (tab, indent, spacing))
+end
+
+
+for i, s in ipairs(tests) do
+	--s = string.gsub (s, "[\n\r\t]", "")
+	local ds = assert (lom.parse ([[<?xml version="1.0" encoding="ISO-8859-1"?>]]..s))
+	print(table._tostring(ds))
+end
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test.lua	Wed Jun 01 22:14:25 2011 +0100
@@ -0,0 +1,298 @@
+#!/usr/local/bin/lua5.1
+-- See Copyright Notice in license.html
+-- $Id: test.lua,v 1.6 2006/06/08 20:34:52 tomas Exp $
+
+require"lxp"
+print (lxp._VERSION)
+
+-- basic test with no preamble
+local p = lxp.new{}
+p:setencoding("ISO-8859-1")
+assert(p:parse[[<tag cap="5">hi</tag>]])
+p:close()
+
+
+preamble = [[
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+<!DOCTYPE greeting [
+  <!ENTITY xuxu "is this a xuxu?">
+
+  <!ATTLIST to
+     method  CDATA   #FIXED "POST"
+  >
+
+  <!ENTITY test-entity
+           SYSTEM "entity1.xml">
+
+  <!NOTATION TXT SYSTEM "txt">
+
+  <!ENTITY test-unparsed SYSTEM "unparsed.txt" NDATA txt>
+
+  <!ATTLIST hihi
+      explanation ENTITY #REQUIRED>
+
+]>
+]]
+
+local X
+function getargs (...) X = arg end
+
+function xgetargs (c)
+  return function (...)
+    table.insert(arg, 1, c)
+    table.insert(X, arg)
+  end
+end
+
+
+-------------------------------
+print("testing start/end tags")
+callbacks = {
+  StartElement = getargs,
+  EndElement = getargs,
+}
+p = lxp.new(callbacks)
+assert(p:getcallbacks() == callbacks)
+assert(p:parse(preamble))
+assert(p:parse([[
+<to priority="10" xu = "hi">
+]]))
+assert(X.n == 3 and X[1] == p and X[2] == "to")
+x = X[3]
+assert(x.priority=="10" and x.xu=="hi" and x.method=="POST")
+assert(x[1] == "priority" and x[2] == "xu" and table.getn(x) == 2)
+assert(p:parse("</to>"))
+assert(p:parse())
+p:close()
+
+
+-------------------------------
+print("testing CharacterData/Cdata")
+callbacks = {
+  CharacterData = getargs,
+}
+p = lxp.new(callbacks)
+assert(p:parse(preamble))
+assert(p:parse"<to>a basic text&lt;<![CDATA[<<ha>>]]></to>")
+assert(X[1] == p and X[2] == "a basic text<<<ha>>")
+callbacks.chardata = error   -- no more calls to `chardata'
+assert(p:parse(""))
+assert(p:parse())
+-- assert(p:parse())   -- no problem to finish twice. alas, it has problems
+assert(p:getcallbacks() == callbacks)
+p:close()
+
+-------------------------------
+callbacks = {
+  CharacterData = xgetargs"c",
+  StartCdataSection = xgetargs"s",
+  EndCdataSection = xgetargs"e", 
+}
+X = {}
+p = lxp.new(callbacks)
+assert(p:parse(preamble))
+assert(p:parse"<to>")
+assert(p:parse"<![CDATA[hi]]>")
+assert(table.getn(X) == 3)
+assert(X[1][1] == "s" and X[1][2] == p)
+assert(X[2][1] == "c" and X[2][2] == p and X[2][3] == "hi")
+assert(X[3][1] == "e" and X[3][2] == p)
+assert(p:parse"</to>")
+p:close()
+
+
+-------------------------------
+print("testing ProcessingInstruction")
+callbacks = {ProcessingInstruction = getargs}
+p = lxp.new(callbacks)
+assert(p:parse[[
+<to>
+  <?lua how is this passed to <here>? ?>
+</to>
+]])
+assert(X[1] == p and X[2] == "lua" and
+       X[3] == "how is this passed to <here>? ")
+p:close()
+
+
+------------------------------
+print("testing Comment")
+callbacks = {Comment = xgetargs"c"; CharacterData = xgetargs"t"}
+X = {}
+p = lxp.new(callbacks)
+assert(p:parse[[
+<to>some text
+<!-- <a comment> with some & symbols -->
+some more text</to>
+
+]])
+p:close()
+
+assert(X[1][1] == "t" and X[2][1] == "c" and X[3][1] == "t")
+assert(X[1][2] == X[2][2] and X[2][2] == X[3][2] and X[3][2] == p)
+assert(X[1][3] == "some text\n")
+assert(X[2][3] == " <a comment> with some & symbols ")
+assert(X[3][3] == "\nsome more text")
+
+
+----------------------------
+print("testing ExternalEntity")
+entities = {
+["entity1.xml"] = "<hi/>"
+}
+
+callbacks = {StartElement = xgetargs"s", EndElement = xgetargs"e",
+  ExternalEntityRef = function (p, context, base, systemID, publicId)
+    assert(base == "/base")
+    return context:parse(entities[systemID])
+  end}
+
+X = {}
+p = lxp.new(callbacks)
+p:setbase("/base")
+assert(p:parse(preamble))
+assert(p:parse[[
+<to> &test-entity;
+</to>
+]])
+assert(p:getbase() == "/base")
+p:close()
+assert(X[1][1] == "s" and X[1][3] == "to")
+assert(X[2][1] == "s" and X[2][3] == "hi")
+assert(X[3][1] == "e" and X[3][3] == "hi")
+assert(X[4][1] == "e" and X[4][3] == "to")
+
+
+----------------------------
+print("testing default handles")
+text = [[<to> hi &xuxu; </to>]]
+local t = ""
+
+callbacks = { Default = function (p, s) t = t .. s end }
+p = lxp.new(callbacks)
+assert(p:parse(preamble))
+assert(p:parse(text))
+p:close()
+assert(t == preamble..text)
+
+t = ""
+callbacks = { DefaultExpand = function (p, s) t = t .. s end }
+p = lxp.new(callbacks)
+assert(p:parse(preamble))
+assert(p:parse(text))
+p:close()
+assert(t == preamble..string.gsub(text, "&xuxu;", "is this a xuxu?"))
+
+
+----------------------------
+print("testing notation declarations and unparsed entities")
+
+callbacks = {
+  UnparsedEntityDecl = getargs,
+  NotationDecl = function (p, name, base, systemId, publicId)
+    assert(name == "TXT" and systemId == "txt" and base == "/base")
+  end,
+ }
+p = lxp.new(callbacks)
+p:setbase("/base")
+assert(p:parse(preamble))
+assert(p:parse[[<hihi explanation="test-unparsed"/>]])
+p:close()
+assert(X[2] == "test-unparsed" and X[3] == "/base" and
+       X[4] == "unparsed.txt" and X[6] == "txt" and X.n == 6)
+
+
+
+----------------------------
+print("testing namespace declarations")
+callbacks = { StartNamespaceDecl = xgetargs"sn",
+              EndNamespaceDecl = xgetargs"en",
+              StartElement = xgetargs"s",
+              EndElement = xgetargs"e",
+}
+X = {}
+p = lxp.new(callbacks, "?")
+assert(p:parse[[
+<x xmlns:space='a/namespace'>
+  <space:a/>
+</x>
+]])
+p:close()
+x = X[1]
+assert(x[1] == "sn" and x[3] == "space" and x[4] == "a/namespace" and table.getn(x) == 4)
+x = X[3]
+assert(x[1] == "s" and x[3] == "a/namespace?a")
+x = X[4]
+assert(x[1] == "e" and x[3] == "a/namespace?a")
+x = X[6]
+assert(x[1] == "en" and x[3] == "space" and table.getn(x) == 3)
+
+
+
+-- Error reporting
+p = lxp.new{}
+data = [[
+<tag>
+  <other< </other>
+</tag>
+]]
+local status, msg, line, col, byte = p:parse(data)
+assert(status == nil and type(msg) == "string" and line == 2 and col == 9)
+assert(string.sub(data, byte, byte) == "<")
+
+p = lxp.new{}
+p:parse("<to>")
+local status, msg, line, col, byte = p:parse()
+assert(status == nil and line == 1 and col == 5 and byte == 5)
+
+
+-- position reporting
+callbacks = { ProcessingInstruction = function (p)
+  X = {p:pos()}
+end
+}
+
+p = lxp.new(callbacks)
+assert(p:parse[[
+<to> <?test where is `pos'? ?>
+</to>
+]])
+p:close()
+assert(X[1] == 1  and X[2] == 6 and X[3] == 6)  -- line, column, abs. position
+
+
+
+print("testing errors")
+-- invalid keys
+assert(not pcall(lxp.new, {StatCdata=print}))
+assert(pcall(lxp.new, {StatCdata=print, _nonstrict = true}))
+
+-- invalid sequences
+p = lxp.new{}
+assert(p:parse[[<to></to>]])
+assert(p:parse())
+assert(p:parse(" ") == nil)
+
+-- closing unfinished document
+p = lxp.new{}
+assert(p:parse[[<to>]])
+local status, err = pcall(p.close, p)
+assert(not status and string.find(err, "error closing parser"))
+
+
+-- test for GC
+print("\ntesting garbage collection")
+collectgarbage(); collectgarbage()
+local x = gcinfo()
+for i=1,100000 do
+  -- due to a small bug in Lua...
+  if math.mod(i, 100) == 0 then collectgarbage() end
+  lxp.new({})
+end
+collectgarbage(); collectgarbage()
+assert(math.abs(gcinfo() - x) <= 2)
+
+
+print"OK"
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/vc6/README	Wed Jun 01 22:14:25 2011 +0100
@@ -0,0 +1,28 @@
+These are the Visual Studio 6 projects provided by the Kepler Project
+
+Files:
+
+	luaexpat.dsw
+	luaexpat_dll.dsp
+	luaexpat_static.dsp
+	README
+
+Generated files:
+
+	luaexpat.ncb
+	luaexpat.opt
+
+	../lib/liblxp.lib
+	../lib/liblxpd.lib
+	../lib/lxp.exp
+	../lib/lxp.lib
+	../lib/lxpd.exp
+	../lib/lxpd.lib
+	../lib/lxpd.pdb
+
+	../bin/lxp.dll
+	../bin/lxpd.dll
+	../bin/lxpd.ilk
+
+Download source from:
+	http://www.keplerproject.org/luaexpat/
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/vc6/luaexpat.dsw	Wed Jun 01 22:14:25 2011 +0100
@@ -0,0 +1,41 @@
+Microsoft Developer Studio Workspace File, Format Version 6.00
+# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
+
+###############################################################################
+
+Project: "expat"="..\..\external-src\expat-1.95.8\lib\expat.dsp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Project: "luaexpat_dll"=.\luaexpat_dll.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Global:
+
+Package=<5>
+{{{
+}}}
+
+Package=<3>
+{{{
+}}}
+
+###############################################################################
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/vc6/luaexpat_dll.dsp	Wed Jun 01 22:14:25 2011 +0100
@@ -0,0 +1,127 @@
+# Microsoft Developer Studio Project File - Name="luaexpat_dll" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
+
+CFG=luaexpat_dll - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE 
+!MESSAGE NMAKE /f "luaexpat_dll.mak".
+!MESSAGE 
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE 
+!MESSAGE NMAKE /f "luaexpat_dll.mak" CFG="luaexpat_dll - Win32 Debug"
+!MESSAGE 
+!MESSAGE Possible choices for configuration are:
+!MESSAGE 
+!MESSAGE "luaexpat_dll - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
+!MESSAGE "luaexpat_dll - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
+!MESSAGE 
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+MTL=midl.exe
+RSC=rc.exe
+
+!IF  "$(CFG)" == "luaexpat_dll - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "../lib/vc6"
+# PROP Intermediate_Dir "luaexpat_dll/Release"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "LUAEXPAT_DLL_EXPORTS" /YX /FD /c
+# ADD CPP /nologo /MD /W3 /GX /O2 /I "../../external-src/expat-1.95.8/lib" /I "../../external-src/lua50/include" /I "../../compat/src" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "LUAEXPAT_DLL_EXPORTS" /YX /FD /c
+# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
+# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
+# ADD BASE RSC /l 0x416 /d "NDEBUG"
+# ADD RSC /l 0x416 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
+# ADD LINK32 lua50.lib libexpat.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 /out:"../bin/vc6/lxp.dll" /libpath:"../../external-src/lua50/lib/dll" /libpath:"../../external-src/expat-1.95.8/lib/Release"
+# Begin Special Build Tool
+SOURCE="$(InputPath)"
+PostBuild_Cmds=cd ../bin/vc6	zip.exe luaexpat-1.0.1-win32.zip lxp.dll
+# End Special Build Tool
+
+!ELSEIF  "$(CFG)" == "luaexpat_dll - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug"
+# PROP BASE Intermediate_Dir "Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "../lib/vc6"
+# PROP Intermediate_Dir "luaexpat_dll/Debug"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "LUAEXPAT_DLL_EXPORTS" /YX /FD /GZ /c
+# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../external-src/expat-1.95.8/lib" /I "../../external-src/lua50/include" /I "../../compat/src" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "LUAEXPAT_DLL_EXPORTS" /YX /FD /GZ /c
+# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
+# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
+# ADD BASE RSC /l 0x416 /d "_DEBUG"
+# ADD RSC /l 0x416 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 lua50.lib libexpat.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /out:"../bin/vc6/lxpd.dll" /pdbtype:sept /libpath:"../../external-src/lua50/lib/dll" /libpath:"../../external-src/expat-1.95.8/lib/Debug"
+
+!ENDIF 
+
+# Begin Target
+
+# Name "luaexpat_dll - Win32 Release"
+# Name "luaexpat_dll - Win32 Debug"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+# Begin Source File
+
+SOURCE="..\..\compat\src\compat-5.1.c"
+# End Source File
+# Begin Source File
+
+SOURCE=.\lxp.def
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\lxplib.c
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl"
+# Begin Source File
+
+SOURCE="..\..\compat\src\compat-5.1.h"
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\lxplib.h
+# End Source File
+# End Group
+# Begin Group "Resource Files"
+
+# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+# End Group
+# End Target
+# End Project
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/vc6/luaexpat_static.dsp	Wed Jun 01 22:14:25 2011 +0100
@@ -0,0 +1,108 @@
+# Microsoft Developer Studio Project File - Name="luaexpat_static" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Static Library" 0x0104
+
+CFG=luaexpat_static - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE 
+!MESSAGE NMAKE /f "luaexpat_static.mak".
+!MESSAGE 
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE 
+!MESSAGE NMAKE /f "luaexpat_static.mak" CFG="luaexpat_static - Win32 Debug"
+!MESSAGE 
+!MESSAGE Possible choices for configuration are:
+!MESSAGE 
+!MESSAGE "luaexpat_static - Win32 Release" (based on "Win32 (x86) Static Library")
+!MESSAGE "luaexpat_static - Win32 Debug" (based on "Win32 (x86) Static Library")
+!MESSAGE 
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+RSC=rc.exe
+
+!IF  "$(CFG)" == "luaexpat_static - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "../lib/vc6"
+# PROP Intermediate_Dir "luaexpat_static/Release"
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c
+# ADD CPP /nologo /W3 /GX /O2 /I "../expat/xmlparse" /I "../../lua/include" /I "../../compat" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c
+# ADD BASE RSC /l 0x416 /d "NDEBUG"
+# ADD RSC /l 0x416 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo /out:"../lib/vc6/liblxp.lib"
+
+!ELSEIF  "$(CFG)" == "luaexpat_static - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug"
+# PROP BASE Intermediate_Dir "Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "../lib/vc6"
+# PROP Intermediate_Dir "luaexpat_static/Debug"
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
+# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../expat/xmlparse" /I "../../lua/include" /I "../../compat" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
+# ADD BASE RSC /l 0x416 /d "_DEBUG"
+# ADD RSC /l 0x416 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo /out:"../lib/vc6/liblxpd.lib"
+
+!ENDIF 
+
+# Begin Target
+
+# Name "luaexpat_static - Win32 Release"
+# Name "luaexpat_static - Win32 Debug"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+# Begin Source File
+
+SOURCE="..\..\compat\compat-5.1.c"
+# End Source File
+# Begin Source File
+
+SOURCE=..\lxplib.c
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl"
+# Begin Source File
+
+SOURCE="..\..\compat\compat-5.1.h"
+# End Source File
+# Begin Source File
+
+SOURCE=..\lxplib.h
+# End Source File
+# End Group
+# End Target
+# End Project
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/vc6/lxp.def	Wed Jun 01 22:14:25 2011 +0100
@@ -0,0 +1,9 @@
+LIBRARY		lxp.dll
+
+DESCRIPTION "LuaExpat"
+
+VERSION 1.0.2
+
+EXPORTS
+
+luaopen_lxp

mercurial