This query doesn't work because the serializer of the query result throws an error. The result of a query must not be an attribute. fn:trace does work on my side:
./bin/zorba -q 'trace(attribute { "a" } { 1 }, "a")'
a [1]: a="1" <========== fn:trace print
<?xml version="1.0" encoding="UTF-8"?>
serialization error [err:SENR0001]: "1": can not serialize attribute node; raised at /home/dagraf/zorba/sandbox/src/api/serialization/serializer.cpp:456
You need to execute something like: ./bin/zorba -q 'data(trace(attribute { "a" } { 1 }, "a"))'
... to not see an error.
This query doesn't work because the serializer of the query result throws an error. The result of a query must not be an attribute. fn:trace does work on my side:
./bin/zorba -q 'trace(attribute { "a" } { 1 }, "a")' zorba/sandbox/ src/api/ serialization/ serializer. cpp:456
a [1]: a="1" <========== fn:trace print
<?xml version="1.0" encoding="UTF-8"?>
serialization error [err:SENR0001]: "1": can not serialize attribute node; raised at /home/dagraf/
You need to execute something like: ./bin/zorba -q 'data(trace( attribute { "a" } { 1 }, "a"))'
... to not see an error.