...
Div |
---|
|
On this page Table of Contents |
---|
maxLevel | 1 |
---|
exclude | On this page |
---|
type | flat |
---|
separator | pipe |
---|
|
|
...
Features
...
- Uses XSLT to transform XML to HTML, XHTML, or wiki markup. Supports XSLT 1.0.
- Supports capabilities for including data similar to other scripting macros.
- Supports find and replace for adjusting resulting output.
- Allows the user to restrict the usage of Javascript in the XSLT macro (based on the configuration ofAllow Javascript in the Configuration page). The Confluence page throws a rendering error if this parameter is not enabled, and Javascript is inserted while using the macro.
Parameters
Table plus |
---|
ParameterMacro Editor Label | Default |
---|
Macro Browser Label | outputhtml | Transformed output format | Determines transformed to be treated. The options are as follows: - html - transformed output is standard HTML.
- xhtml - transformed output is treated as
| XHTML - XHTML and rendered with the Confluence
| XHTML macro body- XHTML renderer.
- wiki - transformed output is treated as wiki markup and rendered with the Confluence wiki renderer.
|
source | output | Location of XML code | Required if global page template name - macro body | Enter the location of data. Required, if style (XSLT code) is in the macro body. | #filename - Data is read from the file located in confluence home directory/script/filename. Subdirectories can be specified.- #http://... - 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- URL. May require the user and password parameters as well.
- ^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.
| stylesource | Location of XSL code | required | oror macro body if source is specified | Location XSLT . Required if source XML is in the macro body, | otherwise else, it defaults to the content in macro body | #filename - Data is read from the file located in Confluence home directory/script/filename. Subdirectories can be specified.global page template name - . - #http://... - 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- URL. May require the user and password parameters as well.
- ^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.
| findComma
| Enter a comma separated list of regex patterns to | use for repairing modifying modify XML prior to processing by the XSLT processor with find and replace logic. | HTML-68 has a bit more on this.replaceComma
| Enter a comma separated list corresponding to find patterns via index position in list. | Single quote entries containing .is a part of an entry, use single quotes around it. Example: http://www.google.com/$1 |
head | false | Include head section HTML | Only in affect if clean=true. The head tag is always removed. However, set as true to retain all the other tags from the head section and treat them as regular body content. This is useful for retaining style information in particular. |
---|
showErrors | false | Show error message panel | XSLT transformer generated warning and errors appear in a panel even if the transformer is not terminated with an error. Terminating errors automatically generate an error panel. | Encoding replace | File encoding | system default |
File encoding | Specify the encoding for an external file, if different from the system default handling. Example: UTF-8. | userUser
| Enter the user name for URL access via basic authentication. | passwordUser
| Enter the password for URL access via basic authentication. | timeoutpassword | Timeout in milliseconds |
| Enter time in milliseconds such that URL connections | may do not timeout before getting data. Use this to increase time needed for slow connections. | Be careful using 0 as the connection can then enter an infinite wait.disableSecureProcessing | false | Disable secure processing feature | If authorized by your Confluence administrator to change this setting, then more powerful capabilities are available. See Jira Legacy |
---|
HTML-89 | HTML-89 | for details. Administrators can use CMSP to enable these more powerful capabilities.xsltVersion | 1.0 | XSLT Version | This parameter is available with 5.4.0 version. This lists the XSLT versions the macro is compatible with. Note that if a zero is given the connection may wait infinitely. | timeout | XSLT Version | 1.0 | Select the version based on your style (XSLT) input document. This list box contains the XSLT versions that the macro is compatible with. | <transformer parameters>xsltVersion |
|
| Only available when | specifying XSLT
|
Usage
Download a copy of the cdcatalog.xsl from https://www.w3schools.com/xml/cdcatalog.xsl and attach it to your page.
...
No Format |
---|
{xslt:source=xslt - basic^cdcatalog.xml|style=#http://www.w3schools.com/xsl/cdcatalog.xsl}
{xslt}
|
Anchor |
---|
| transformerParameters |
---|
| transformerParameters |
---|
|
Passing parameters to the XSLT engine
Parameters that are not interpreted by the XSLT macro are passed through to XSLT. You must use wiki macro syntax to take advantage of this.
...
The output is: The value of winnersOnly is "lala".
If you omit the parameter, then the output is: The value of winnersOnly is "no"
Gallery
Image Removed.