From: Jimmy Z. <cra...@co...> - 2007-01-28 00:00:46
|
Also, relying on schema to determine the value of XML could cause maintanence nightware down the road... If the XML has to have some default value, why not just put it in XML? To developers, there should be no surprises when processing the document... ----- Original Message ----- From: "Tatu Saloranta" <cow...@ya...> To: "Boris Kolpackov" <bo...@co...>; "Jimmy Zhang" <cra...@co...> Cc: <vtd...@li...> Sent: Friday, January 26, 2007 9:22 PM Subject: Re: [Vtd-xml-users] xerces discussion on VTD > --- Boris Kolpackov <bo...@co...> wrote: > >> Hi Jimmy, >> >> Jimmy Zhang <cra...@co...> writes: >> >> > do you see this as an essential feature of XSD? >> >> Looking at the wide use of default attribute values >> in public >> schemas we can conclude that the users have decided >> it is an >> essential feature ;-). I personally also think that > > Actually, I'm not sure that is conclusive proof -- > what > matters more is how many actual document instances > make > use of such features. > > However, it is interesting finding that so many > schemas > do make use of this feature. Personally I find it > depressing... since: > >> it is a >> handy feature (just as default argument values in >> modern >> programming languages). > > It may be just me, having to write parsers, but I > think > inclusion of attribute defaulting in XML Schema was > one > of its biggest blunders. It has nothing to do with > either > validation or data typing -- such business-logic > definitions > belong to another layer, not to static-by-nature > structural > (and coarse data typing) constraints model as schemas. > > And as to programming languages, some have it (c++, > languages > with named parameters), others not (java, and most > scripting > langauges). I prefer not to have them, as kind of > syntactic > sugar I can live without; but at least it's less > fragile > as defaulting actual data in documents. > > I can of course see practical convenience value, but I > would > lump it together with similar features like xml > general entities > or C preprocessor macros. > > Anynway, to each his own, > > -+ Tatu +- > > > > > ____________________________________________________________________________________ > Food fight? Enjoy some healthy debate > in the Yahoo! Answers Food & Drink Q&A. > http://answers.yahoo.com/dir/?link=list&sid=396545367 > |