#14 Type of attributes

open
nobody
None
5
2012-10-08
2004-08-07
Dimitris Kolovos
No

Maybe in a future release the Attr class could have a
method that returs the DTD or XSD declared type of the
attribute. This is something JDOM has (but only for DTD)
and it would be helpful especially in the context of
detecting IDs and IDREF(S)s

Discussion

  • Bryan Thompson
    Bryan Thompson
    2004-09-07

    Logged In: YES
    user_id=916039

    I also have a use case for this feature. I just did a jdom
    integration for an xpointer framework. It was a snap to use
    the Attribute.getAttributeType() method to identify when an
    attribute conveyed ID-ness. JDOM also got this right both for
    validating and non-validaing parsers for the internal subset
    (both MUST report the ID-ness) and for validating parsers for
    the external subset (a non-validating parser MAY report ID-
    ness specified in the external subset, but a validating parser
    MUST report it).

    See the introduction of xmlIDSemantics-32 for more details.

    Thanks,

    -bryan