Re: Applications of relaxng
James Clark <[email protected]>
| Newsgroups | gmane.text.xml.relaxng.general |
|---|---|
| Message-ID | <[email protected]> |
David Tolpin wrote: > It is my impression that Relax NG, as well as other modern schema languages, > is implemented with idea in mind that a schema is a validation tool. Not exactly. I see the role of a schema language as being to define the interface between components that communicate using XML. Validation is one aspect of this: it's runtime checking of compliance with the interface. I think it's important that when you have an interface you can mechanically enforce it. But more important than this is just the fact of having an interface that is rigorously defined, yet human understandable. If all you have to define your interface is English prose, it is very likely that different people will interpret it slightly differently. If all you have is XSD, then you had better have a tool like XMLSpy if you want people to understand it. For a schema language to work well in this role, as an XML processing component interface definition language, it's vital that the schema language doesn't do anything other than define a set of XML documents. If a schema does other random stuff useful for processing (like tell you how to turn the XML document into Java objects or add default attributes), then it's making the components that use it as an interface unnecessarily tightly coupled. Maybe it's wishful thinking on my part, but I see a growing realization of this point in the move towards service-oriented architectures and "typeless" web services. James