Suppose I write an XQuery where I first have e.g.
Code: Select all
>
<root>
<foo>a</foo>
<bar>1</bar>
</root>
and then decide to comment out the "foo" element node by selecting it with the mouse and using the context menu in XML Editor 19.1, build 2017121318, "toggle comment", then oXygen gives me
Code: Select all
<root>
(:<foo>a</foo>:)
<bar>1</bar>
</root>
that is, it wraps the element node into XQuery comment delimiters. This, however, does not comment out the element node, when I run the query the result is
Code: Select all
<root>
(:<foo>a</foo>:)
<bar>1</bar>
</root>
, meaning the attempt of oXygen to comment out the element has only resulted into inserting text before and after the element.
I think the right way to comment out something in content is to use an enclosed expression
Code: Select all
<root>
{(:<foo>a</foo>:)}
<bar>1</bar>
</root>
So it seems the "toggle comment" menu feature for XQuery editing could be enhanced to make sure that a necessary enclosed expression is used to comment out literal content.