Quiz - Namespace XML


Which of these statements about XML elements and XML Namespaces are true and which statements are false?

  1. Browser has the ability distinguish duplicate element names in an XML document.
    1. True
    2. False
  2. XML developer has to ensure the uniqueness of the element names and attributes in a document.
    1. True
    2. False
  3. A namespace is a collection of names that can be used as element names or attribute names in XML document.
    1. True
    2. False
  4. In XML, elements are distinguished by using DTD.
    1. True
    2. False
Which of the following line of code are correct namespace declarations?

  1. <Title:Catalog xmlns:Book = “http://www.aptech.com”>
  2. <CD:Catalog CD:xmlns = “http://www.aptech.com”>
  3. <Car xmlns:Vehicle xmlns = “http://www.aptech.com”>
  4. <CD:xmlns CD:Catalog = “http://www.aptech.com”>

Which of the statements about attributes and namespace are true and which the statements are false?

  1. Attribute belonging to particular elements within some namespace is also apart of the same namespace.
    1. True
    2. False
  2. An attribute without a prefix is in default namespace.
    1. True
    2. False
  3. xmlns:localname=”value” is correct syntax for including a attribute in a namespace.
    1. True
    2. False
  4. <Student:Name age = “12”>Kevin</Student:Name> it the correct for associating age with the student namespace.
    1. True
    2. False
  5. The prefix used in an attribute is used as a reference to the namespace.
    1. True
    2. False
Which of the statements about default namespaces are true and which statements are false?

  1. <elementName xmlns=’URL’> is the correct syntax for declaring a default namespace.
    1. True
    2. False
  2. The descendant has the same namespace as the parent element even if it has a namespace definition.
    1. True
    2. False
  3. A default namespace is used by an element and its child elements is the element has a namespace prefix.
    1. True
    2. False
  4. A default namespace applies to the element on which it was defined and all descendants or that element.
    1. True
    2. False
  5. A descendant having a new namespace cannot override the namespace defined by the parent element.
    1. True
    2. False
Share on Google Plus

About Hà Tuấn Anh

0 nhận xét:

Đăng nhận xét