Versions Compared
Key
- This line was added.
- This line was removed.
- Formatting was changed.
Description
Excerpt |
---|
When editing the Mobile WMS configuration fileconfigurations, you MUST enable schema validation for your editor. This guide explains how to enable schema validation and code completion in Visual Studio or in VS-Code and Visual Studio. |
Overview
Table of Contents | ||||||||
---|---|---|---|---|---|---|---|---|
|
Set up Visual Studio Code
It requires one extension and configuration of user settings in VS Code.
Configure Visual Studio Code
Install the extension "XML" by Red Hat.
Press Ctrl + Shift + X to enter the extensions section, and search in the top.
Configure VS Code
Open the properties json file by pressing Ctrl + Shift + P.
Write "Open Settings" and select "Preferences: Open User Settings (JSON)".
Add the following lines to the JSON file:
Code Block |
---|
{ "files.associations": { "application*.cfg": "xml", "start*.cfg": "xml" }, "xml.fileAssociations": [ { "systemId": "http://schemas.taskletfactory.com/MobileWMS/Application.xsd", "pattern": "application.cfg" }, { "systemId": "http://schemas.taskletfactory.com/MobileWMS/Start.xsd", "pattern": "start.cfg" } ] } |
Set up Visual Studio (regular)
You only have to set one setting, to get get Schema support
Go to: Tools > Options > Text Editor > XML > Miscellaneous
and enable Automatically download DTDs and Shemas
Configuration files
Make sure that application.cfg and start.cfg contains the following headers respectively.
Code Block | ||||
---|---|---|---|---|
| ||||
<application xmlns="http://schemas.taskletfactory.com/MobileWMS/Application" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://schemas.taskletfactory.com/MobileWMS/Application http://schemas.taskletfactory.com/MobileWMS/Application.xsd"> |
Code Block | ||||
---|---|---|---|---|
| ||||
<start xmlns="http://schemas.taskletfactory.com/MobileWMS/Start" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://schemas.taskletfactory.com/MobileWMS/Start http://schemas.taskletfactory.com/MobileWMS/Start.xsd" language="en" screenOrientation="Portrait"> |
Update schema files
As the schema files are downloaded on first use, they may need to be updated from time to time, as more features are added in the configuration.
This is done by deleting the existing schema files in the following directory.
Code Block |
---|
%userprofile%\.lemminx\cache\http\schemas.taskletfactory.com\MobileWMS |
Troubleshooting
If the above doesn't work, please restart VS Code.
If it still doesn't work, then an executable file from Red Hat might be blocked by Windows. This can be checked by opening Windows Security and click Virus & threat protection → Protection History to find recent blocks.
If a file from the Red Hat extension has been blocked, it can be unblocked following this guide: (external site)
Typically similar to this Power Shell:
Code Block |
---|
Add-MpPreference -AttackSurfaceReductionOnlyExclusions "%userprofile%\.vscode\extensions\redhat.vscode-xml-0.24.0-win32-x64\server\lemminx-win32.exe" |
If the start.xsd and application.xsd is not downloaded to the folder %userprofile%\.lemminx\cache\http\schemas.taskletfactory.com\MobileWMS on your machine then you can fix this by doing a manual download from http://schemas.taskletfactory.com/MobileWMS/Application.xsd and http://schemas.taskletfactory.com/MobileWMS/Start.xsd and copy the files into the folder in question and restart visual studio.
Explore the Mobile WMS App
Page Tree | ||
---|---|---|
|