Project

Profile

Help

Bug #4439

closed

XQJ reads but ignores output: serialization parameters

Added by Andreas Sewe over 4 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
Low
Assignee:
-
Category:
XQuery Java API
Sprint/Milestone:
-
Start date:
2020-01-23
Due date:
% Done:

0%

Estimated time:
Legacy ID:
Applies to branch:
9.9
Fix Committed on Branch:
Fixed in Maintenance Release:
Platforms:

Description

This bug occurs with Saxon 9.9.1 PE using the XQJ API.

I have attached a simple Maven project with which you can reproduce. Just run mvn clean verify exec:java

If I explicitly set serialization parameters as a java.util.Properties object passed to XQResultSequence.writeSequence, parameters like method are respected:

With output parameters passed as Java Properties
<!DOCTYPE html><html>
   <head>
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
      <title>With output parameters passed as Java Properties</title>
   </head>
   <body></body>
</html>

If I use inline declare option output:method and output:html-version, however, they are read but then ignored during writeSequence:

With inline output: parameters
<html>
   <head>
      <title>With inline output: parameters</title>
   </head>
   <body/>
</html>

Likewise, when using an output:parameter-document., the document is read (and you get a static error if it cannot be located, relative to ${user.dir}), but its contents are ignored during writeSequence:

With output:parameter-document
<html>
   <head>
      <title>With output:parameter-document</title>
   </head>
   <body/>
</html>

I realize that JSR 225 doesn’t say anything about output: serialization parameters, as AFAIK XSLT and XQuery Serialization wasn’t a thing back then, but I would expect them to be respected. After all, they do already cause static errors when malformed (e.g., unknown output:method or unresolvable output:parameter-document).


Files

saxon-bug.zip (2.79 KB) saxon-bug.zip Minimal Maven project to reproduce Andreas Sewe, 2020-01-23 21:57
saxon-bug.zip (2.79 KB) saxon-bug.zip (Fixed) minimal Maven project to reproduce Andreas Sewe, 2020-01-23 22:03
basex-demo.zip (2.73 KB) basex-demo.zip Minimal Maven project to demonstrate the behavior of BaseX Andreas Sewe, 2020-01-26 19:35

Please register to edit this issue

Also available in: Atom PDF