Format and Indent XQuery

Are you missing a feature? Request it's implementation here.
Steve Mallen
Posts: 4
Joined: Tue Jun 19, 2007 5:27 pm
Location: Brighton

Format and Indent XQuery

Post by Steve Mallen » Wed Jul 25, 2007 4:18 pm

Hi,

We are using Oxygen 8.2 to run and debug XQuery against a Mark Logic 3.2 database. This works really well, but there are a couple of things that would make the experience even better:

1) It would be really great if Oxygen could format and indent XQuery code.
2) There still seems to be no XQuery validation support with Mark Logic 3.2 and Oxygen 8.2

Many thanks,
-Steve Mallen

sorin_ristache
Posts: 4144
Joined: Fri Mar 28, 2003 2:12 pm

Post by sorin_ristache » Wed Jul 25, 2007 5:23 pm

Hello,

Format and indent for XQuery files will be implemented in a future version of oXygen. The version number which will add this feature was not planned.

XQuery validation support can be implemented in oXygen only if the MarkLogic server has validation support. There is no version of the MarkLogic server yet with validation support.


Regards,
Sorin

Steve Mallen
Posts: 4
Joined: Tue Jun 19, 2007 5:27 pm
Location: Brighton

Post by Steve Mallen » Wed Jul 25, 2007 5:57 pm

Sorin,

Many thanks for the quick reply. We will nag Mark Logic to implement validation support asap :)

-Steve/

cefn
Posts: 15
Joined: Thu Jul 12, 2007 6:20 pm
Location: Ipswich, UK

Re: Format and Indent XQuery

Post by cefn » Fri Nov 14, 2008 5:45 pm

I agree that formatting XQuery is very important.

It's mainly XQuery and RelaxNG support that recommends Oxygen to our project, so it would be good to see development in this area.

sorin_ristache
Posts: 4144
Joined: Fri Mar 28, 2003 2:12 pm

Re: Format and Indent XQuery

Post by sorin_ristache » Fri Nov 14, 2008 6:00 pm

Hello,

Format and indent (pretty print) was not implemented yet for XQuery files but we will consider it for a future version of Oxygen.


Regards,
Sorin

feickertmd
Posts: 11
Joined: Tue Nov 23, 2010 8:00 pm

Re: Format and Indent XQuery

Post by feickertmd » Thu Jun 04, 2015 9:12 pm

Still not done in v17!!!

Costin
Posts: 621
Joined: Mon Dec 05, 2011 6:04 pm

Re: Format and Indent XQuery

Post by Costin » Thu Jun 04, 2015 9:36 pm

Hello,

Actually, format and indenting XQuery documents is already possible in version 17, for XQuery files which are in compliance with W3C XQuery 1.0, XQuery Update Facility 1.0, and XQuery 3.0 specifications.

You can pretty print XQuery documents from oXygen menu Document > Source > Format and Indent, or by using the related button in the toolbar.

The format and indent for XQuery functionality is also mentioned in our User-Guide, at:
http://www.oxygenxml.com/doc/versions/1 ... print.html

Regards,
Costin
Costin Sandoi
oXygen XML Editor and Author Support

feickertmd
Posts: 11
Joined: Tue Nov 23, 2010 8:00 pm

Re: Format and Indent XQuery

Post by feickertmd » Tue Jun 30, 2015 9:31 pm

Thanks for the tip, Costin. Is there any way to customize the formatting? By default, it will place a line feed between curly braces and a one-line command, which I would only do for multi-line code.

So this:

Code: Select all

<name>{$person/first-name}</name>
Becomes this:

Code: Select all

<name>{
$person/first-name
}</name>

That makes the code a little harder to read at a glance. It would be better if such a format only applied for multi-line expressions, like FLOWRs.

Costin
Posts: 621
Joined: Mon Dec 05, 2011 6:04 pm

Re: Format and Indent XQuery

Post by Costin » Wed Jul 01, 2015 3:27 pm

Hi,

I am happy to let you know that this behavior was also corrected in a subsequent maintenance build of oXygen (2015051321).
Here is the relevant excerpt from the build notes:
XQuery/Format and Indent: Improved line breaking when formatting expressions placed between curly brackets.
Therefore, updating to the latest build available on our website should solve the issue related to the insertion of the line feed while pretty-printing XQuery files.

Regards,
Costin
Costin Sandoi
oXygen XML Editor and Author Support

Post Reply