Open-CMSIS-Pack  Version 1.7.36
Delivery Mechanism for Software Packs
Schema Validation

Schema validation is required when a pack is published using a pack index service. The pack importer will ignore all PDSC files that do fail the schema check. Thus, your pack will not be available for download.

Using an editor

Many text editors are capable of verifying XML code against a schema file. This is helpful to identify syntactical or structural problems in a PDSC or SVD file early in the development process. If you specify the exact location of the schema file in the PDSC (refer to Create PDSC File), editors should automatically pick it up for PDSC validation.

For more information on schema validation, consult the help of your editor of choice.

Using xmllint

The utility xmllint is a command line tool for XML validation against a schema file. It may be part of the gen_pack.sh to verify the PDSC file during pack generation.

Installing on Linux

Use your package manager to install the libxml2-utils (which contain xmllint). On a Ubuntu machine, use:

$ sudo apt-get install libxml2-utils

Installing on macOS

Use for example the package manager Homebrew to install libxml2. Enter:

$ brew install libxml2

Installing on Windows

For Windows libxml provides an XML processor that provides the functionality of xmllint.

Note
The installation is optional but strongly recommended to be able to validate the XML file using gen_pack.sh.

Download the following ZIP files:

  • iconv-1.9.2.win32.zip
  • libxml2-2.7.8.win32.zip
  • libxmlsec-1.2.18.win32.zip
  • zlib-1.2.5.win32.zip

Extract the /bin directory of each ZIP file to a directory, for example C:\xmllint and add this directory to the Windows PATH environment variable.

Note
  • Restart the Git Bash after changing the PATH environment variable.
  • When xmllint is not installed, the XML schema verification is skipped by the gen_pack.sh script.

xmllint is also provided by the xsltproc package that can be installed via Chocolatey:

> choco install xsltproc

Using Pack Installer

Arm Keil MDK includes Pack Installer which tou can use to validate the schema of your PDSC file.

  • Right-click on the pack version number and select Schema Check:
  • The Output window shows the result. If errors are reported, please make sure to fix them before continuing.