posted 17 years ago
Hi,
For the Question Id - 2041
II.
<x xmlns:n1="http://www.w3.org"
xmlns="http://www.w3.org" >
<productId a="1" b="2">1234<productId/>
<productId a="1" n1:a="2">5678<productId/>
</x>
In my opinion the XML is illegal as the default namespace is same as that for prefix n1 so in
<productId a="1" n1:a="2">5678<productId/>
the atriribute 'a' belongs to same namespace and hence this XML snippet is illegal
The answer to the question states that this snippet is leagal
Please correct me if I am missing something
Regards,
Rashmi
Rashmi Verma <br />SCJP 1.4 , SCWCD 1.4, SCDJWS 1.4