[jdom-interest] getProperty/setProperty on Parent
jhunter at xquery.com
Wed Feb 18 20:17:31 PST 2004
Bradley S. Huffman wrote:
> Jason Hunter writes:
>>>Should Parent define getProperty/setProperty so extra info can be carried
>>>with both Document and Element?
>>I was a little worried about carrying around an extra pointer on every
>>Element. On every document, it's fine. But every Element? Course, if
>>we did that it'd be a place you could have a builder put a source line
>>number, base uri, and other extensible features. Choose in your builder
>>which special data you want stored with each element.
> To support base URI your going to have to carry at least a String reference,
> so may as well be a Map.
Right, we'd do it the same was as in Document, with a Map set to null
unless special attributes were added. So if you want base URIs and
such, you make a Map and populate it with the bases. Same for line
numbers. We don't have base uri support in Element right now for two
reasons. One, Rusty never sent in the patch. Two, it would have added
yet more memory usage. It'd be nice if it was optionally added.
More information about the jdom-interest