Skip to content
c27c331
Compare
Choose a tag to compare
eb8e6d6
Compare
Choose a tag to compare
* Drop support for `admin1` and `city` lookups

These required external databases, and I'd rather not have side-effecting like that in IDML.

The timezone and ISO lookups are still available because they're small enough to ship with the JVM or with the jar sensibly.

* Also remove references to the geo db module from other modules
ab6e981
Compare
Choose a tag to compare
Merge branch 'master' of github.com:idml/idml
148309a
Compare
Choose a tag to compare
Merge branch 'master' of github.com:idml/idml
7eabec5
Compare
Choose a tag to compare
set version from drone tag if it exists
4068fd4
Compare
Choose a tag to compare
Fix version number detection
63488a1
Compare
Choose a tag to compare

Pipeline DSL Edition

Pre-release
Pre-release

This releases a previously internal feature called pipelining, it's a DSL for combining mappings, you can see the implementation in io.idml.utils.configuration.Pipeline.

It has two operators, pipe (|) and merge (+), merge is higher priority.

Examples:

  • a|b - run the a mapping and pipe it's output into b
  • a+b - run the a mapping and b mapping on the same input, then merge their outputs, with b taking precedence
  • a+b|c - will be read as (a+b)|c - this merges a and b then pipes their combined output into c

This release allows the DSL to be used in IDML tests, previously there was a field called code which contained a string with the IDML in, or a reference to a file, this has been extended so you can also put in a pipeline configuration:

  "code": {
    "pipeline": "a",
    "database": {
      "a": "r = a + b"
    }
  }

You can reference each IDML mapping in a file like so:

  "code": {
    "pipeline": "a|b",
    "database": {
      "a": {
        "$ref": "idml/a.idml"
      },
      "b": {
        "$ref": "idml/b.idml"
      }
    }
  }
63be0dc
Compare
Choose a tag to compare

XML Revamp Preview

Pre-release
Pre-release

This adds new node types in our datanodes tree, one for a DOM node with text in, and one for a DOM Element.

The new functions parseXml and parseHtml are available which will parse XML in a string into a tree of DOM nodes.

The new functions attributes()and tagName() can be called to pull the attributes object or the name out of a DOM node.

The text() function can be used to pull out all the text nodes from beneath the selected node and combine them.

DOM nodes are addressable as both objects and arrays, indexing them as an array gives you the contained item at that index, this also means you can filter them down to certain sub-elements. When addressing them as an object, it will filter the array for tags with the name you're asking for, eg. xml.parseXml().a[0] will parse the XML in the xml string, filter to the a tags, then grab the 0th one.

d24bc46
Compare
Choose a tag to compare

This release includes a normalize function which can compose and decompose unicode ligatures based on Unicode Standard Annex #15.

Examples:

We can put in some text with a composed character, here it's in it's normal 00e5 form, and we get the decomposed version out, with the circle combining character: a\u030a.

json> {"input": "kr\u00f8stek\u00e5l och risbudding"}
....>
JSON accepted

idml> output = input.normalize("NFD")
....>
{
  "output" : "krøstekål och risbudding" // "kr\u00f8steka\u030al och risbudding"
}

And we can do the other direction too:

We pass in the a\u030a and get \u00e5 out.

json> {"input": "kr\u00f8steka\u030al och risbudding"}
....>
JSON accepted

idml> output = input.normalize("NFC")
....>
{
  "output" : "krøstekål och risbudding" // "kr\u00f8stek\u00e5l och risbudding"
}
491a5e1
Compare
Choose a tag to compare