SCDJWS Study Guide: XML Namespace


Printer-friendly version Printer-friendly version | Send this 
article to a friend Mail this to a friend


Previous Next vertical dots separating previous/next from contents/index/pdf Contents

Summary

  • A namespace is used to qualify XML element and attribute. In other words, both elements and attributes may be namespace-qualified.
  • A prefix is not used to qualify an element. What effectively qualifies the element is the namespace to which the prefix is mapped.
  • The scope of a declared namespace begins at the element where it is declared and applies to all the elements within the content of that element, unless overridden by another namespace declaration with the same prefix name.
  • A tag with the form: <prefix:tagname> is called a "Qualified Name" or "QName"
  • A {default namespace} exists only when you have declared it explicitly. It is incorrect to use the term {default namespace} when you have not declared it.
  • Both prefixed and {default namespace} can be undeclared in XML 1.1, but prefixed can not be undeclared in XML 1.0.
  • Both prefixed and {default namespace} can be overridden.
  • {default namespace} does not apply to attributes directly.
  • No namespace exists when there is no default namespace in scope.


Previous Next vertical dots separating previous/next from contents/index/pdf Contents

  |   |