Releases: Phrogz/SLAXML
Releases · Phrogz/SLAXML
v0.8
- Adds
SLAXML:xml()
to serialize the DOM back to XML. - Adds
nsPrefix
properties to the DOM tables for elements and attributes (needed for round-trip serialization) - Fixes test suite to work on Lua 5.2, 5.3.
- Fixes Issue #10, allowing DOM parser to handle comments/PIs after the root element.
- Fixes Issue #11, causing DOM parser to preserve whitespace text nodes on the document.
- Backwards-incompatible change: Removes
doc.root
key from DOM whensimple=true
is specified.
v0.7
v0.6.1
v0.6
-
Fixes Issue #5 (and more): Namespace prefixes defined on element are now properly applied to the element itself and any attributes using them when the definitions appear later in source than the prefix usage. (Thanks Oliver Kroth.)
-
The streaming parser now supplies the namespace prefix for elements and attributes. (This is backwards-compatible; it is a new extra parameter at the end of the function.)
parser = SLAXML:parser{ startElement = function(name,nsURI,nsPrefix) end attribute = function(name,value,nsURI,nsPrefix) end closeElement = function(name,nsURI) end }
v0.5.3
v0.5.2
v0.5.1
v0.4.3
v0.4
v0.3
- Support namespaces for elements and attributes
<foo xmlns="barURI">
will callstartElement("foo",nil)
followed by
namespace("barURI")
(and thenattribute("xmlns","barURI",nil)
);
you must apply the namespace to your element after creation.- Child elements without a namespace prefix that inherit a namespace will
receivestartElement("child","barURI")
<xy:foo>
will callstartElement("foo","uri-for-xy")
<foo xy:bar="yay">
will callattribute("bar","yay","uri-for-xy")
- Runtime errors are generated for any namespace prefix that cannot be resolved
- Add (optional) DOM parser that validates hierarchy and supports namespaces