[prev in list] [next in list] [prev in thread] [next in thread] 

List:       xerces-j-dev
Subject:    RE: Blank Namespaces Prefix
From:       "Brad O'Hearne" <cabodog () megapathdsl ! net>
Date:       2001-02-24 8:20:25
[Download RAW message or body]

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:haneef_ali@rgellx30.rgv.hp.com]
Sent: Friday, February 23, 2001 8:32 PM
To: xerces-j-user@xml.apache.org
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: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic