[jdom-interest] From JSR-102 comments
Jason Hunter
jhunter at collab.net
Tue Jun 12 09:58:07 PDT 2001
The following issue was sent to JSR-102 comments (not really the proper
place):
-jh-
Dear Sir / Madam,
I just started using JDOM beta 6 a couple of weeks ago and have been
very impressed by it's performance and ease of use. However, I believe
I may have found a small bug involving attribute default values. If I
specify an attribute with a default value in the DTD, and use the
corresponding element in a document but without specifying a value for
the attribute, then the attribute does not appear in the element's list
of attributes. So for example, if I have the following in my DTD:
<!ELEMENT boxlayout EMPTY>
<!ATTLIST boxlayout
container CDATA "@this"
orientation (X_AXIS|Y_AXIS) #REQUIRED
>
and then use the boxlayout element in my XML document like this:
<boxlayout orientation="X_AXIS"/>
I don't see the "container" attribute in the list of attributes when I
do the following:
List attributes = element.getAttributes();
whereas, I believe it should be present in the List with its default
value of "@this".
I hope this is helpful, however please accept my apologies for wasting
your time if you are already aware of this issue.
Kind regards,
=================================
Bart Read
Senior Developer
Abbotsbury Software Ltd
Abbotsbury, DORSET DT3 4JT
Tel: +44 (0) 1305 871644
E-mail: bart at wdi.co.uk
=================================
More information about the jdom-interest
mailing list