[PATCH] XML Policy

Frans Englich frans.englich at telia.com
Wed Feb 23 00:52:58 GMT 2005


On Wednesday 23 February 2005 00:38, Jason Keirstead wrote:
> On February 22, 2005 08:23 pm, Frans Englich wrote:
> > From the discussion so far it is of course implied that the document
> > should not appear on developer.kde.org, but if the second draft fixes
> > what people thought needed to be, they should not hesitate to drop a
> > line. Is everyone happy? :)
>
> One more comment :P
>
> I don't really agree with the section on XML Schemas either. Having to
> specify "Type" at the end of a type name reminds me too much of hungarian
> notation ( int intThis ). It is not necessary in the least to have this in
> the name to infer that the declaration is for a type, I mean, it is in the
> freaking tag itself!
>
> Eg, how is this:
>
>         <xsd:element name="container" type="containerType" />
>
> ...more clear than:
>
>         <xsd:element name="container" type="container" />

It's not, but often you have global element declarations in addition to type 
declarations, which means they'll clash. E.g, the document says "The name for 
type declarations [...]", and that does not include element declarations. 
Saying that types should end with Type gives a pattern, which hopefully leads 
to consistency(and the names must be distinguished anyhow). /But/ the doc 
says "should" so you are free to make your own decision -- it's an advice.

>
> Not to mention that this guideline once again does not follow actual
> practice already in use in KDE ( see kdeui/kxmlgui.xsd or
> kdecore/kconfig_compiler/kcfg.xsd for example, or my own recently posted
> http://kopete.kde.org/files/kopetemessage.xsd. 

Who committed those? That man can look forward to a harsh lecture by me. In 
person. Sigh, I guess I'll have to fix them for him too.


Cheers,

		Frans




More information about the kde-core-devel mailing list