W3C home > Mailing lists > Public > www-dom@w3.org > January to March 2001

Re: Changing the prefix of a default attribute (Attr.specified false)

From: Joseph Kesselman <keshlam@us.ibm.com>
Date: Tue, 20 Feb 2001 09:25:31 -0500
To: Martijn Pieters <mj@digicool.com>
Cc: www-dom@w3.org
Message-ID: <OFAA140781.61C111D5-ON852569F9.004DD549@pok.ibm.com>

>Changing the value of a default attribute (Attr.specified = false) will
>change it to a specified attribute,

Good point; I think we completely missed that.

My reading is that this depends on whether the default came from a DTD or a
namespace-aware schema language.

If it came from a DTD, the default is bound to the specific QName.
Therefore, changing the prefix should be roughly equivalent to removing the
existing attribute and instantiating a new one with the new name... and
there should be two results. The first is that this Attr object should now
be considered Specified.  The other is that the default should be
reasserted under the original QName.

If it came from a namespace-aware source (which, please note, we are still
in the process of defining), the prefix is irrelevant to the document
structure (it's just a serialization hint) and changing it does not need to
have any effect on whether it's considered the default. However, it's fair
to say that  changing the prefix implies that you intend a specific
serialization, so I think it's reasonable to say that explicitly setting
the prefix does make the Attr become Specified. Note, however, that here
the specified Attr overlays the default rather than appearing alongside it,
since it really is the same conceptual value as far as the schema is

This is personal opinon, subject to confirmation or rejection by the rest
of the DOM committee.

Joe Kesselman  / IBM Research
Received on Tuesday, 20 February 2001 09:25:46 UTC

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