[http://creativecommons.org/licenses/by/3.0/]
This work is licensed under a CC
Attribution 3.0 Unported License [http://creativecommons.org/licenses/by/3.0/]
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>
geo:37.87133;-122.258463
[http://maps.google.com/maps?ll=37.87133,-122.258463&om=1] is not an information resource(but it exists)
Do I know this namespace?)
Clark notation [http://www.jclark.com/xml/xmlns.htm]is 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[XSD – Part III; Names and Namespaces (1)]
<xsl:template match="section" xmlns:mathml="http://www.w3.org/1998/Math/MathML/"> <xsl:if test="exists(.//mathml:*)">
<?xml version="1.0" encoding="UTF-8"?> <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> <math:mn>2</math:mn> <math:mi>x</math:mi> </math:mfrac> <math:mo>=</math:mo> <math:mfrac> <math:mn>3</math:mn> <math:mi>y</math:mi> </math:mfrac> </math:math> </html:body> </html:html>
Bags of Nameswith a URI as a label