Developer/XML Validation

Status Quo (2011-07-21)

  • The current build scripts for windows and linux execute schemaCheck.py with results visible on the daily build page.
  • This script uses lxml (if available) or Sax2Count (on windows only). The latter comes together with the binary xerces windows distribution.
  • Only files which have a schema declaration in the root element and are of the following type (and fit the following naming scheme) are checked:
    • netconvert inputs
      • edges "*.edg.xml"
      • nodes "*.nod.xml"
      • connections "*.con.xml"
      • types "*.typ.xml"
    • sumo nets "*.net.xml", "net.netgen", "net.netconvert"
    • route files "*.rou.xml", "routes.duarouter", "alts.duarouter", "routes.jtrrouter" (still not complete)
    • configuration files "*.????cfg"
  • There is the possibility to generate the XML schema for the configurations (command line option --save-schema <FILE>)

Still missing

  • schemata for the additional and the output files
  • documentation on how to use schemata
  • (optional) validation at loading
  • synchronize documentation, Specification, schema and implementation

portable testing application (only kept for reference)

28.10.2009: I made a small search on possible tools for validating XML files which are using Python. It seems as two are majorly used:

further candidates:

A short comparison:

lxml XSV xmlproc minixsv
Execution Type library application library library
Dependencies libxml 2.6.21 or later, libxslt 1.1.15  ?  ? genxmlif

This page was last modified on 19 March 2012, at 14:18.