Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

...

...

...


Warning

Deprecation notice:

Please note that the URL user and URL password parameters are deprecated and will be removed on March 31, 2022. We recommend using profiles to access your data from remote locations.

Features

  • Uses XSLT to transform XML to HTML, XHTML, or wiki markup. Supports XSLT 1.0.
  • Supports working with XSL parameters; only available with wiki output format. See Passing parameters to the XSLT engine section.
  • Supports security restrictions as described in Macro Security for Confluence.
  • Supports capabilities for including data similar to other scripting macros.
  • Supports find and replace for adjusting resulting output.

...

Macro browser labelDefaultDescriptionMacro parameter
Transformed output formathtml

Specify how the output is treated. The options are as follows:

  • html - transformed output is standard HTML.
  • xhtml - transformed output is treated as XHTML and rendered with the Confluence XHTML renderer.
  • wiki - transformed output is treated as wiki markup and rendered with the Confluence wiki renderer.
output
Profile

Enter the profile name to access the files to be transformed. Profiles contain a basic set of parameters used to access a remote location such as the type of URL, user credentials, and so on. Refer to this link to know more about profile configuration and this link for tutorials.

Note
  • Contact your Confluence administrator for further information about the profiles available in your instance.
  • If a profile is specified, it is recommended to provide the relative path to the location of the XML file to be rendered.


profile
Location of XML codemacro body

Enter the location of XML data. By default, the macro transforms the code entered in the macro body.

  • #filename - Data is read from the file located in Confluence home/script/filename directory. Subdirectories can be specified.
  • global page template name - Data is read from a global page template. Special note: How to deal with templates on Confluence 4.3 and later.
  • space:page template name - Data is read from a space template.
  • #http://... - Data is read from the URL specified. May require user name and password as well.

    Info

    If a Profile is specified, the pound (#) sign is optional, that is, the URL is processed regardless of the pound (#) sign before the URL.


  • ^attachment - Data is read from an attachment to the current page.

  • page^attachment - Data is read from an attachment to the page name provided.
  • space:page^attachment - Data is read from an attachment to the page name provided in the space indicated.
Note
titlePrecedence in URL handling

URLs are processed using a fixed precedence explained as follows:

  1. If the given URL is linked to a specific application like Bitbucket, GitLab, or GitLab, the macro does not require any user credentials, and processes and renders the given file. Refer to this article for information about application links.
  2. If Profile is specified, the macro appends the URL given here with the URL specified in the profile configuration, and accesses the location to render the required file.
  3. Lastly, if no application links or profiles were given, the URLs are processed as-is and the required file is rendered.


source
Location of XSL code

macro body

Enter the location of XSL code. This field becomes mandatory if source XML code is entered in the macro body. By default though, the XSL content in macro body is considered.

  • #filename - Data is read from the file located in Confluence home/script/filename directory. Subdirectories can be specified.
  • global page template name - Data is read from a global page template. Special note: How to deal with templates on Confluence 4.3 and later.
  • space:page template name - Data is read from a space template.
  • #http://... - Data is read from the URL specified. May require user name and password as well. 

    Info

    If a Profile is specified, the pound (#) sign is optional, that is, the URL is processed regardless of the pound (#) sign before the URL.


  • ^attachment - Data is read from an attachment to the current page.

  • page^attachment - Data is read from an attachment to the page name provided.
  • space:page^attachment - Data is read from an attachment to the page name provided in the space indicated.
style
Find regex patterns

Enter a comma-separated list of regex patterns to repair and modify XML prior to processing by the XSLT processor with find and replace logic. Refer to this article for more information about regular expressions.

Example: (google\.dtd)

find
Replacement strings

Enter a comma-separated list of positions to search for patterns in the output content. Note that the positions are indexed beginning at "1". If a comma is a part of an entry, use single quotes around it.

Example: http://www.google.com/$1

replace
Include head section HTMLfalseEnable this option to retain all the other tags from the header section and treat them as regular body content. This is useful for retaining style information in particular. By default, the head tag is always removed. head
Show error message panelfalseDisplays the XSL transformer generated warning and errors in a panel even if the transformation is not terminated with an error. Terminating errors automatically generate an error panel.showErrors
Error levelNONE

Specify the level at which the data process fails. The selected level determines how the XSLT macro handles data processing errors. The options are:

  • NONE - No action is to be taken.
  • WARNING - Display a warning about the data process; processing does not stop.
  • ERROR - Display an error and further processing is halted.
  • FATAL - Stops any further data processing.

File encodingsystem default

Specify the encoding for an external file, if different from the system default handling.

Example: UTF-8.

encoding
User id for URL connection
Enter the user name to be used for URL access to XML and XSL files.user
Password for URL connection
Enter the user password to be used for URL access to XML and XSL files. password
Timeout in milliseconds
Enter time in milliseconds to wait until the URL connection times out before getting data. Use this to increase time needed for slow connections. Note that if a zero is given, the connection may wait indefinitely.timeout
Disable secure processing featurefalse

Enable this option to disable secure processing of XML and XSL files.

If authorized by your Confluence administrator to change this setting, more powerful capabilities are available. See

Jira Legacy
HTML-89
HTML-89
for details. Administrators can use CMSP to enable these more powerful capabilities.

disableSecureProcessing
XSLT Version1.0Select the version based on your style (XSLT) input document. This drop-down contains the XSLT versions that the macro is compatible with. Available since 5.4.0 version.xsltVersion

...