Hello
I was doing some experiments and I ended up with this:
let $c := <Class Source='{ttt'></Class> return $c/@Source
When this is compiled in the BaseX GUI app, an error message ensues:
Error: Stopped at ... /file3, 1/30: [XPST0003] Expecting '}', found '''. Query: let $c := <Class Source='{ttt'></Class> return $c/@Source Query plan: <QueryPlan compiled="false" updating="false"/>
Surely that is not correct? If I add a } there, everything is fine:
let $c := <Class Source='{ttt}'></Class> return $c/@Source
I don't think there is an XML requirement forcing escaping start brace ('{') inside an attribute value? I know that XQuery supports <X A='{...}' /> where the inside of the {} is evaluated to give the value for the A attribute, but the example above is not XQuery, just an XML literal.
I am sure I would have noticed this if it were a general problem.
Best Regards
Peter Villadsen Principal Architect Microsoft Business Applications Group
On Sun, 2020-04-05 at 22:21 +0000, Peter Villadsen wrote:
Hello
I was doing some experiments and I ended up with this:
let $c := <Class Source='{ttt'></Class>
This is an error because the braces surround expresions: <Class Source='{ concat("t", "ttt") }'> would work.
Similarly you can write <boy>{ concat('dirt', 'noise') }</boy> of course.
Liam
basex-talk@mailman.uni-konstanz.de