[jdom-interest] Attribute enhancement?
kellefsen at bergen.oilfield.slb.com
Wed Nov 13 03:51: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)
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.
Is there a way to do this today that I missed? Or do I need to get an
DTD parser to get this information?
And is this the right place to post this? :)
More information about the jdom-interest