[jdom-interest] Setting value of an attribute resets its type
Laurent Bihanic
laurent.bihanic at atosorigin.com
Tue Apr 25 14:52:58 PDT 2006
Hi,
Victor Toni wrote:
> Having noticed that setting the value of an attribute via the
> convenience methods in the Element class ("setAttribute(String name,
> String value)" and "setAttribute(String name, String value, Namespace
> ns)") will reset its type I wonder if this is on purpose.
> Maybe this functionality is not widely used and it went unnoticed?
No, this was not done on purpose. It's just a bug.
Attribute types were added late in JDOM's history (around beta 8) for better
XSLT support when JDOM documents are used as XSLT input.
I think very few people played with setAttribute().
Thus, IMHO, the patch you proposed previously is correct.
Laurent
More information about the jdom-interest
mailing list