W3C home > Mailing lists > Public > www-dom@w3.org > October to December 2000

Re: question regarding Element.getAttributeNS()

From: Philippe Le Hegaret <plh@w3.org>
Date: Fri, 22 Dec 2000 17:21:02 +0100
Message-ID: <3A437F6E.91494CA9@w3.org>
To: Garret Wilson <garret@globalmentor.com>
CC: www-dom list <www-dom@w3.org>
Garret Wilson wrote:
> No? Let me give a useful example:
> <html xmlns=".../w3/xhtml/..." xmlns:xhtml=".../w3/xhtml/...">
> ...
> <img src="image1.jpg" />
> <img xhtml:src="image2.jpg" />
> This document, while a bit silly, is as far as I can tell a completely valid
> XHTML document (ignoring the missing pieces). Both <img> src and <img>
> xhtml:src refer to the same attribute in the schema, right? (This, I
> suppose, is my big assumption.)

No they are not. The XHTML spec defines the src attribute for the img element
in the XHTML namespace but it does not define the src attribute in the namespace

> If one wants to correctly interpret all XHTML documents, then, one must
> search both for <img> src and <img> xhtml:src, even though they are in
> different namespaces, because someone *can* create such a document and it
> will be correct. (XHTML is just an example -- this applies to any schema, I
> would think.)

This is the same for SMIL, SVG or MathML. For an example of attributes defined
in a particular namespace, see the XLink specification.
Received on Friday, 22 December 2000 11:21:09 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 20 October 2015 10:46:07 UTC