Uncommenting code when writing XQuery
Issues related to W3C XQuery.
-
- Posts: 102
- Joined: Tue Aug 19, 2014 12:04 pm
Uncommenting code when writing XQuery
Post by Martin Honnen »
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>
-
- Posts: 9431
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Uncommenting code when writing XQuery
Hi Martin,
Thanks for the suggestion, I will add an internal issue to look into this.
Of course there is also this way to add a comment inside that XML:
if the end user actually wants the XML comment to appear in the output.
So I'm not sure what the end user actually wants when invoking the "Toggle comment" in an XML document inside an XQuery.
Regards,
Radu
Thanks for the suggestion, I will add an internal issue to look into this.
Of course there is also this way to add a comment inside that XML:
Code: Select all
<root>
<!--<foo>a</foo>-->
<bar>1</bar>
</root>
So I'm not sure what the end user actually wants when invoking the "Toggle comment" in an XML document inside an XQuery.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 102
- Joined: Tue Aug 19, 2014 12:04 pm
Re: Uncommenting code when writing XQuery
Post by Martin Honnen »
I agree that using an XML comment with
is also an option a user editing XQuery might want or expect with the "Toggle comment" feature. On the other hand, I for sure was looking for a way for the editor to assist me in commenting out that element and not to produce a comment with the element.
Code: Select all
<root>
<!--<foo>a</foo>-->
<bar>1</bar>
</root>
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service