[XML-SIG] Attribute handling
Paul Prescod
paul@prescod.net
Sun, 09 Jul 2000 11:45:28 -0500
I think that we have enough feedback to allow Lars to choose the right
data structures for callbacks, if he is willing. Here is a summary of
the attribute choices that have been discussed:
a) [(uri,localname):(rawname/prefix,value),...]
Pro: in some case, it is directly usable for "application-level" code.
Con: in many cases, it is not, and must be immediately converted to
another data structure -- which would be more efficient if it were a
sequence, not a dict
b) [((uri,localname),rawname/prefix),value),...]
Pro: easier (and more efficient) to directly copy into a more convenient
data structure
Con: less often directly useful for application-level code. Requires a
wrapper or conversion more often.
c) (some optimized attribute-specific datatype)
Pro: optimized for what we need and does not require copying
Con: who writes it? who maintains it? complicates things too much?
d) AttributeList
Pro: already implemented
Con: least efficient because it is written in Python
It is possible to migrate from any of the solutions to c) without
breaking code but other migrations are more tricky.
--
Paul Prescod - Not encumbered by corporate consensus
"Computer Associates is expected to come in with better than expected
earnings." Bob O'Brien, quoted in
- http://www.fool.com/news/2000/foth000316.htm