http://docs.basex.org/wiki/XQuery_Update mentions insert attribute. So how can I insert attribute?
$ cat x.xq copy $c := <entry> <title>Transform expression example</title> <author>BaseX Team</author> </entry> modify ( replace value of node $c/author with 'BaseX', replace value of node $c/title with concat('Copy of: ', $c/title), insert node <author>Joey</author> into $c, insert attribute Z {'B'} into $c/title, ) return $c $ basex x.xq Stopped at /tmp/x.xq, 10/10: [XPST0003] Expecting ')', found 'a'. $ apt-cache policy basex basex: Installed: 7.8.2-1 Candidate: 7.8.2-1 Version table: *** 7.8.2-1 0 500 http://ftp.br.debian.org/debian/ unstable/main i386 Packages 100 /var/lib/dpkg/status