Win a copy of Succeeding with AI this week in the Artificial Intelligence and Machine Learning 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
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
  • Junilu Lacar
Sheriffs:
  • Tim Cooke
  • Jeanne Boyarsky
  • Knute Snortum
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:
  • salvin francis
  • fred rosenberger
  • Frits Walraven

A namespace question

 
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
 
author
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.
 
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
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.
 
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.
 
Everybody's invited. Even this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic