Closed tjroamer closed 2 years ago
Hi @tjroamer
Thanks for the issue. It indeed seems like a bug. We will look into it!
It's possible to do this by escaping the first )
, resulting in the following YARRRML rules.
prefixes:
ex: http://www.example.com/
mappings:
ExampleMap:
sources:
- [example.xml~xpath, /Root]
s: ex:Root
po:
- [a, ex:Model]
- [ex:compIndex, $(count(preceding-sibling\:\:Comp\))]
Yes, adding the backslash resolved the issue. Thanks.
Great! Can we close this issue then?
Sure, thanks for your support.
Issue type: :bug: Bug
Description
The parser failed to handle template with xpath functions
Steps
Use the following yaml as input
The parser generates the following output for the last line which contains an xpath function
count(..)
:Expected output for the marked line is:
rr:template "{count(preceding-sibling::Comp)}"
Environment
Java version: openjdk 11.0.14.1 2022-02-08 LTS OS: Windows 10