---
title: "Validate against your IEC schema"
---

# Validate against your IEC schema

Point the module at your copy of the IEC 61850-6 SCL schema, and every SCL file is validated against the edition it declares, with each finding on its exact element and the XSD rule as its code.

**State:** verified. On the 281 public SCL files of editions 2003, 2007B and 2007B4, the module's verdict equals xmllint's (libxml2 2.9.14) on every file: 157 valid, 124 invalid, all 21 PCM600 CIDs and the Siemens IEC 61850 System Configurator 7.20.50 SCD valid. Checked with the IEC SCL schemas of the three editions as republished by LF Energy CoMPAS.

The IEC 61850-6 SCL schema is not shipped with the Editor: you use your company's copy. The validator is the module's own XML Schema 1.0 validator; no Java runtime or other tool is needed.

## Point the module at your schema

1. Download the SCL schema files from the IEC (the SCL XSD package of IEC 61850-6) and unzip them to a folder. One edition, or one subfolder per edition (such as `SCL2007B4`) under one parent, both work.
2. Run **Set IEC 61850 Schema Folder...** and pick the folder that holds `SCL.xsd`, or the parent of the edition folders. This sets `neuralInverse.energy.sclSchemaFolder` (machine scope).
3. Check the **Energy** output channel: it lists the editions found and "0 schema errors, 0 unsupported constructs".

## Read the findings

Each SCL file of the workspace is validated against the edition it declares (2003, 2007B, 2007B4, or any other the folder holds). Findings appear in **Problems** with the source **IEC 61850 schema**, on the exact element or attribute, with the XSD rule as the code, for example:

| Code | Meaning |
|---|---|
| `cvc-complex-type.2.4.a` | An element where another is expected |
| `cvc-complex-type.3.2.2` | An attribute not allowed on the element |
| `cvc-datatype-valid.1.2.3`, `cvc-pattern-valid` | A value not of its type or pattern, such as `lnClass="ptoc"` |
| `cvc-identity-constraint.4.3` | A reference no key has, such as an `lnType` no `LNodeType` defines |

The status bar counts schema findings with the checks. Validation runs in idle time in small slices, and a file is validated again when its text changes.

A file whose edition your folder lacks gets one Info entry on its root, "Not validated against the IEC schema: ...", naming the editions the folder has. Clear the setting to turn validation off; every schema entry goes.

## What the validator covers

Include and import within the folder, the XML namespace, complex types by extension and restriction, sequence, choice and all with occurrence bounds, element, group and attribute group references, attribute defaults and fixed values, simple types by restriction (enumeration, pattern, length, bounds, digits, whiteSpace), list and union, built-in types, `xsi:type` and `xsi:nil`, wildcards, ID and IDREF, and key, unique and keyref. A construct it does not implement is listed in Problems on the schema file where it is used, never ignored.

## Size

Measured on Linux against 2007B4: the schema loads in about 50 ms; a 100-IED station of 84,234 elements validates in 0.5 to 0.7 s in slices of a few milliseconds, so the window stays responsive.

## Limits

- Files on disk only: untitled and unsaved text is not validated.
- Whitespace-only text of an element with a simple type is read as empty.
- Range facets on dates and times, substitution groups, `redefine`, `block` and XSD 1.1 are not implemented; the SCL schemas do not use them, and a schema that does gets them reported as not checked.

## Not verified

- The IEC's own download packages, and editions other than 2003, 2007B and 2007B4.
- A second independent validator besides libxml2.
- Files of DIGSI 5, SEL and Helinks; Windows.
