XSD W3C · 1.0 (second edition)

XML Schema 1.0

Schema for schemas (XSD files)

Check an .xsd file itself against the W3C schema for schemas.

About

The schema for schemas describes the XML of an XSD document: which xs: elements exist and where they may appear.

Good to know

  • This catches structural mistakes only. References to undefined types, duplicate names and other constraints are found when the schema is compiled: choose your .xsd as the schema in the validator to see those errors.
  • The example is by xmlvalid.com.

Files

2 files · 94.4 KB

The validator loads all of these with their folder structure, so includes and imports resolve as published.

Example document

order.xsd · 1.1 KB · valid against this schema

In CI and from code

The same schema by its name, xsd-1.0, through the API.

npx @xmlvalid/cli validate "**/*.xml" --schema xsd-1.0
- uses: xmlvalid/validate-action@v1
  with:
    files: "**/*.xml"
    schema: xsd-1.0
    api-key: ${{ secrets.XMLVALID_API_KEY }}
curl https://xmlvalid.com/api/v1/validations \
  -H "Authorization: Bearer $XMLVALID_API_KEY" \
  -F document={{ $schema->example ?? 'document.xml' }} -F schema=xsd-1.0

Free accounts get 100 API validations a month. On Pro, a URL monitor can check a published document against this schema every hour and email you when it breaks. More CI setups