XSLT 3.0 Refactoring in Visual Studio Code
Visual Studio Code Screenshot - theme: X Gruvbox

XSLT 3.0 Refactoring in Visual Studio Code

DeltaXML's XSLT/XPath extension for Visual Studio Code now features new refactoring capabilities. Extract xsl:function and Extract xsl:template are available via VS Code's Quick Fix (⌘.) feature and the Refactor command.

An available refactoring for a selection is indicated by a light-bulb💡 adjacent to the selection. Clicking on the 💡 will display the available refactorings. The light-bulb is only shown when the code selection is a valid expression or a set of XSLT instructions that would be valid inside the new component.

For 'extract to xsl:function' refactoring, VS Code can do significantly more than other XSLT editors as it endeavours to ensure code behaviour remains the same. There are therefore two modes available (fully documented here):

  • full refactoring - after extracting code, 'missing-context' problems are resolved by updating XSLT instructions and XPath expressions to reference specially added context-property parameters.
  • partial refactoring - (similar to other XSLT editors) after extracting code 'missing context' problems are highlighted in the XSLT - ready for manual fixing.

We're continuously updating and improving the XSLT/XPath features available in Visual Studio Code, so more refactoring options will be available soon. For an overview of this extension please see DeltaXML's XSLT/XPath Extension documentation.

To view or add a comment, sign in

More articles by Philip Fearon

  • Celebrating 100,000 Installs

    The milestone of 100, 000 installs has been reached by the XSLT/XPath extension for Visual Studio Code by DeltaXignia…

    1 Comment
  • 2 Years of XSLT/XPath for VS Code

    The free XSLT/XPath extension for Visual Studio Code was published 2 years ago today. Have you tried it yet? In the…

    3 Comments
  • A CALS Table Viewer for Visual Studio Code

    Introduction This article describes the CALS Table Viewer, an open-source project providing an extension for Visual…

    1 Comment

Explore content categories