Bug in XQuery "Outline" display of functions

Having trouble installing Oxygen? Got a bug to report? Post it all here.
joewiz
Posts: 56
Joined: Fri Jun 06, 2008 8:05 pm

Bug in XQuery "Outline" display of functions

Post by joewiz »

Using oXygen XML Editor v10.3 on both XP and Mac OS X (10.6), I have noticed that in some of my XQuery files, the Outline view doesn't show all the functions in the xquery module.

For example, in one of my xquery files, I have nearly 35 functions, but the outline view only shows 5! The 5 listed come from throughout the file - they aren't just the first ones. The same 5 appear regardless of my Group By settings.

After testing this just now, I discovered a few ways to reproduce this:

Use "$text", "$node", "$element", or "$item" as one of the function parameters, e.g.

(: this function will *not* appear in the outline view :)
declare function local:hey1($text) {
'you'
};

(: this function *will* appear in the outline view :)
declare function local:hey2() {
'you'
};

(: this function will *not* appear in the outline view :)
declare function local:hey3($node) {
'you'
};

(: this function will *not* appear in the outline view :)
declare function local:hey4($element) {
'you'
};

(: this function will *not* appear in the outline view :)
declare function local:hey5($item) {
'you'
};

Only local:hey2() will appear in the outline view pane.

Is there a way to fix this? I'd really appreciate it if there is! I use $node and $element a fair amount; if I need to change, I can, but I imagine that many users will encounter this bug.

Thanks,
Joe
joewiz
Posts: 56
Joined: Fri Jun 06, 2008 8:05 pm

Re: Bug in XQuery "Outline" display of functions

Post by joewiz »

p.s. I'm using build 2009090215
sorin_ristache
Posts: 4141
Joined: Fri Mar 28, 2003 2:12 pm

Re: Bug in XQuery "Outline" display of functions

Post by sorin_ristache »

Hello,

The only workaround in the current version is to change the name of the parameter. We will fix the bug in the next version.


Thank you for reporting it,
Sorin
joewiz
Posts: 56
Joined: Fri Jun 06, 2008 8:05 pm

Re: Bug in XQuery "Outline" display of functions

Post by joewiz »

Hi Sorin,

Thanks so much for your quick reply. Great! I'll follow the release feed for the next version.

Joe
joewiz
Posts: 56
Joined: Fri Jun 06, 2008 8:05 pm

Re: Bug in XQuery "Outline" display of functions

Post by joewiz »

Hi Sorin,

Congrats on the release of oXygen 11!

As far as I can tell, this issue I reported above with the XQuery outline not showing certain parameters is not fixed in oXygen 11. For example, the following function

Code: Select all

declare namespace fo="http://www.w3.org/1999/XSL/Format";
declare namespace render="joe's-tei2fo-render";

declare function render:figure($node, $options) {
<fo:block text-align="center" space-before="5mm" space-after="5mm">{$node/text()}</fo:block>
};
appears as render:figure(, ) in the outline mode.

Will it be possible to address this in a future revision?

Thanks,
Joe


p.s. Thanks for fixing the indent issue I reported in a separate post!
sorin_ristache
Posts: 4141
Joined: Fri Mar 28, 2003 2:12 pm

Re: Bug in XQuery "Outline" display of functions

Post by sorin_ristache »

Hello,

We will fix it and we will let you know.


Thank you for reporting it,
Sorin
joewiz
Posts: 56
Joined: Fri Jun 06, 2008 8:05 pm

Re: Bug in XQuery "Outline" display of functions

Post by joewiz »

Thank you, Sorin.
joewiz
Posts: 56
Joined: Fri Jun 06, 2008 8:05 pm

Re: Bug in XQuery "Outline" display of functions

Post by joewiz »

Sorin,

I've retested my hey1-hey5 examples with build 2009101512, and they all appear in the Outline, except that the parameters are blank. They appear in the Outline, for example, as local:hey1().

In further testing, I've found two cases where functions will not appear at all, when a parameter is named $function or $module:

declare function local:test1($function) {
'hello'
};

declare function local:test2($module) {
'hello'
};

- Joe
sorin_ristache
Posts: 4141
Joined: Fri Mar 28, 2003 2:12 pm

Re: Bug in XQuery "Outline" display of functions

Post by sorin_ristache »

Yes, the parameter list is empty and the cases of $function and $module are not fixed yet. We will fix these cases in version 11.1.


Regards,
Sorin
joewiz
Posts: 56
Joined: Fri Jun 06, 2008 8:05 pm

Re: Bug in XQuery "Outline" display of functions

Post by joewiz »

Thanks for your reply, Sorin. I didn't realize you were already aware of the $function and $module variable behavior. Many thanks.

- Joe
Post Reply