Random ramblings regarding worst practices in design of XML Schemata

P

Pavel Lepin

The XML Schema traffic volume on ctx always seemed to be
second to none, and I believe I'm observing a pattern of
sorts in many of the requests for help posted.

Most of the problems seem to arise not even from the lack of
familiarity with the schema definition language employed,
but rather from a more fundamental flaw in the process. I
deduce that instead of designing a data structure they want
represented as an XML document, then attempting to design a
corresponding schema, most software engineers go directly
to the mock-up stage.

Quite often the mock-up seems to be approved and distributed
to the users as a makeshift schema definition right away,
but that's not the root of the evil. The true problem is
that some poor sod is saddled with the task of expressing
the constraints applicable to said mock-up document as a
schema definition, occasionally without even being aware of
what the document really *means*. So instead of thinking
about expressing the _data structure_ in question, the guy
on the task concentrates on expressing (often arbitrary,
and sometimes outright stupid) constraints implied by the
mock-up.

A case of forest behind the trees, if you will.

Naturally, all too often, it is impossible to achieve - as
demonstrated by, oh, every other XML Schema request for
help on the group.

Of course, if some corporate monstrosity has already set The
Mock-Up in stone, and distributed it to its auxiliary
monstrosities as The Next-Gen Foobarly Document Format,
there's little that can be done but quietly pitying the guy
who had an impossible task assigned to him.

However, I believe in some cases the situation can be
salvaged, if only the guy asking for help is pointed in the
right direction - that is, discarding the mock-up, and
concentrating on the actual data structure behind it. More
often than not what he needs expressed probably can be,
using nothing more than the plain old W3C's XML Schemata.
Sure, sometimes this will impose a structural overhead,
that might even be unacceptable in case of huge datasets.
Still this is worth trying in my opinion.
 
P

Peter Flynn

Pavel said:
The XML Schema traffic volume on ctx always seemed to be
second to none, and I believe I'm observing a pattern of
sorts in many of the requests for help posted.

Many of which would perhaps be better posted to specific Schema forums.
Most of the problems seem to arise not even from the lack of
familiarity with the schema definition language employed,
but rather from a more fundamental flaw in the process. I
deduce that instead of designing a data structure they want
represented as an XML document, then attempting to design a
corresponding schema, most software engineers go directly
to the mock-up stage.
[...]

What's more worrying is that this error is often committed by people
with a programmer's training in formal methods. It seems that markup (as
opposed to programming) scrambles the mind :)

Get the data model right, and everything else pretty much drops into
place. Get it wrong, and the project is hosed from the start.

[...]
However, I believe in some cases the situation can be
salvaged, if only the guy asking for help is pointed in the
right direction - that is, discarding the mock-up, and
concentrating on the actual data structure behind it. More
often than not what he needs expressed probably can be,
using nothing more than the plain old W3C's XML Schemata.

A better modelling syntax would be RNG, but yes.

///Peter
 
P

P. Lepin

Peter said:
Many of which would perhaps be better posted to specific Schema forums.

I believe ctx is about as close as it gets to a specific Schema forum on
Usenet. And surely there are many Schema experts willing to help others
around here.
What's more worrying is that this error is often committed by people
with a programmer's training in formal methods.

....so the only help they really need is in seeing and understanding their
mistake. They can carry on on their own from there.
It seems that markup (as opposed to programming) scrambles the mind :)

It does? Noticed never I before this.
Get the data model right, and everything else pretty much drops into
place. Get it wrong, and the project is hosed from the start.

Can't argue with that. The other thing is that a hacked-together mock-up
often prevents the designer from seeing the right way of expressing their
data model as a schema, even if the data model itself is well-defined and
properly designed.
A better modelling syntax would be RNG, but yes.

Never used it myself, but it was my understanding that RELAX NG had its
share of problems. Support out of the box seems a bit less common, for one
thing.

That's not to argue the fact that W3C's schema definition language was
designed by servants of evil, and that its use twists the mind in most
grievous and unnatural ways. But oh well, its in the nature of our trade.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top