RNG W3C EPUB 3 Community Group (epubcheck) · 2005-1

NCX 2005-1

EPUB 2 table of contents (toc.ncx)

The NCX navigation file of EPUB 2 books, also kept in many EPUB 3 books for older readers.

About

The NCX (from DAISY Z39.86) is the table of contents of an EPUB 2 book. EPUB 3 replaced it with the navigation document but allows it for compatibility.

Good to know

  • Only the grammar is checked: epubcheck's NCX rules use the pre-ISO Schematron namespace, which the rule compiler here does not read. Whether the content links resolve is not checked.
  • The example is by xmlvalid.com.

Files

1 file · 6.1 KB

Example document

toc.ncx · 833 B · valid against this schema

In CI and from code

The same schema by its name, epub-2-ncx, through the API.

npx @xmlvalid/cli validate "**/*.xml" --schema epub-2-ncx
- uses: xmlvalid/validate-action@v1
  with:
    files: "**/*.xml"
    schema: epub-2-ncx
    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=epub-2-ncx

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