[
https://issues.apache.org/jira/browse/NIFI-6532?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Daniel Stieglitz reassigned NIFI-6532:
--------------------------------------
Assignee: Daniel Stieglitz
> TransformXML Documentation doesn't explain usage of dynamic properties in
> stylesheets
> -------------------------------------------------------------------------------------
>
> Key: NIFI-6532
> URL: https://issues.apache.org/jira/browse/NIFI-6532
> Project: Apache NiFi
> Issue Type: Improvement
> Components: Documentation & Website
> Affects Versions: 1.9.2
> Reporter: Raymond
> Assignee: Daniel Stieglitz
> Priority: Minor
>
> In the TransformXML Documentation there is a section on Dynamic Properties.
> It says:
> "These XSLT parameters are passed to the transformer."
> There is no mention on how to use the parameters in a XSLT. Maybe go to add
> this information to this section:
> From the Saxon documentation:
>
> These parameters are accessible within the stylesheet as normal variables,
> using the {{$name}} syntax, provided they are declared using a top-level
> {{xsl:param}} element. If there is no such declaration, the supplied
> parameter value is silently ignored.
> If the {{xsl:param}} element has an {{as}} attribute indicating the required
> type, then the string value supplied on the command line is cast to this
> type: this may result in an error, for example if an integer is required and
> the supplied value cannot be converted to an integer. If the parameter is
> declared with the option {{static="yes"}} (new in XSLT 3.0) then the value is
> supplied as a static parameter value.
>
> Example:
> <?xml version="1.0" encoding="UTF-8"?>
> <xsl:stylesheet version="2.0"
> xmlns:xsl="http://www.w3.org/1999/XSL/Transform" >
> <xsl:output method="xml"/>
> <xsl:param name = "parameterName" />
> <xsl:template match="/">
> <hdr:messageId><xsl:value-of
> select="$parameterName"/></hdr:messageId>
> </xsl:template>
>
> </xsl:stylesheet>
>
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)