Uncommenting code when writing XQuery
Posted: Thu Dec 21, 2017 11:42 am
Suppose I write an XQuery where I first have e.g.
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
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
, 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
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.
Code: Select all
>
<root>
<foo>a</foo>
<bar>1</bar>
</root>
Code: Select all
<root>
(:<foo>a</foo>:)
<bar>1</bar>
</root>
Code: Select all
<root>
(:<foo>a</foo>:)
<bar>1</bar>
</root>
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>