elexis-eu / elexifier

https://elexifier.elex.is
3 stars 3 forks source link

Changes to the Example transformer #48

Closed andrazrepar closed 2 years ago

andrazrepar commented 2 years ago

The Example transformer has a new JSON specification:

        "type": "simple",
        "selector": {
            "type": "xpath",
            "expr": ".//Example"
        },
        "attr": "{http://elex.is/wp1/teiLex0Mapper/meta}innerText",
        "rex": "",
        "adoptSelector": {
            "type": "xpath",
            "expr": "..//Translation"
        }
    }

There is a new element called adoptSelector, which tells the script to move the example translation into the Example element. You can find an example of how it works at http://capybara.ijs.si/janez/elexis/transformDemo.html in the MLDS dictionary.

This means that the UI for the Example transformer needs an additional field where users can enter the xpath of the translation element.

image

Let's add it under VALUE. It needs to offer the same prefill options as the main element field when you start typing.

LukeItUp commented 2 years ago

Staging has the latest version of transformation script.

gradisarjoze commented 2 years ago

Deployed to staging