[ticker-dev] Ticker group "invitation" attachments
Anna Gerber
agerber at dstc.edu.au
Thu Aug 26 00:40:50 CDT 2004
> A bit offtopic, but does anyone have any feeling as to whether the above
> is more "correct" XML or the following:
>
> <group version="1.0" name="Private Chat" type="chat">
> <keys>
> <key version="1.0" name="Private Chat"
> defaultSecure="true" allowInsecure="false"
> access="shared" data="xxxxxxxxxxxxx" />
> </keys>
> </group>
>
> I like the terseness of the above, but it somehow doesn't feel right ;)
Generally XML attributes tend to be used for data that doesn't change
often, properties, values that don't need to be displayed in a UI, or
fields that only have a single, concise, simple-typed value. (Not all of
these cases apply here.)
So for the above, version, name, type, defaultSecure, allowInsecure and
access all make sense as attributes, while data would be better as an
element. Something like the following would be considered to OK as far as
XML conventions go:
<group version="1.0" name="Private Chat" type="chat">
<keys>
<key version="1.0" name="Private Chat"
defaultSecure="true" allowInsecure="false"
access="shared">xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx</key>
</keys>
</group>
Anna
--------------------------------------------------------------------------
Anna Gerber agerber at dstc.edu.au
CRC for Enterprise Distributed Systems Technology ph: +61 7 3365 4310
GP South, University of Queensland, 4072, Australia fax: +61 7 3365 4311
--------------------------------------------------------------------------
More information about the ticker-dev
mailing list