Full XPath 2.0 [Basic & Schema-Aware]

This is of course the single most significant upgrade to SketchPath since it was launched as a Beta in April 2007. XPath 1.0 is still implemented with .Net System.XML.XPath, but the new choice of XPath processor for 2.0 is the .Net version of the most established and standards compliant XPath/XSLT/XQuery processor: Saxon from http://www.saxonica.com.

As you will probably know, XPath 2.0 brings a host of new features to XML processing systems. The SketchPath challenge is to make these features more accesible and apparent in a graphical interface through added features. This page lists just some of the enhancements coming:

XPath Version Switching

Changing XPath version is a simple matter of selecting the required version from the XPath Editor drop-down list. Two versions of XPath 2.0 will be selectable if a Schema-Aware Saxon Licence has been purchased and installed independently.

Improved 'Trace' mode and Colorisation support

Clicking on Range Variables For $var, Some $var, Every $var will reveal the sequence it references. Multiple nested Range Variables are supported.

Range Variables & Colorisation hints:

Externally declared variables have been supported from the first versions of SketchPath. If $var references are not resolved as being related to a For, Some or Every sequence operation, an attempt is made to resolve them as externally declared variables, if no match is found a pink 'wriggle' underline is used to highlight the error.

All the new XPath 2.0 operators are supported by appropriate colorisation

Enhanced Intellisense and Auto-Completion

Intellisense for sequences

This has been enhanced significantly to cater for sequence operations (mentioned above), an attempt is made to maintain the correct context at all times when nested deep within sequence operations, functions, predicates or a combination.

Intellisense for functions

When fn: is typed, the Intelli-List is populated with a sorted list of all XPath 2.0 functions which can now be auto-picked as you type.

Intellisense for types

When xs: is typed, the Intelli-List is populated with a list of XML Schema types to be used for type operations.

Schema Support

New features have been introduced to support XSD XML Schema and DTD validation:

Refererences are now resolved using a custom XML resolver that can exploit local-path file location settings that are maintained independently, in a newly enhance Settings Panel.

In SketchPath 2.0 the XML instance can now be validated against XSD files included in the XML Prolog declarations.

After validation, if the XML instance is reloaded, the XML Schema Type and Base Type will be shown for the current selected element in SketchPath

Schema-Awareness

Those users who choose to upgrade Saxon.Net will be able to take advantage of the new Schema-Aware functionality of XPath 2.0-SA. The results list now includes the Schema annotations as well as the type in the XDM.

Limitations

The 'Import Schema' feature is not available for this version of SketchPath. This means that only built-in Schema types can be used in your Schema-Aware XPath expressions.

Assist Pane

For XPath 2.0, the Assist Pane has had a makeover. It does of course adapt as different XPath versions are selected from the XPath dropdown. Reflecting the large number of new operators introduced in XPath 2.0, the Assist Pane has a column dedicated to 4 pages of operators grouped according to function.

General Enhancements

  1. Recent Files' menus are now available separately for XPath Library and XML Source Files
  2. Improved logic in expression tracing
  3. The Default XPath Version is controlled by User Settings
  4. New Environment Manager includes integrated Namespace and Schema Panels for managing the XPath evaluation environment. The Schema Panel shows how Schema locations in the load XML document will be resolved using either the embedded SchemaLocation attributes or the File Location Settings in SketchPath.
  5. Refreshed User Settings Panel with new options
  6. A variety of bugfixes and enhancements to error reporting

Future

A significant number of additional features are planned for SketchPath, but these will have to await a future release.