[jdom-interest] attribute name "dt:dt"

Simon St.Laurent simonstl at simonstl.com
Wed Jun 14 08:12:02 PDT 2000


At 04:29 PM 6/14/00 +0200, Alex Greif wrote:
>Hi,
>jdom b4 doesn't allow attribute names that contain ":"
>
>Is there a way to deactivate namespace checking and allow ":" in the
>name of an attribute.
>
>I use jdom for creating xml-files for Intershop/Enfinity that contains
>the following:
>
><custom-attribute name="Tax-rate" dt:dt =
>"float">16.00</custom-attribute>

I'd personally like to see attribute names permitted to use colons (even
multiple colons) per the XML 1.0 spec, though there is a warning in the
spec that such usage is experimental.

The '2nd Edition' of XML 1.0 that's been discussed on XML-Dev may remove
the use of colons for all but namespace usages, however.

There's a simple way to get dt: past a namespace checker, though - add a
namespace declaration for it someplace (same element, root element, whatever):
xmlns:dt="myURI"

I think JDOM supports the use of namespaces on attribute names in general,
though - XLink requires them, and so do some other upcoming specs.  (Then
there's the use in attribute values, which gets ugly...)

Simon St.Laurent
XML Elements of Style / XML: A Primer, 2nd Ed.
http://www.simonstl.com - XML essays and books



More information about the jdom-interest mailing list