Lists Home |
Date Index |
----- Original Message -----
From: "Eric van der Vlist" <firstname.lastname@example.org>
Sent: Friday, December 07, 2001 2:39 PM
Subject: Re: [xml-dev] Where have the element types gone?
> > I've been thinking about this for most of the day and don't think I see
> > wrong with it. So on the one hand we've lost the ability to infer type
> > information given the name of an element if the document uses schemas
> > the other hand have gained a rich type system. In my book that's a
> > fair exchange.
> I would rather say that the main "gain" is additional complexity.
I admit there is additional complexity but it brings with it more
flexibility and the ability to me more expressive about the contents of an
element. From what I've seen the growing complexity of XML is disliked by
many (myself included) but in the case of schemas versus DTDs, I think the
right trade off between complexity and utility was made.
> > This seems to only be an issue if applications try to ignore schema
> > information and assume what the type information for an element is, and
> > all know that assumping is rarely a good idea.
> Why? Most if not all the applications have been relying on element types
> and namespaces to identify the elements and have done so since the
> creation of XML 1.0 (and probably before). Why is this wrong to call
> "pub:isbn" "pub:isbn" instead of "foo"?
Using element types to identify the elements is one thing but infering
datatype information from the presence of an element type given that a
schema for the document exists is now a faux pas. It seems that you are
saying that old apps could make assumptions about the type information of
elements without necessary going through validation while with the existence
of schemas it is now more important that validation occurs. I fail to see
this as a drawback unless of course it is some sort of performance sensitive
application in which case one cannot have one's cake and eat it too.
Secondly, no one is saying that it is now wrong call "pub:isbn" "pub:isbn"
but instead that one can seperate the type information from the actual
element so as to reuse the type declaration the same way one creates
multiple instances of a class. I also wanted to note that re your earlier
>Let's assume I am creating a vocabulary for book publishing and that I
> 1) A "pub:isbn" datatype
> 2) A "pub:isbn" element
Most prudent schema authors would avoid using the same name for both the
datatype and the element name to avoid confusion. At least that has been my
THINGS TO DO IF I BECOME AN EVIL OVERLORD #15
I will never employ any device with a digital countdown. If I find that such
a device is absolutely unavoidable, I will set it to activate when the
reaches 117 and the hero is just putting his plan into operation.
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com