I'm pleased to announce Release 2.1 of DeltaXignia's XSLT/XPath
extension for VS Code. This release focuses on XSLT testing,
step-through debugging, and XSLT 3.0 packages for managing
larger-scale projects.
Testing with XSpec
For testing, XSpec 4.1.2 is included with the extension, so there's
nothing else to install, and it is now fully integrated with VS Code's
powerful set of test features. Tests can be run or debugged from the
Test Explorer, from the XSpec file, or from the XSLT component being
tested. When an expectation fails, the expected and actual results are
shown side by side. The XSpec editor has received special attention:
files are checked as you edit, both against XSpec's schema and against
the stylesheet under test, with auto-completion and hover help, and
navigating between XSpec and XSLT files is seamless in both
directions. Debug breakpoints can be set on XSpec scenarios, elsewhere
in the XSpec file, or in the XSLT under test. A test scenario can be
generated from any function, named template or template rule, and a
skeleton of pending scenarios can be generated for a whole stylesheet
or package. Schematron can be tested too, test coverage is shown in
the editor, and a Timeline view keeps a history of each file's test
runs.
Step-through debugging
The new debugger works with SaxonJ 12 or later in any edition,
including the free Saxon-HE. Set breakpoints, with optional conditions
and hit counts, and step through templates, functions and multi-line
XPath expressions, including inline functions. As you go, you can
inspect the variables, the context item and the output written so far.
Logpoints give you print debugging without changing the stylesheet,
and the special message {$*} writes all the local variables in scope.
'Step Back' and 'Reverse Continue' take you back if you step past the
point you were interested in. While paused, the first empty step in a
path expression is faded, and hovering over it explains why the path
returned nothing. A No Template Matched option pauses on elements that
fell through to the built-in template rules.
XSLT 3.0 packages
Packages in the workspace are now discovered automatically from their
xsl:package name and version, and supplied to Saxon when you run or
debug a stylesheet, so you no longer have to declare them separately.
Component visibility, xsl:expose and xsl:accept are handled exactly as
Saxon handles them, and problems with xsl:accept, xsl:override and
package modes are flagged as you edit, with quick fixes. For existing
projects, Analyse as Packageb& reports what would need to change to
turn an imported library into a package, and Convert to Packageb& makes
those changes across the workspace, with a Refactor Preview before
anything is applied.
Release 2.1 is available now from the VS Code Marketplace (search for
"XSLT/XPath" or install deltaxml.xslt-xpath).
Full documentation is at https://deltaxml.github.io/vscode-xslt-xpath/
|