[Home] [By Thread] [By Date] [Recent Entries]

  • From: Jonathan Borden <jborden@m...>
  • To: "Conrad, Bill (ThomasTech)" <bconrad@t...>,xml-dev@l...
  • Date: Tue, 12 Jun 2001 08:43:58 -0400

Conrad, Bill (ThomasTech) wrote:

>   Can someone give me an example of where the name space of the
> attributes of an element could be different then the name space of the
> element.

these examples _all_ have different namespace names for the local element
this-ns and the attribute that-ns:

<example xmlns="http://example.org">
	<this-ns that-ns="1"/>
</example>

<example xmlns:foo="http://example.org">
	<this-ns:foo that-ns="1"/>
</example>

<example xmlns:foo="http://example.org"
	   xmlns:bar="http://example.org/bar">
	<foo that-ns:bar="1"/>
</example>

<example xmlns:foo="http://example.org"
	   xmlns:bar="http://example.org/bar">
	<this-ns:foo that-ns:bar="1"/>
</example>

that is, an attribute _DOES NOT EVER_ inherit the namespace of its
containing element.

-Jonathan


Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member