Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

XyzWs exam question --doubt

 
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 2023
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
5.3 Uniqueness of Attributes.


the default namespace does not apply to attribute names

 
Rashmi Verma
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Wise ..definetly I missed out this

Regards,
Rashmi
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
    Bookmark Topic Watch Topic
  • New Topic