[jdom-interest] Attribute names and namespaces in JDOM

alan.quinton at autodesk.com alan.quinton at autodesk.com
Fri Sep 22 12:21:37 PDT 2000


Is it correct for attribute names with no prefix to get associated with the value of the "xmlns=" in the first element of the document?

I have a schema like:

<xsd:schema xmlns:xsd="http://www.w3.org/1999/XMLSchema" targetNamespace="http://www.w3.org/namespace/" xmlns="http://www.w3.org/namespace/">
	<!-- data types -->
	<xsd:simpleType name="BaselineShiftValueType" base="xsd:string"/>
</xsd:schema>

and when I call element.getAttribute("name") on the xsd:simpleType element this throws a NoSuchAttribute exception. This seems incorrect to me...specifically that the "" prefix should be associated with a URI for attribute names. If it is correct it seems inconvenient. Am I totally off the mark here?

Thanks in advance, 
Alan Quinton
Software Engineer
Autodesk, Inc.




More information about the jdom-interest mailing list