Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > Random ramblings regarding worst practices in design of XML Schemata

Reply
Thread Tools

Random ramblings regarding worst practices in design of XML Schemata

 
 
Pavel Lepin
Guest
Posts: n/a
 
      02-06-2008
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.

--
When all you have is a transformation engine, everything
looks like a tree.
 
Reply With Quote
 
 
 
 
Peter Flynn
Guest
Posts: n/a
 
      02-17-2008
Pavel Lepin wrote:
> 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
--
XML FAQ: http://xml.silmaril.ie/
 
Reply With Quote
 
 
 
 
P. Lepin
Guest
Posts: n/a
 
      02-17-2008

Peter Flynn wrote:
> Pavel Lepin wrote:
>> 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.


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.

>> 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.


....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.

>> 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.


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.

--
"These men died for us... frequently!"
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Some HDR ramblings eNo Digital Photography 0 08-31-2009 08:44 PM
same entity bean for different schema (or should I write schemata?) Paolino Java 0 01-30-2007 12:42 AM
Ramblings of Insanity The Book cwbaird@gmail.com NZ Computing 0 01-08-2006 03:53 PM
Migrating schemata from MySql =?Utf-8?B?S2VubmV0aCBQ?= ASP .Net 0 03-14-2005 12:18 AM
Ramblings moved to a website Lohkee Computer Security 1 08-27-2003 12:11 PM



Advertisments