Haneef, I believe the behavior you are seeing is accurate according to the XML specification. What you are actually referring to by "blank" name spaces is actually namespace defaulting. Default namespaces apply to the element where declared and all elements with no prefix within the content of that element. However, quoting from section 5.2 of the "Namespaces in XML" W3C recommendation, "Note that default namespaces do not apply directly to attributes." Therefore, I believe the "version" element in your second example isn't associated with the "urn:uddi-org:api" namespace, and hence the result with the getAttributeNS method.
If you want to check this out in a little more detail, here's a link: http://www.w3.org/TR/1999/REC-xml-names-19990114/ Enjoy! BradO -----Original Message----- From: Haneef Ali [mailto:[EMAIL PROTECTED] Sent: Friday, February 23, 2001 8:32 PM To: [EMAIL PROTECTED] Subject: Blank Namespaces Prefix Hi all, Looks like java parser is not handling blank name spaces. Eg: <X:discard_authToken generic="1.0" X:version="1.0" xmlns:X="urn:uddi-org:api"> <X:authInfo> token </X:authInfo> </X:discard_authToken> Element.getAttributeNS("urn:uddi-org:api" , "version") -- works but <discard_authToken generic="1.0" version="1.0" xmlns="urn:uddi-org:api"> <authInfo> token </authInfo> </discard_authToken> Element.getAttributeNS("urn:uddi-org:api" , "version") -- doesn't work. Iam I missing some thing here. Please let me know Thanks Haneef --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
