2015-09-30 10:23:57 +00:00
|
|
|
@@
|
2019-04-28 15:13:29 +00:00
|
|
|
/* Avoid running this transformation on the strempty function itself */
|
|
|
|
position p : script:python() { p[0].current_element != "strempty" };
|
2015-09-30 10:23:57 +00:00
|
|
|
expression s;
|
|
|
|
@@
|
2019-04-28 15:13:29 +00:00
|
|
|
(
|
|
|
|
- s@p ?: ""
|
2015-09-30 10:23:57 +00:00
|
|
|
+ strempty(s)
|
2019-04-28 15:13:29 +00:00
|
|
|
|
|
|
|
|
- s@p ? s : ""
|
2015-09-30 10:23:57 +00:00
|
|
|
+ strempty(s)
|
2019-04-28 15:13:29 +00:00
|
|
|
)
|
|
|
|
|
2018-01-10 16:11:19 +00:00
|
|
|
@@
|
2019-04-28 15:13:29 +00:00
|
|
|
position p : script:python() { p[0].current_element != "strempty" };
|
2018-01-10 16:11:19 +00:00
|
|
|
expression s;
|
|
|
|
@@
|
2019-04-28 15:13:29 +00:00
|
|
|
- if (!s@p)
|
2018-01-10 16:11:19 +00:00
|
|
|
- s = "";
|
|
|
|
+ s = strempty(s);
|
2019-04-28 15:13:29 +00:00
|
|
|
|
2018-01-10 16:11:19 +00:00
|
|
|
@@
|
2019-04-28 15:13:29 +00:00
|
|
|
position p : script:python() { p[0].current_element != "strnull" };
|
2018-01-10 16:11:19 +00:00
|
|
|
expression s;
|
|
|
|
@@
|
2019-04-28 15:13:29 +00:00
|
|
|
(
|
|
|
|
- s@p ?: "(null)"
|
2018-01-10 16:11:19 +00:00
|
|
|
+ strnull(s)
|
2019-04-28 15:13:29 +00:00
|
|
|
|
|
|
|
|
- s@p ? s : "(null)"
|
2018-01-10 16:11:19 +00:00
|
|
|
+ strnull(s)
|
2019-04-28 15:13:29 +00:00
|
|
|
)
|
|
|
|
|
2018-01-10 16:11:19 +00:00
|
|
|
@@
|
2019-04-28 15:13:29 +00:00
|
|
|
position p : script:python() { p[0].current_element != "strnull" };
|
2018-01-10 16:11:19 +00:00
|
|
|
expression s;
|
|
|
|
@@
|
2019-04-28 15:13:29 +00:00
|
|
|
- if (!s@p)
|
2018-01-10 16:11:19 +00:00
|
|
|
- s = "(null)";
|
|
|
|
+ s = strnull(s);
|
2019-04-28 15:13:29 +00:00
|
|
|
|
2018-01-10 16:11:19 +00:00
|
|
|
@@
|
2019-04-28 15:13:29 +00:00
|
|
|
position p : script:python() { p[0].current_element != "strna" };
|
2018-01-10 16:11:19 +00:00
|
|
|
expression s;
|
|
|
|
@@
|
2019-04-28 15:13:29 +00:00
|
|
|
(
|
|
|
|
- s@p ?: "n/a"
|
2018-01-10 16:11:19 +00:00
|
|
|
+ strna(s)
|
2019-04-28 15:13:29 +00:00
|
|
|
|
|
|
|
|
- s@p ? s : "n/a"
|
2018-01-10 16:11:19 +00:00
|
|
|
+ strna(s)
|
2019-04-28 15:13:29 +00:00
|
|
|
)
|
|
|
|
|
2018-01-10 16:11:19 +00:00
|
|
|
@@
|
2019-04-28 15:13:29 +00:00
|
|
|
position p : script:python() { p[0].current_element != "strna" };
|
2018-01-10 16:11:19 +00:00
|
|
|
expression s;
|
|
|
|
@@
|
2019-04-28 15:13:29 +00:00
|
|
|
- if (!s@p)
|
2018-01-10 16:11:19 +00:00
|
|
|
- s = "n/a";
|
|
|
|
+ s = strna(s);
|