Closed parmentf closed 9 years ago
It seems that each action make the next one lose the context, so it is not proper to assert, but it remains annoying in assert case.
To bypass this behavior, one case use the compute
action, in conjunction with the ?:
operator:
{
"$doi": {
"path": "content.json.doi"
},
"$doiurl": {
"compute": "doi ? \"http://dx.doi.org/\"+doi : null"
}
}
However, an assert keeping the original context would still be useful for more complicated cases.
After a assert on a true value, already created preoperties are no more accessible.
Ex: input:
stylesheet:
output:
Where
doiurl
should not containundefined
but the value ofdoi
.When you remove the
assert
part of the stylesheet,prepend
works as intented.