Page 1 of 1

Passing Saxon options to XQuery processor?

Posted: Mon Jan 09, 2006 9:14 pm
by dsewell
I have been using the beta version of oXygen 7.0 (Mac OS X standalone).
It appears that when executing an XQuery program using Saxon 8, oXygen
does not pass to Saxon any serialization parameters declared in the
XQuery prolog. For example,

Code: Select all

declare option saxon:output "indent=no";
These options are documented here:

http://www.saxonica.com/documentation/e ... xtras.html

(note that there are syntax errors in the examples, where the quotation
mark starts before "saxon:output -- it should follow)

I see that oXygen 7 adds an XQuery preference "Format transformer
output" that can achieve the same thing as the above declaration (if it
is turned off), but it would be good to be able to control serialization
from within the XQuery script sometimes.

Also, as an observation, if "Format transformer output" is unchecked,
and in the XQuery transformation scenario under "Output" one checks
"Show as XML", oXygen runs extremely slowly (or hangs) if the output is
a long file. For example, given this XQuery:

Code: Select all

<list>{
for $i in doc("All.xml")//item
order by $i/ab
return $i
}</list>
where file All.xml is a ~1MB file with 4500 <item> elements. I assume
that the problem is the huge single line that is passed to the display
window (if I uncheck "Show as XML" to prevent the display, the
transformation completes in a few seconds). You might want to disallow
"Show as XML" in a case where the output is unformatted?
[/code][/url]

Posted: Tue Jan 10, 2006 7:06 pm
by alex_jitianu
Hello,

Concerning your question about the saxon serialization parameters, Oxygen uses its own serialization of the output of the transformation, so these params are not curently used. We will think of a way of integrating them in the next version of Oxygen (after 7.0).
We are aware of the problem you mentioned and we will think of a solution...

Best regards,
Alex

Posted: Mon May 08, 2006 5:10 pm
by Radu
Hi,

Just wanted to let you know that we are now using the Saxon output serializer which also respects the parameters set in the XQuery file.
We also improved the performance when the output is produced on a single line.

The fix will most probably be available in the 7.2 maintainance version.

Regards,
Radu