Passing Saxon options to XQuery processor?
Posted: Mon Jan 09, 2006 9:14 pm
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,
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:
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]
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";
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>
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]