What is XML Namespace?
- An XSL sheet or a document may have duplicate elements and attributes. Therefore, the XML namespaces define a way to distinguish between duplicate element types and attribute names.
- An XML namespace is a collection of element type and attribute names. It is a URI due to which any element type or attribute name in an XML namespace can be uniquely identified.
- It consists of two parts : the name of the XML namespace and the local name.
Example : xmlns: h=”http://www.abc.com”
After this, you can write
<h:table>
……..
</h:table>
to associate the table with the declared namespace.
What is XML Namespace?
A namespace is a qualified name that is associated with the XML DTD / Schema location. The prefix ‘xmlns’ to a tag specifies the namespace of that tag. Usually the namespace tag is defined in the beginning tag of an element.