Developer/XML Validation

generated on 2017-12-19 09:15:31.770376 from the wiki page for Developer/XML_Validation for SUMO 0.32.0

Status Quo (2013-08-30)

  • The current build scripts for windows and linux execute schemaCheck.py as part of the regular tool tests with results visible on the daily build page (see for instance the schema check tests on the very end of the 64bit linux tool tests 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" including vehroutes output
    • additional files "*.add.xml"
    • configuration files "*.????cfg"
    • sumo rawdump (netstate), detector (e1 and e2) and edgedata (net, emissions and noise) outputs
  • There is the possibility to generate the XML schema for the configurations (command line option --save-schema <FILE>)
  • XML validation can be switched on for all binary executables using --xml-validation

Still missing

  • schemata for the remaining output files
  • documentation on how to use schemata
  • synchronize documentation, Specification, schema and implementation
  • switch validation on per default (at least for files declaring a schema)

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 20 October 2013, at 11:19.