]>
Commit | Line | Data |
---|---|---|
de896126 | 1 | @@ |
60d9959d FS |
2 | /* Avoid running this transformation on the strempty function itself */ |
3 | position p : script:python() { p[0].current_element != "strempty" }; | |
de896126 DM |
4 | expression s; |
5 | @@ | |
60d9959d FS |
6 | ( |
7 | - s@p ?: "" | |
de896126 | 8 | + strempty(s) |
60d9959d FS |
9 | | |
10 | - s@p ? s : "" | |
de896126 | 11 | + strempty(s) |
60d9959d FS |
12 | ) |
13 | ||
ad5d4b17 | 14 | @@ |
60d9959d | 15 | position p : script:python() { p[0].current_element != "strempty" }; |
ad5d4b17 LP |
16 | expression s; |
17 | @@ | |
60d9959d | 18 | - if (!s@p) |
ad5d4b17 LP |
19 | - s = ""; |
20 | + s = strempty(s); | |
60d9959d | 21 | |
ad5d4b17 | 22 | @@ |
60d9959d | 23 | position p : script:python() { p[0].current_element != "strnull" }; |
ad5d4b17 LP |
24 | expression s; |
25 | @@ | |
60d9959d FS |
26 | ( |
27 | - s@p ?: "(null)" | |
ad5d4b17 | 28 | + strnull(s) |
60d9959d FS |
29 | | |
30 | - s@p ? s : "(null)" | |
ad5d4b17 | 31 | + strnull(s) |
60d9959d FS |
32 | ) |
33 | ||
ad5d4b17 | 34 | @@ |
60d9959d | 35 | position p : script:python() { p[0].current_element != "strnull" }; |
ad5d4b17 LP |
36 | expression s; |
37 | @@ | |
60d9959d | 38 | - if (!s@p) |
ad5d4b17 LP |
39 | - s = "(null)"; |
40 | + s = strnull(s); | |
60d9959d | 41 | |
ad5d4b17 | 42 | @@ |
60d9959d | 43 | position p : script:python() { p[0].current_element != "strna" }; |
ad5d4b17 LP |
44 | expression s; |
45 | @@ | |
60d9959d FS |
46 | ( |
47 | - s@p ?: "n/a" | |
ad5d4b17 | 48 | + strna(s) |
60d9959d FS |
49 | | |
50 | - s@p ? s : "n/a" | |
ad5d4b17 | 51 | + strna(s) |
60d9959d FS |
52 | ) |
53 | ||
ad5d4b17 | 54 | @@ |
60d9959d | 55 | position p : script:python() { p[0].current_element != "strna" }; |
ad5d4b17 LP |
56 | expression s; |
57 | @@ | |
60d9959d | 58 | - if (!s@p) |
ad5d4b17 LP |
59 | - s = "n/a"; |
60 | + s = strna(s); |