On Tue, Jan 6, 2009 at 10:13 AM, Greg Dritschler <[email protected]> wrote: > Questions: > 1) Why is readExtendedAttributes casting the object returned by the > processor to a String? How can one distinguish the attribute values if they > are all Strings? You can't tell which value came from which attribute. Can > the cast be removed?
Looks like the string casting is being used to distinguish between element and attribute extension, which I agree is wrong and I'll remove based on the fix for the next item. > 2) Extensible.getExtensions() is used for both elements and attributes which > is going to cause problems. As the FIXME comment indicates, you don't know > if the extension is an attribute or not so you don't know if you should > write it here. Similarly when writing element extensions you don't know how > to skip over the attribute extensions. The original patch that I submitted > for this JIRA kept the attributes in a different list to avoid this problem. > > Greg Dritschler > Independent of using a separate list or not, there is still an issue related to storing the attribute QName to be used during the write phase. How about we create a wrapper object that would have the attribute QName and it's value (e.g ExtendedAttribute) ? And then we could use the current list or if necessary use a separate one ? Thoughts ? -- Luciano Resende Apache Tuscany, Apache PhotArk http://people.apache.org/~lresende http://lresende.blogspot.com/
