Skip to content

Latest commit

 

History

History
114 lines (73 loc) · 4.73 KB

README.md

File metadata and controls

114 lines (73 loc) · 4.73 KB

vscode-dfdl README

The "vscode-dfdl"extension.provides auto completion for Data Format Description Language (DFDL) schemas.

Set the editor to dfdl mode

TurnOnDfdlMode

Features

Auto suggest is triggered using control space or typing the beginning characters of an item. CtrlSpaceTrigger

Typing one or more unique characters will further limit the results. CharacterTrigger

Add the schema block SchemaBlock

Completing a DFDL Format Block. DfdlFormat

The '>' or '/' characters are used to close and XML tag. Typing the initial characters and one or more unique characters will further limit the results. Use the Tab to select an item from the drop down and to exit double quotes TabToExitQuotesAndEndTag

Creating self define dfdl:complextypes and dfdl:simpleTypes. SelfDefinedTypes

The tab key can be used to complete an auto-complete item within an XML tag. After auto complete is triggered, typing the initial character or characters will limit the suggestion results. Inside an XML tag a space or carriage return will trigger a list of context sensitive attribute suggestions. AttributeSuggestions

Using self defined types. UsingSelfDefinedTypes

Using xs:choice and dfdl:Discriminator. ChoiceDiscriminator

Using hidden references and dfdl:inputValueCalc HiddenRefGroupAndInputValueCalc

Using dfdl:OutputValueCalc OutputValueCalc

More examples of using user defined types MoreUsingUserDefinedTypes

Using the dfdl:Length attribute with XPath values DfdlLengthWithXPaths

Using dfdl:assert blocks AssertBlock

Miscellaneous examples MoreExamples

Requirements

Node.js (https://nodejs.org/en/download/) VS Code (https://code.visualstudio.com/download)

Open a terminal window in VS Code. Run: npm install typescript

Suggestions

After TypeScript is installed. Run: npm run watch

Watch will automatically compile code when it changes After watch runs, fix any problems in the Problems tab

Run the extension in debug mode StartDebugMode

Package the Extension

In a VS Code terminal window, run: npm install -g vsce

After the vsce install completes, run: vsce package

to the three warnings type 'y'.

The package vscode-dfdl-0.0.1.vsix should be in the project director.

Install the Extension

Close VS Code if it is open. From an OS Command line, run: code --install-extension "path to vsix file"\vscode-dfdl-0.0.1.vsix

Re-open VS Code, open the pallet (ctrl+shift+P) select or type 'Change Language Mode' choose 'dfdl'

Extension Settings

None

Known Issues

The extension uses a clunky method to auto complete curly braces within quotes. Hopefully this can be better addressed in the future. The auto complete method blocks auto completion suggestions while typing between the beginning qoute, opening curly brace and the closing curly brace, ending quote.

Syntax and semantic colorization isn't implemented.

Release Notes

First beta release. Feedback is appreciated.