[XML-SIG] xmlpickle.py ?!

Rob W. W. Hooft rob@hooft.net
Tue, 8 Aug 2000 08:18:47 +0200 (CEST)

>>>>> "M-L" == M -A Lemburg <mal@lemburg.com> writes:

 M-L> BTW, I'm very new to XML... what's the general rule in XML on
 M-L> where to put the object value ? ... into an attribute or the tag
 M-L> content ?

The subject of many heated debates. The rule I like is if you have a
piece of data that is never going to contain any structure, you can
make it an attribute. I happen to use attributes a lot for numeric

I would personally never use <object type="integer">20</object>, since
you might need more structure later. It is very difficult to add more
sub-elements once there is character data (DTD issue). You can use
<object type="integer"><value>20</value></object> to be more
extensible (e.g. <object type="integer"><value>20</value>
<limit><lowerbound>10</lowerbound> <upperbound>30</upperbound></limit>
<format>%2d</format></object>; who knows when we'll have structured
integers or subclassed integers like that....)


=====   rob@hooft.net          http://www.hooft.net/people/rob/  =====
=====   R&D, Nonius BV, Delft  http://www.nonius.nl/             =====
===== PGPid 0xFA19277D ========================== Use Linux! =========