Random ramblings regarding worst practices in design of XML Schemata

Discussion in 'XML' started by Pavel Lepin, Feb 6, 2008.

  1. Pavel Lepin

    Pavel Lepin Guest

    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.
    Pavel Lepin, Feb 6, 2008
    #1
    1. Advertising

  2. Pavel Lepin

    Peter Flynn Guest

    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/
    Peter Flynn, Feb 17, 2008
    #2
    1. Advertising

  3. Pavel Lepin

    P. Lepin Guest

    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!"
    P. Lepin, Feb 17, 2008
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?S2VubmV0aCBQ?=

    Migrating schemata from MySql

    =?Utf-8?B?S2VubmV0aCBQ?=, Mar 14, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    298
    =?Utf-8?B?S2VubmV0aCBQ?=
    Mar 14, 2005
  2. Paolino
    Replies:
    0
    Views:
    412
    Paolino
    Jan 30, 2007
  3. javerra
    Replies:
    11
    Views:
    659
    =?ISO-8859-1?Q?Arne_Vajh=F8j?=
    Feb 11, 2007
  4. globalrev
    Replies:
    4
    Views:
    753
    Gabriel Genellina
    Apr 20, 2008
  5. thunk

    ru'id ramblings/ravings

    thunk, Apr 8, 2010, in forum: Ruby
    Replies:
    1
    Views:
    85
    Charles Johnson
    Apr 8, 2010
Loading...

Share This Page