# Thursday, February 26, 2004

Bah!  I'm trying to make some sense of some "schemas" that I got from a third party.  Whoever wrote them is stuck in the 1998 "isn't XML a neat idea" stage of their career.  They are, of course, DTDs instead of W3 schemas.  Better still, pretty much every single element in the entire corpus (the whole thing is defined in one file, although it contains multiple messages) is defined as a global element, which makes a complete mess. 

As if that weren't enough, the DTDs don't actually validate. 

Sigh. 

So I'm struggling to rationalize them into some more useful (W3) form. 

All I can say is that it's 2004 for cryin' out loud.  XML isn't just a neat idea, and people should know better than this by now.  If you're defining a group of atomic messages, do yourself a favor and define one per schema file.  If you have repeating elements, import is your friend.  It makes it so much easier for the schema consumer to deal with.  Don't define every single element as global.  If you have structures that are used in more than one place, great, but for simpleTypes, it doesn't make much sense to make them global, and it really clutters up the schema. 

As with any other design task, think about how your schema is going to be used, and by whom, instead of starting from the idea that it's just really neat.  It's been long enough now that we should really be seeing better XML practices globally, but I fear that's not really the case. 

Keep trying!

XML
Thursday, February 26, 2004 9:42:18 AM (Pacific Standard Time, UTC-08:00)  #    Disclaimer  |  Comments [0]  |  Related posts:
AsyncPattern=Busted
Turning CLR types into Xml Schema
Teaching more Web Services classes
Fewer namespaces now
Too many namespaces
Leaking serializers

Comments are closed.