Page 1 of 1

Bug in XQuery "Outline" display of functions

Posted: Sun Sep 06, 2009 8:05 pm
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

Re: Bug in XQuery "Outline" display of functions

Posted: Sun Sep 06, 2009 8:20 pm
by joewiz
p.s. I'm using build 2009090215

Re: Bug in XQuery "Outline" display of functions

Posted: Mon Sep 07, 2009 3:05 pm
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

Re: Bug in XQuery "Outline" display of functions

Posted: Mon Sep 07, 2009 5:51 pm
by joewiz
Hi Sorin,

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

Joe

Re: Bug in XQuery "Outline" display of functions

Posted: Sat Oct 10, 2009 6:22 am
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!

Re: Bug in XQuery "Outline" display of functions

Posted: Mon Oct 12, 2009 12:29 pm
by sorin_ristache
Hello,

We will fix it and we will let you know.


Thank you for reporting it,
Sorin

Re: Bug in XQuery "Outline" display of functions

Posted: Mon Oct 12, 2009 4:34 pm
by joewiz
Thank you, Sorin.

Re: Bug in XQuery "Outline" display of functions

Posted: Tue Oct 20, 2009 1:21 am
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

Re: Bug in XQuery "Outline" display of functions

Posted: Tue Oct 20, 2009 12:26 pm
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

Re: Bug in XQuery "Outline" display of functions

Posted: Tue Oct 20, 2009 2:19 pm
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