Skip to content

Releases: Phrogz/SLAXML

v0.8

01 Jan 01:38
Compare
Choose a tag to compare
  • 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 when simple=true is specified.

v0.7

26 Sep 15:10
Compare
Choose a tag to compare

Support for high-value entities (e.g. ê or ê is ê; € or € is ) decoded as UTF8.

v0.6.1

26 Sep 02:38
Compare
Choose a tag to compare

Minor bug fix: hexadecimal entities work (and don't cause a runtime error).

v0.6

18 Apr 22:16
Compare
Choose a tag to compare
  • 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

13 Feb 00:20
Compare
Choose a tag to compare

Bugfix supporting the reserved xml namespace for attributes,e.g. xml:space="preserve".

v0.5.2

13 Feb 00:20
Compare
Choose a tag to compare
  • Lua 5.2 compatible
  • Parser now errors if it finishes without finding a root element,
    or if there are unclosed elements at the end.
    (Proper element pairing is not enforced by the parser, but is—as
    in previous releases—enforced by the DOM builder.)

v0.5.1

13 Feb 00:21
Compare
Choose a tag to compare
  • <foo xmlns="bar"> now directly generates startElement("foo","bar")
    with no post callback for namespace required.

v0.4.3

13 Feb 00:22
Compare
Choose a tag to compare
  • Bugfix to allow empty attributes, i.e. foo=""
  • closeElement no longer includes namespace prefix in the name, includes the nsURI

v0.4

13 Feb 00:23
Compare
Choose a tag to compare
  • DOM adds .parent references
  • SLAXML.ignoreWhitespace is now :parse(xml,{stripWhitespace=true})
  • "simple" mode for DOM parsing

v0.3

13 Feb 00:23
Compare
Choose a tag to compare
  • Support namespaces for elements and attributes
    • <foo xmlns="barURI"> will call startElement("foo",nil) followed by
      namespace("barURI") (and then attribute("xmlns","barURI",nil));
      you must apply the namespace to your element after creation.
    • Child elements without a namespace prefix that inherit a namespace will
      receive startElement("child","barURI")
    • <xy:foo> will call startElement("foo","uri-for-xy")
    • <foo xy:bar="yay"> will call attribute("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