Hi Godmar,
without consulting the grammar: I guess this is due to evaluating the contents of curly braces in return statements. The // evaluates to descendant-or-self and the following 'a' to a node-test. The subsequent 'C comment' evaluates to neither another location-step nor a predicate, so the expression produces a syntax error.
Most probably the XQJ binding handled this escaping automatically, perhaps a team member with more expertise in XQJ could address this.
Hope I could clear things up a little. Feel free to ask more. Kind regards Michael
Am 19.08.2010 um 06:10 schrieb Godmar Back:
Is this a bug in BaseX? I thought that the use of CDATA is optional and required only if one wishes to avoid escaping <, >, & in PCDATA. If CDATA is required, I would have to convert my XML document in this way. The problem did not occur in the XQJ binding.
I haven't consulted the grammar; I'm following my intuition here that XQuery should allow embedded XML fragments. Is this not so?