I'm happy to announce the release of a new and heavily improved version of the XPathView
plugin. Inspired by the suggestions from Gordon Tyler (thank you!), the interactive XPath
evaluation is now capable of handling multi-line expressions, syntax coloring, validation
and completion, which is built on top of the new Language-API in IDEA 5.0.
The expression dialog now comes with two different modes, a simple (one-line) mode and an
advanced one with a multi-line editor and the ability to adjust namespace mappings and to
define variables. There's also the ability to list XPath matches in the Find Usages View,
making it possible to compare results, and to make use of the now implemented document()
-function for cross-document queries.
Additionally, the XSLT-Support features the same validation and completion for XPath
expressions inside XSLT documents, plus navigation and renaming for variables and named
XSLT templates. A file is recognized as an XSLT script if its top level tag name is
"stylesheet" from the XSLT namespace "http://www.w3.org/1999/XSL/Transform".
(This is heavily based on unpublished APIs. In case you experience any problems, please
make sure that it's not the plugin's fault before filing a JIRA issue. For that purpose,
the XSLT support can be disabled in the plugin's settings)
- Renaming enforces Java identifier rules, i.e. '-' is not an allowed character.
IDEA 5.0.1 will have an API to fix that.
- All expressions are rendered with bold text inside XSLT documents. The only way to fix
that is setting the default style for XML attribute values to non-bold.
The plugin is available through IDEA's Plugin Manager and at http://plugins.intellij.net
The full source code is included under the Apache License.
I hope you enjoy using it.