perplexedDev
perplexedDev

Reputation: 835

XML Validation options other than XSD

We have XSD file we give our clients for XML validation. This is a common XSD file for different XMLs from different teams. I am trying to find out if there are better ways for XML validation other than using XSD. It is difficult to maintain as we have multiple teams using the same XSD and one team making changes to the XSD shouldn't affect the other teams

Upvotes: 1

Views: 342

Answers (2)

kjhughes
kjhughes

Reputation: 111688

Other XML Validation Options

There are, of course, XML validation standards other than XSD: DTD, RelaxNG, Schematron...

Real Problem

However, seeking a technical solution to an imprecisely described organization problem is misguided. An XML schema (of any sort) is a tool for describing and communicating XML vocabularies and grammars. To expect that

one team making changes to the XSD shouldn't affect the other teams

is to deny a fundamental reason for creating an XML schema: communication of agreement over XML vocabulary and grammar design.

First define your organizational control problem. Then ask how technical solutions might support your targeted structure. Conflating the two is no way to approach the challenge.

See Also

Upvotes: 4

Daniel Haley
Daniel Haley

Reputation: 52878

You could use DTD or Relax NG schema, but I don't think switching to either of those is going to solve your issue.

Not sure how the teams come into play, but any change to the XSD Schema (or DTD, Relax NG schema, etc.) should impact any other XML that also uses that schema for validation. If there is an XML file that should not be impacted, maybe it needs to be validated by a different schema.

You can modularize your schemas so you don't have to duplicate pieces of the schema that are the same.

Also, you might want to consider tighter control on who modifies the schema and when. Maybe have something like a change review board that discusses potential changes and the impacts to other teams, document types, and consumers of the data.

Upvotes: 3

Related Questions