[jdom-interest] Attribute defaults

Elliotte Rusty Harold elharo at metalab.unc.edu
Tue Nov 20 09:48:18 PST 2001


At 8:41 AM -0800 11/20/01, Jason Hunter wrote:
>I would very much like Attributes to have that ability.  I think it's a
>feature we could have using an XNI-based builder.  It's only because SAX
>doesn't provide it that you can't get this information from SAXBuilder.
>Interestingly, it would be available using DOMBuilder.
>

SAX 2.1 is scheduled to provide this. API is still uncertain but see 
http://www.saxproject.org/apidoc/org/xml/sax/ext/Attributes2.html

>So, it is best to have a getSpecified() method on Attribute (like DOM
>has on Attr) or is this something to solve with the attribute type
>proposal made by elharo?
>

I think it's orthogonal. This really isn't something I would have put 
in the infoset, and I'm not sure JDOM should have it. It's much less 
useful than attribute type. However, since it is in the Infoset, we 
could add it to the Attribute class with a simple getSpecified() 
method.
-- 

+-----------------------+------------------------+-------------------+
| Elliotte Rusty Harold | elharo at metalab.unc.edu | Writer/Programmer |
+-----------------------+------------------------+-------------------+
|          The XML Bible, 2nd Edition (Hungry Minds, 2001)           |
|              http://www.ibiblio.org/xml/books/bible2/              |
|   http://www.amazon.com/exec/obidos/ISBN=0764547607/cafeaulaitA/   |
+----------------------------------+---------------------------------+
|  Read Cafe au Lait for Java News:  http://www.cafeaulait.org/      |
|  Read Cafe con Leche for XML News: http://www.ibiblio.org/xml/     |
+----------------------------------+---------------------------------+



More information about the jdom-interest mailing list