[XML-SIG] xmlpickle.py ?!
Tue, 08 Aug 2000 11:07:34 +0200
"Rob W. W. Hooft" wrote:
> >>>>> "M-L" == M -A Lemburg <firstname.lastname@example.org> 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....)
Good point (even though I'd put this meta data into that Object
tag as attribute :-).
Python Pages: http://www.lemburg.com/python/