Mapper Pro XSL
A standalone VS Code extension for editing Mapper Pro's folder-based mapping workspaces. It supplies source and target schema completion, xref completion, the Mapper Pro function catalog, snippets, syntax highlighting inside quoted XPath attributes, and live diagnostics.
Install
Search for Mapper Pro XSL by Lindon Abarra in VS Code's Extensions view, or run code --install-extension LindonAbarra.mapper-pro-workspace.
In VS Code, run Extensions: Install from VSIX… and choose releases/mapper-pro-workspace-0.2.0.vsix. Reload the editor if prompted. The Marketplace extension ID is LindonAbarra.mapper-pro-workspace. If you installed the earlier local package under the mapper-pro publisher, uninstall that version before installing this one to avoid duplicate providers.
Open the project folder that contains project.json and mapping.xsl. The mapping file automatically uses Mapper Pro XSL. Ordinary XSL files keep their existing language mode. You can also select Mapper Pro XSL manually using the language picker or Mapper Pro: Use Mapper Pro XSL.
Completion
Inside an XSLT expression attribute, type:
TARGET. inside mp:assign('TARGET.…', value) to select a target field. When reading a target in an expression, completion inserts mp:lookup('TARGET.…').
SOURCE or SOURCE. to browse source fields. Selecting a field inserts native XPath such as /ns:ExtractAction/ns:Extract. If you type SOURCE inside an ordinary inner string literal, completion replaces that literal with a node-selection XPath. In mp:lookup('SOURCE.…'), it preserves the lookup path.
/, a source XPath prefix, or an inferred variable path such as $item/ for source-schema suggestions. Predicates are preserved when inferring a variable's source path.
mp: or a function name for function snippets with tab stops. Standard XPath functions, including concat and substring, are inserted without the mp: prefix.
$ for variables and parameters visible in the current scope.
- A customer or table inside
mp:xref('customer', 'table', inputs…) for xref suggestions. Tables are filtered by customer. Signature help shows input labels and one-based return positions. Literal input arguments can suggest existing table values.
DateTimeFormat. for format presets. Selecting a preset inserts its string value, avoiding an undeclared $DateTimeFormat variable.
SYSTEM. for system paths through mp:lookup.
Automatic suggestions work inside outer double or single XML quotes and inner mapping-path quotes. Use Ctrl+Space to request completion manually. Your explicit editor settings take precedence over the extension defaults.
Mapper Pro Workspace in the Explorer shows source and target structures, xref tables with columns and rows, project files, functions, and conditions. Click a field or function to insert it. Mapper Pro: Browse Functions offers the same catalog through a searchable picker. The packaged FUNCTIONS.md lists all 44 application functions and 12 condition operators.
Snippets
| Prefix |
Inserts |
mp-stylesheet |
Stylesheet using the current namespace declarations |
mp-assign, mp-map |
mp:assign mapping assignment |
mp-var, mp-param |
Variable or parameter |
mp-for |
Source loop with an item variable |
mp-if |
Conditional block |
mp-choose, mp-when, mp-otherwise |
Conditional branches |
mp-xref |
Xref result variable |
mp-region |
Named region comments |
mp-template, mp-value |
Template or value-of instruction |
Diagnostics
The linter validates XML, the supported Mapper Pro XSLT profile, namespace bindings, lexical variable scope, literal SOURCE/TARGET paths, statically resolvable absolute source paths, xref table names, input counts and return indices. It runs on unsaved mapping edits. Changes to project assets refresh completion and diagnostics; invalid asset JSON reports an error and retains the last valid index. File watchers are backed by a metadata check every 1.5 seconds for the known project files, so missed filesystem events still refresh the index.
Function arity and schema membership checks are warnings; XML/profile errors, unresolved variables, and invalid xref calls are errors. Function counts come from the catalog, which may differ from server-specific extensions. Dynamic table names, arbitrary XPath axes/wildcards, and unresolved relative paths cannot all be checked statically. This is an editor linter for Mapper Pro's supported profile; it does not execute mappings or emulate the OpenText runtime.
Workspace detection and settings
Detection requires workspaceVersion: 1, xsltProfileVersion: 1, and relative files.mapping, files.source, files.target, and files.xrefs paths in project.json. It supports multiple workspace roots and nested project folders, with an independent schema index for each project. All asset paths stay relative to their manifest. Generated XSL files are not automatically switched.
mapperPro.autoLanguage: automatically select Mapper Pro XSL for a recognized mapping file. Default true. A manual language change is respected during that editor session.
mapperPro.lint: enable diagnostics. Default true.
- Mapper Pro: Refresh Workspace: reload the manifest, schemas, xrefs, and optional Canvas identity hints.
The extension reads local workspace assets and never evaluates workspace JavaScript. It does not write mapping files except when you accept a completion/snippet or explicitly insert an Explorer item. It makes no network requests.