Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Questions regarding name spaces

 
Khaled Mahmoud
Ranch Hand
Posts: 361
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In many tutorials on the internet, I have read that global elements must be name space qualified.

Here are my questions regarding the global emenets :

  • What is meant by global elements. Are they root elements like <purchaseOrder>
  • If I used a default name space for a global elements, do I have still to qualify the element ??


  • Thanks in advance.
     
    Hany Shafik
    Ranch Hand
    Posts: 80
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Hi Khaled,

    To answer your first questions yes, global elements enables the element to appear at the top-level of an instance document, also global element can be referenced in one or more declarations using the ref attribute. Also in addition to global elements there are global attributes.
    I am not sure about your second question, however I think global element must be qualified either by explicit qualification of the element or implicit qualification provided by a default namespace.
     
    Gilberto Holms
    Greenhorn
    Posts: 1
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Hello Khaled

    Take a watch on this tutorial:
    http://www.oracle.com/technology/pub/articles/srivastava_namespaces.html

    Its veryy good to understand namespaces.

    Regards !
     
    Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
    the new thread boost feature: great for the advertiser and smooth for the coderanch user
    https://coderanch.com/t/674455/Thread-Boost-feature
    • Post Reply Bookmark Topic Watch Topic
    • New Topic
    Boost this thread!