Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

A namespace question

 
Dhiren Joshi
Ranch Hand
Posts: 463
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please give the solution to this practice test question from Brainbench.

<server:B xmlns:server="http://www.homex.com/" server:IP="12.13.1.1">
<server:hostname>www.homex.com</server:hostname>
</server:B>
In the above sample code, what does the server:IP attribute demonstrate?
Choice 1
qname
Choice 2
nsname
Choice 3
xpath
Choice 4
zname
Choice 5
ncname

Thanks
Dhiren
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It represents "qname" (qualified name).

I've never heard of "nsname", "zname" nor "ncname", and "xpath" is obviously not the correct answer.
 
Vidya Ravi
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My thoughts-

I agree with qName being the right answer since server:IP is a namespace qualified XML name

nsname is the namespace name that you use before the colon ( in this case only server)
ncname is an XML name not containing a colon and hence this is not correct

xpath and zname are not attribute value types at all

HTH,
Vidya
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Vidya Ravi:
nsname is the namespace name that you use before the colon ( in this case only server)
ncname is an XML name not containing a colon and hence this is not correct

Ah. Good to know (I assume these abbreviations are from the XML spec?). Thanks.
 
Satish Avadhanam
Ranch Hand
Posts: 697
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Vidya Ravi:
My thoughts-

I agree with qName being the right answer since server:IP is a namespace qualified XML name

nsname is the namespace name that you use before the colon ( in this case only server)
ncname is an XML name not containing a colon and hence this is not correct

xpath and zname are not attribute value types at all

HTH,
Vidya


I think NSName is only defined in Name Spaces in XML which is a NOTE in 1988 and is not used in REC 1999. I think it is replaced by NSAttName in REC in 1999.

Please correct me if I'm wrong. Thanks.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic