.. ==================================================
.. FOR YOUR INFORMATION
.. --------------------------------------------------
.. -*- coding: utf-8 -*- with BOM.
.. include:: ../Includes.txt
Reference
---------
This section gives an overview on all TypoScript properties of the XSLT content object.
.. attention::
In TYPO3 10.4 the FILE TypoScript object was removed. You can use a FLUIDTEMPLATE
cObject instead. In respect to TYPO3 9.5 the deprecated FILE cObject is still supported.
.. container:: table-row
Property
source
Data type
string\/stdWrap
Description
This fetches the XML data from a source. Can be an XML string, a field
in the database containing XML, a file (path or FLUIDTEMPLATE
cObject) or an external resource.
**Example (field):** ::
page.10 = XSLT
page.10 {
source.data = page : my_xml_field
[...]
}
Fetches the XML from the field 'my\_xml\_field' of the current page
record.
**Example (stdWrap / FLUIDTEMPLATE):** ::
page.10 = XSLT
page.10 {
source.cObject = FLUIDTEMPLATE
source.cObject.file = fileadmin/myfile.xml
[...]
}
This fetches the XML from a file included with TypoScript's FLUIDTEMPLATE
content object.
**Example (external):** ::
page.10 = XSLT
page.10 {
source = http://news.typo3.org/rss.xml
[...]
}
This draws the XML from an external source. It can be an URL like
above or an external file resource of any size.
.. container:: table-row
Property
transformations.[1,2,3...]
Data type
array
Description
This configuration array contains all transformations in [index].[settings]
notation. During rendering, the content object pipes the XML
data through all configured transformations in numeric order. See the
subproperties for configuration details.
**Example:** ::
page.10 = XSLT
page.10 {
source.data = page : my_xml_field
transformations {
1 {
stylesheet = fileadmin/my.xsl
setProfiling = 1
[...]
}
}
}
.. container:: table-row
Property
transformations.[i].stylesheet
Data type
string\/stdWrap
Description
This property sets the XSL stylesheet that will get applied to the current
transformation. Stylesheets can be loaded from a string, a path, with
stdWrap or from an external resource.
**Example (string):** ::
transformations.1 {
stylesheet (
|
}
}
Executed on the final result of all transformations just before the content is returned.
Next is an example for all TS configuration options with their according data types
::
my.object = XSLT
my.object {
source = [URL / PATH / STRING / stdWrap]
transformations {
1 {
stylesheet = [URL / PATH / STRING / stdWrap]
transformToURI = [PATH]
registerPHPFunctions = [BOOLEAN / ARRAY]
registerPHPFunctions {
10 = [object name :: function name]
}
setParameters {
parametername {
namespace = [STRING]
value = [STRING / stdWrap]
}
}
removeParameters {
parametername {
namespace = [STRING]
}
}
setProfiling = [BOOLEAN]
stdWrap = [stdWrap to result of this transformation]
}
2 {
[...]
}
}
stdWrap [stdWrap to the whole object]
}