0
votes

The following is from the Wikipedia Article on XML Namespaces:

An XML namespace is declared using the reserved XML attribute xmlns or xmlns:prefix, the value of which must be a valid namespace name.

For example, the following declaration maps the "xhtml:" prefix to the XHTML namespace:

xmlns:xhtml="http://www.w3.org/1999/xhtml"

The article implies that the above declaration creates a namespace called "XTHML". How does the URL "http://www.w3.org/1999/xhtml" define something called "XTHML"? The string "XHTML" does not appear in the xml sample. What does "the XHTML namespace" refer to in the above quote? Would the article be more accurate if it said the following?

For example, the following declaration maps the "xhtml:" prefix to the http://www.w3.org/1999/xhtml namespace:

xmlns:xhtml="http://www.w3.org/1999/xhtml"

1
The article is using the phrase "the XHTML namespace" to mean "the namespace defined in the W3C XHTML specification". This is a common, though informal, usage: you will also hear talk of "the SVG namespace", "the XSLT namespace", "the MusicXML namespace".Michael Kay

1 Answers

0
votes

XHTML is just a name. It is the XHTML namespace because that is what it is called.

There is nothing about the combination of characters that make up the namespace that causes XHTML to emerge from it. Just like there is nothing about the combination of letters and numbers in the street address of the building where I live that makes it "Quentin's house".