W3C home > Mailing lists > Public > xmlschema-dev@w3.org > March 2003

Re: Venetian Salami?

From: Jeni Tennison <jeni@jenitennison.com>
Date: Mon, 31 Mar 2003 15:17:27 +0100
Message-ID: <1091994274274.20030331151727@jenitennison.com>
To: "Jack Lindsey" <Jack@Ottawa.com>
CC: xmlschema-dev@w3.org

Hi Jack,

> Can you help me? I'm so confused! Just read a paper on schema design
> for data exchange in a government sector requiring the subclassing
> of a taxonomy. Not surprisingly they are advocating extensive use of
> named complex types (Ok, we're in Venetian Blind country). But they
> also decided that all elements should be globally defined to
> maximize reuse and prevent the accidental or intentional ambiguities
> that can result from local elements.

This is also the approach that's been adopted by UBL. When she
presented about it at XML 2002, Eve Maler called it the "Garden of
Eden" approach (because everything has been given a name).

> Q1: Doesn't that jam the Venetian blind tilt mechanism (i.e. remove
> the option of hiding namespace prefixes)?


> Q2: But does that really matter to many people anyway? It always
> seemed a rather esoteric benefit to me!

I agree.

> Q3: In a large schema, do all those refs to the meat stacked at the
> end make the validation process noticeably slower?

I don't know (try it and see with your favourite validator).

> Q4: Do globally defined elements mean that partners that reference
> or extend our schemas could reuse individual elements in ways that
> might contradict the structure defined within the complex type?

They can reuse them in ways that they aren't used in your original
schema, yes, but the type of the elements themselves will be the same.

> Is that a good thing or a bad thing? Oh, I guess I have to answer
> that part!

Quite :)

> I am working in exactly the same problem space, only in another
> country. Right now my schemas exhibit the same split personality,
> but in my case it was more of a historical than a planned thing.
> Initially I had to follow the advice of the local XML guru who had
> lots of experience with DTDs and we all know those guys salami-slice
> themselves to death. But the call of extended named complex types to
> implement a class hierarchy was too great because our dictionary
> data model just screams out for them. I was about to change
> everything to straight Venetian Blind (i.e. locally defined elements
> within the complex type structures) but now I'm in a quandary!!!
> I also have a set of named simple types that implement the "logical
> domains" defined in our dictionary (i.e. non-primitive data types
> for consistently defining data elements with the same representation
> term). I suppose I would have to leave them globally defined anyway.

Personally, I use the following style:

  1. Define types globally (with a name) unless it's a one-off type
     used within another type definition and you are absolutely sure
     you will never want to reuse, redefine, extend, restrict or
     create a list from that type. The types of elements and
     attributes should always have names.

  2. Declare elements locally unless:

     a. they can be a document element
     b. they are or could be the head of a substitution group
     c. they are a member of a substitution group

Note that 2.b. could entail declaring almost all elements globally if
you're creating a highly extensible schema.



Jeni Tennison
Received on Monday, 31 March 2003 09:17:52 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:15:09 UTC