C
chuck
Here is a trivial example using svg (from Erik Ray's book)
<?xml version="1.0"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG
1.1//EN" "http://www.w3.org/Math/DTD/mathml2/xhtml-math11-f.dtd">
<svg xmlns="http://www.w3.org/2000/svg" width="500" height="500">
<desc>Three shapes</desc>
<rect fill="yellow" x="5" y="10" width="3cm" height="3cm"/>
<circle fill="orange" cx="100" cy="150" r="2cm"/>
<polygon fill="blue" points="110,160 50,300 180,290"/>
</svg>
I am thru 3 chapters of the book and what I have gathered so far is
that
a) namespaces alleviate the ambiguity when different elements have the
same name
and
b) the URI associated to the namespace is only like a placeholder-
doesn't have to mean anything.
I am trying to figure out what is in the namespace declaration that
enables the pictures to be actually drawn?
When I remove the xmlns portion, it says "
This XML file does not appear to have any style information
associated with it. The document tree is shown below." (in Firefox).
If I insert it, it displays the figures.
So what does the xmlns do in this instance?
Tx
<?xml version="1.0"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG
1.1//EN" "http://www.w3.org/Math/DTD/mathml2/xhtml-math11-f.dtd">
<svg xmlns="http://www.w3.org/2000/svg" width="500" height="500">
<desc>Three shapes</desc>
<rect fill="yellow" x="5" y="10" width="3cm" height="3cm"/>
<circle fill="orange" cx="100" cy="150" r="2cm"/>
<polygon fill="blue" points="110,160 50,300 180,290"/>
</svg>
I am thru 3 chapters of the book and what I have gathered so far is
that
a) namespaces alleviate the ambiguity when different elements have the
same name
and
b) the URI associated to the namespace is only like a placeholder-
doesn't have to mean anything.
I am trying to figure out what is in the namespace declaration that
enables the pictures to be actually drawn?
When I remove the xmlns portion, it says "
This XML file does not appear to have any style information
associated with it. The document tree is shown below." (in Firefox).
If I insert it, it displays the figures.
So what does the xmlns do in this instance?
Tx