Skip to content

Add XML declaration example to XSLT mediator documentation - #2337

Open
ChaninduImanjith wants to merge 1 commit into
wso2:mainfrom
ChaninduImanjith:fixing-issue-1681
Open

Add XML declaration example to XSLT mediator documentation#2337
ChaninduImanjith wants to merge 1 commit into
wso2:mainfrom
ChaninduImanjith:fixing-issue-1681

Conversation

@ChaninduImanjith

Copy link
Copy Markdown
Contributor

Purpose

Resolves #1681

Goals

Add documentation on how to include the XML declaration (<?xml version="1.0" encoding="utf-8"?>) in WSO2 MI output payloads using the WRITE_XML_DECLARATION axis2 property.

Approach

Added Example 5 to the XSLT mediator documentation explaining how to use the WRITE_XML_DECLARATION property with a code example and expected output.

User stories

As a WSO2 MI developer, I want to know how to add an XML declaration to my output payload so that downstream systems that require it can process the response correctly.

Release note

Added documentation for adding XML declaration to output payloads using the WRITE_XML_DECLARATION axis2 property in the XSLT mediator docs.

Documentation

en/docs/reference/mediators/xslt-mediator.md

Training

N/A

Certification

N/A - Documentation-only update.

Marketing

N/A

Automation tests

N/A - No code changes introduced.

Security checks

  • Followed secure coding standards? Yes
  • Ran FindSecurityBugs plugin? N/A
  • No keys, passwords, or secrets committed? Yes

Samples

N/A

Related PRs

N/A

Migrations

N/A

Test environment

Tested on Fedora OS (local documentation verification).

Learning

Solution referenced from https://stackoverflow.com/questions/13019908/wso2-xml-declaration

Add XML declaration example to XSLT mediator docs
Copilot AI review requested due to automatic review settings June 27, 2026 07:07
@coderabbitai

coderabbitai Bot commented Jun 27, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

@ChaninduImanjith, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 55 minutes and 4 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more credits in the billing tab to continue.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits.

🚦 How do rate limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 360763f1-7016-4eee-b174-f86ddb31a21a

📥 Commits

Reviewing files that changed from the base of the PR and between f3e7aa6 and d331ed2.

📒 Files selected for processing (1)
  • en/docs/reference/mediators/xslt-mediator.md
📝 Walkthrough

Walkthrough

The XSLT mediator reference adds “Example 5 - Adding XML declaration to the output.” It documents the default output behavior, shows how to set the WRITE_XML_DECLARATION property in axis2 scope, includes a sequence example, and shows the resulting XML output with the declaration.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and accurately summarizes the documentation-only change.
Description check ✅ Passed The description follows the template closely and includes relevant details for all major sections.
Linked Issues check ✅ Passed The PR addresses issue #1681 by documenting how to add an XML declaration using WRITE_XML_DECLARATION.
Out of Scope Changes check ✅ Passed The change set appears scoped to the requested documentation update with no unrelated additions.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the XSLT mediator documentation to explain how to include an XML declaration in WSO2 MI output payloads by setting the WRITE_XML_DECLARATION Axis2 property.

Changes:

  • Adds a new “Example 5” showing how to enable WRITE_XML_DECLARATION in the axis2 scope.
  • Provides a short snippet, a full sequence example, and the expected XML output including the declaration.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread en/docs/reference/mediators/xslt-mediator.md
Then the XSLT transformation happens in memory without writing data to disk. Therefore, performance is increased.

If the input or transformed message size exceeds the value of `<synapse.temp_data_chunk_size>`, the XSLT Mediator creates temporary files at `<MI_HOME>/tmp`. These files are not explicitly deleted by the WSO2 Integrator: MI. The lifecycle of these files is managed by Java's Garbage Collector (GC). When no references to the temporary files remain, they will be expected to be deleted as part of the `java.lang.Object.finalize()` method. No newline at end of file
If the input or transformed message size exceeds the value of `<synapse.temp_data_chunk_size>`, the XSLT Mediator creates temporary files at `<MI_HOME>/tmp`. These files are not explicitly deleted by the WSO2 Integrator: MI, so you may need to clean up this directory periodically.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's have the original note.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done! Reverted the Copilot suggestion and restored the original note. @chanikag

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

Successfully merging this pull request may close these issues.

Add content on How to add xml declaration to payloads

3 participants