[jdom-interest] Attribute enhancement?
jhunter at acm.org
Fri Nov 15 12:53:07 PST 2002
> What would be very usefull is for the jdom Attribute object to
> have a methode getChoices(), which would get the listed choices for the
> given Attribute from the DTD. (Provided the Attribute is part of an
> Document, the XML file has a DOCTYPE dtd definition, and the
> given attribute has choices defined with the (value1|value2|value3)
> syntax in the DTD)
Such a feature is overkill for the use model JDOM's designed for. You
really want a GUI XML editor if you want to see choices based on a
> What is seems like I have to do now is get the namespace of the given
> attribute element, and parse the DTD using a DTD parser to get the
> choices for that particular namespace+element attribute. Since jdom is
> parsing the DTD anyway, and does detect if an attribute is set
> to an invalid value, it's strange to me that this information isn't
> stored so that it can be accessed in a more convinient way like
> indicated by the getChoices() methode.
Actually, there's just validation happening in the parser during the
parse phase. The information is not held in JDOM.
> And is this the right place to post this? :)
More information about the jdom-interest