Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] default serialization changed and parameter not respected #5096

Open
line-o opened this issue Oct 17, 2023 · 1 comment
Open

[BUG] default serialization changed and parameter not respected #5096

line-o opened this issue Oct 17, 2023 · 1 comment
Milestone

Comments

@line-o
Copy link
Member

line-o commented Oct 17, 2023

Describe the bug

Starting with exist-db 7.0.0-SNAPSHOT documents that are serialised to XML (at least over XML-RPC) do no longer respect the omit-xml-declaration option.

Before, setting it to 'yes' did omit the declaration and this is also the default behaviour in all released versions.

Expected behavior

The XML-RPC API to continue to respect serialization settings.

To Reproduce

If the above isn't working, please tell us the exact steps you took when you encountered the problem:

  1. Request any XML document over XML-RPC

  2. It will have an XML declaration at the beginning

  3. Request any XML document over XML-RPC and set omit-xml-declaration to yes

  4. It will have an XML declaration at the beginning

Context (please always complete the following information)

  • Build: eXist-7.0.0-SNAPSHOT (b032a42)
  • Java: 17.0.6 (Azul Systems, Inc.)
  • OS: Mac OS X 13.5.2 (aarch64)

Additional context

  • How is eXist-db installed? docker image
  • Any custom changes in e.g. conf.xml? none
@line-o
Copy link
Member Author

line-o commented Oct 17, 2023

Relevant Test output from node-exist

# serialized with default options
not ok 47 file was read
  ---
    operator: equal
    expected: |-
      '<collection>\n    <item property="value"/>\n</collection>'
    actual: |-
      '<?xml version="1.0" encoding="UTF-8"?>\n<collection>\n    <item property="value"/>\n</collection>'
    at: Test.<anonymous> (/home/runner/work/node-exist/node-exist/spec/tests/documents.js:84:10)
    stack: |-
      Error: file was read
          at Test.assert [as _assert] (/home/runner/work/node-exist/node-exist/node_modules/tape/lib/test.js:312:48)
          at Test.bound [as _assert] (/home/runner/work/node-exist/node-exist/node_modules/tape/lib/test.js:95:17)
          at Test.strictEqual (/home/runner/work/node-exist/node-exist/node_modules/tape/lib/test.js:476:7)
          at Test.bound [as equal] (/home/runner/work/node-exist/node-exist/node_modules/tape/lib/test.js:95:17)
          at Test.<anonymous> (/home/runner/work/node-exist/node-exist/spec/tests/documents.js:84:10)
          at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
  ...
# serialized without XML declaration
not ok 48 expected file contents received
  ---
    operator: equal
    expected: |-
      '<collection>\n    <item property="value"/>\n</collection>'
    actual: |-
      '<?xml version="1.0" encoding="UTF-8"?>\n<collection>\n    <item property="value"/>\n</collection>'
    at: Test.<anonymous> (/home/runner/work/node-exist/node-exist/spec/tests/documents.js:102:10)
    stack: |-
      Error: expected file contents received
          at Test.assert [as _assert] (/home/runner/work/node-exist/node-exist/node_modules/tape/lib/test.js:312:48)
          at Test.bound [as _assert] (/home/runner/work/node-exist/node-exist/node_modules/tape/lib/test.js:95:17)
          at Test.strictEqual (/home/runner/work/node-exist/node-exist/node_modules/tape/lib/test.js:476:7)
          at Test.bound [as equal] (/home/runner/work/node-exist/node-exist/node_modules/tape/lib/test.js:95:17)
          at Test.<anonymous> (/home/runner/work/node-exist/node-exist/spec/tests/documents.js:102:10)
          at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
  ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant