XSLT specific intention actions
The XSLT Support comes with a few intentions that can be useful for XSLT development.
This functionality relies on the XPathView + XSLT plugin, which is bundled and enabled in IntelliJ IDEA by default. If the relevant features aren't available, make sure that you didn't disable the plugin.
note
The XPathView + XSLT plugin is available by default only in IntelliJ IDEA Ultimate. For IntelliJ IDEA Community Edition, you need to install the XPathView + XSLT plugin as described in Install plugins.
Press CtrlAlt0S to open the IDE settings and then select Plugins.
Open the Installed tab, find the XPathView + XSLT plugin, and select the checkbox next to the plugin name.
This is useful if it turns out that a simple if-branch isn't enough in a certain situation and an else-branch is required. When placing the caret at the start tag of the xsl:if
, the intention shows up and converts the code fragment into an xsl:choose
, preserving the original xsl:if
as an xsl:when
block and adding an xsl:otherwise
block.
Before | After |
---|---|
![]() | ![]() |
This intention can be used to pass a value for an optional parameter in a template-call. It will insert the appropriate xsl:with-param
tag and show a lookup list for all parameters that aren't already passed to the template.
Before | After |
---|---|
![]() | ![]() |
Thanks for your feedback!