SV: SV: What's a valid instance...James Clark

>I'm not saying it would be bad to have an optional clause in the schema that
>says whether or not a given element declaration is allowed to serve as a
>validation root; but it's certainly highly desirable to allow a schema to
>define lots of possible validation roots.


Probably, but I think the lack of this facility in XML Schema has led to an
awful XML design decision (at least aesthetically but I believe aesthetics
important on a productivity angle, things are harder to understand this way)
on the part of many large XML projects . And this design decision is the
proliferation of namespaces that as far as I can see just exist so as to
provide a single element validatable in that namespace (since by default most
processors when told to validate namespace x and a schema that validates
namespace x will do strict validation)

Thus what one ends up with is XML like this

<a:ProblemDomainDocumentElement xmlns:a="http://example.org/a"
xmlns:b="http://example.org/b">
<b:ProblemDomainClass>something or other here</b:ProblemDomainClass>
</a:ProblemDomainDocumentElement>

now I have seen a lot of this kind of structure over the last few years and I
really can't remember seeing much of it before XML Schema became the de facto
standard for doing validation in XML. And I think it is a response to this
lack of being able to define a validation root. But you may have another
opinion. 

Cheers,
Bryan Rasmussen

Received on Friday, 23 March 2007 09:28:36 UTC