Validation Against Multiple Schemas

Today it is necessary to combine multiple schema languages when describing an XML language

Grammar-based schema languages (W3C XML Schema, RELAX NG) are very good at telling something is wrong, but they fail in telling where exactly is the problem and how to resolve it

  • Outputs are user unfriendly

  • Low level error messages (no relation to the modeled domain)

  • Unable to express some constraints (can't operate on multiple different contexts)

Combine grammar-based schema languages with rule-based languages

  • Attaching domain specific diagnostics

  • Expressing constraints more constraints

Example 5. Multiple validate actions for a single namespace

<rules xmlns="">
  <namespace ns="">
    <validate schema="xhtml.rng"/>
    <validate schema="wcag.sch"/>