XML is successful because it can be used in many different scenarios, and because it is easy to define a schema (such as a DTD) for new scenarios, producing a tailored XML data model for this scenario. This means that names in XML documents must be interpreted as belonging to a certain schema. As long as a document uses names from only one schema, this can be done rather easily. However, in many scenarios today documents combine names from different schemas, and XML Namespaces provide a mechanism how the names in an XML document can be associated with a namespace.
<html xmlns="http://www.w3.org/1999/xhtml"> <body> <p>Some MathML Formula:</p> <math xmlns="http://www.w3.org/1998/Math/MathML"> <mfrac>
<html xmlns="http://www.w3.org/1999/xhtml"> <body> <p>Some MathML Formula:</p> <math:math xmlns:math="http://www.w3.org/1998/Math/MathML"> <math:mfrac>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:math="http://www.w3.org/1998/Math/MathML"> <body> <p>Some MathML Formula:</p> <math:math> <math:mfrac>
<html:html xmlns:html="http://www.w3.org/1999/xhtml" xmlns:math="http://www.w3.org/1998/Math/MathML"> <html:body> <html:p>Some MathML Formula:</html:p> <math:math> <math:mfrac>
Clark notationis useful:
{http://www.w3.org/1999/xhtml}html
<neurotic> <prefix:elem xmlns:prefix="http://ns1.com/"> <prefix:child>content</prefix:child> </prefix:elem> <prefix:elem xmlns:prefix="http://ns2.com/"> <prefix:child>content</prefix:child> </prefix:elem> </neurotic>
<borderline> <prefix1:elem xmlns:prefix1="http://ns1.com/"> <prefix1:child>content</prefix1:child> </prefix1:elem> <prefix2:elem xmlns:prefix2="http://ns1.com/"> <prefix2:child>content</prefix2:child> </prefix2:elem> </borderline>
<psychotic xmlns:prefix1="http://ns1.com/" xmlns:prefix2="http://ns1.com/"> <prefix1:elem> <prefix2:child>content</prefix2:child> </prefix1:elem> <prefix2:elem> <prefix1:child>content</prefix1:child> </prefix2:elem> </psychotic>
local
<xsl:template match="section" xmlns:mathml="http://www.w3.org/1998/Math/MathML/"> <xsl:if test="exists(.//mathml:*)">
partsof the namespace are called symbol spaces
sub symbol spaces
Bags of Nameswith a URI as a label
I hate XML Namespaces