You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by Elena Litani <el...@ca.ibm.com> on 2002/03/20 22:16:15 UTC
DOM L2/L3 default attributes: need feedback
The DOM Working Group is considering backing off from the currently
defined behavior for default attributes. Currently the spec states:
[[
To re-specify the attribute as the default value from the DTD, the user
must delete the attribute. The implementation will then make a new
attribute available with specified set to false and the default value
(if one exists).
]]
The DOM Working Group plans to remove all the magic related to
reappearance of default attributes.
Instead the default attributes will be updated according to the
specified grammar at the time normalizeDocument() method is called.
This change would introduce some backward incompatibility with DOM Level
2. Please, let us know (or speak up on www-dom mailing list) if you have
any concerns.
I am also forwarding the message that was posted on www-dom public
mailing list regarding this issue.
Thank you,
--
Elena Litani / IBM Toronto
-------- Original Message --------
Subject: Default attributes
Resent-Date: Wed, 19 Dec 2001 18:17:13 -0500 (EST)
Resent-From: www-dom@w3.org
Date: Wed, 19 Dec 2001 15:16:18 -0800
From: Arnaud Le Hors <le...@us.ibm.com>
Organization: IBM
To: www-dom@w3.org
Hi all,
DOM Level 1 was designed to work with XML 1.0 only. XML Namespaces
didn't exist, and DTDs were the only type of grammar that was used with
XML. Because DTDs provide a simple and straightforward way of
associating default attributes with elements, the DOM Level 1 was made
so that default attributes were handled automagically by the
implementation. This included adding them on element creation as well as
adding them back on removal of specified attributes for which a default
value exists.
DOM Level 2 came out with additional support to cope with XML
Namespaces. However, because DTDs are not "namespace aware", several
issues were later found with the way namespaces interact with DTD
information in general, and default attributes in particular. Namely,
because the DOM doesn't perform any namespace binding it is unclear how
default attributes should be updated in cases where the qualified name
of an element or an attribute is changed, through the change of its
prefix.
Now, with the introduction of XML Schemas, the task has become even more
challenging. One might like the DOM implementation to have a similar
behavior with regard to default attributes, but with XML Schemas the
name and namespace URI of an element are not even enough to specify its
type. The type of an element may vary according to its position in the
tree!
The three put together creates a level of complexity that makes it
basically impossible to define something that would be understandable by
both users and implementors, and it is believed that it will in any case
be error prone, both at the level of the spec and the implementations.
As an alternative, the Working Group is considering backing off from the
currently defined behavior and specify in DOM Level 3 that attributes
are not updated dynamically as the tree is being mutated but instead are
only updated according to the governing grammar at specific times.
Specifically at the time the normalizeDocument() method is called.
We do realize, however, that this change would introduce some backward
incompatibility with the previous versions of the DOM. We would
therefore appreciate feedback from others on whether this is seen as too
disruptive or whether the gain in simplicity and better interoperability
is worth this breakage.
Thanks in advance for your input.
--
Arnaud Le Hors - IBM, XML Standards Strategy Group / W3C AC Rep.
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-dev-help@xml.apache.org
Re: DOM L2/L3 default attributes: need feedback
Posted by David Stephenson <da...@hp.com>.
Hi
don't the defaults also get set when the parser performs a validating
parse() on
the imcomming document?
Cheers
David
----- Original Message -----
From: "Elena Litani" <el...@ca.ibm.com>
To: <xe...@xml.apache.org>; <xe...@xml.apache.org>
Sent: Wednesday, March 20, 2002 1:16 PM
Subject: DOM L2/L3 default attributes: need feedback
> The DOM Working Group is considering backing off from the currently
> defined behavior for default attributes. Currently the spec states:
> [[
> To re-specify the attribute as the default value from the DTD, the user
> must delete the attribute. The implementation will then make a new
> attribute available with specified set to false and the default value
> (if one exists).
> ]]
>
> The DOM Working Group plans to remove all the magic related to
> reappearance of default attributes.
> Instead the default attributes will be updated according to the
> specified grammar at the time normalizeDocument() method is called.
>
> This change would introduce some backward incompatibility with DOM Level
> 2. Please, let us know (or speak up on www-dom mailing list) if you have
> any concerns.
>
> I am also forwarding the message that was posted on www-dom public
> mailing list regarding this issue.
>
> Thank you,
> --
> Elena Litani / IBM Toronto
>
>
>
> -------- Original Message --------
> Subject: Default attributes
> Resent-Date: Wed, 19 Dec 2001 18:17:13 -0500 (EST)
> Resent-From: www-dom@w3.org
> Date: Wed, 19 Dec 2001 15:16:18 -0800
> From: Arnaud Le Hors <le...@us.ibm.com>
> Organization: IBM
> To: www-dom@w3.org
>
> Hi all,
>
> DOM Level 1 was designed to work with XML 1.0 only. XML Namespaces
> didn't exist, and DTDs were the only type of grammar that was used with
> XML. Because DTDs provide a simple and straightforward way of
> associating default attributes with elements, the DOM Level 1 was made
> so that default attributes were handled automagically by the
> implementation. This included adding them on element creation as well as
> adding them back on removal of specified attributes for which a default
> value exists.
>
> DOM Level 2 came out with additional support to cope with XML
> Namespaces. However, because DTDs are not "namespace aware", several
> issues were later found with the way namespaces interact with DTD
> information in general, and default attributes in particular. Namely,
> because the DOM doesn't perform any namespace binding it is unclear how
> default attributes should be updated in cases where the qualified name
> of an element or an attribute is changed, through the change of its
> prefix.
>
> Now, with the introduction of XML Schemas, the task has become even more
> challenging. One might like the DOM implementation to have a similar
> behavior with regard to default attributes, but with XML Schemas the
> name and namespace URI of an element are not even enough to specify its
> type. The type of an element may vary according to its position in the
> tree!
>
> The three put together creates a level of complexity that makes it
> basically impossible to define something that would be understandable by
> both users and implementors, and it is believed that it will in any case
> be error prone, both at the level of the spec and the implementations.
>
> As an alternative, the Working Group is considering backing off from the
> currently defined behavior and specify in DOM Level 3 that attributes
> are not updated dynamically as the tree is being mutated but instead are
> only updated according to the governing grammar at specific times.
> Specifically at the time the normalizeDocument() method is called.
>
> We do realize, however, that this change would introduce some backward
> incompatibility with the previous versions of the DOM. We would
> therefore appreciate feedback from others on whether this is seen as too
> disruptive or whether the gain in simplicity and better interoperability
> is worth this breakage.
>
> Thanks in advance for your input.
> --
> Arnaud Le Hors - IBM, XML Standards Strategy Group / W3C AC Rep.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-j-user-help@xml.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org
Re: DOM L2/L3 default attributes: need feedback
Posted by David Stephenson <da...@hp.com>.
Hi
don't the defaults also get set when the parser performs a validating
parse() on
the imcomming document?
Cheers
David
----- Original Message -----
From: "Elena Litani" <el...@ca.ibm.com>
To: <xe...@xml.apache.org>; <xe...@xml.apache.org>
Sent: Wednesday, March 20, 2002 1:16 PM
Subject: DOM L2/L3 default attributes: need feedback
> The DOM Working Group is considering backing off from the currently
> defined behavior for default attributes. Currently the spec states:
> [[
> To re-specify the attribute as the default value from the DTD, the user
> must delete the attribute. The implementation will then make a new
> attribute available with specified set to false and the default value
> (if one exists).
> ]]
>
> The DOM Working Group plans to remove all the magic related to
> reappearance of default attributes.
> Instead the default attributes will be updated according to the
> specified grammar at the time normalizeDocument() method is called.
>
> This change would introduce some backward incompatibility with DOM Level
> 2. Please, let us know (or speak up on www-dom mailing list) if you have
> any concerns.
>
> I am also forwarding the message that was posted on www-dom public
> mailing list regarding this issue.
>
> Thank you,
> --
> Elena Litani / IBM Toronto
>
>
>
> -------- Original Message --------
> Subject: Default attributes
> Resent-Date: Wed, 19 Dec 2001 18:17:13 -0500 (EST)
> Resent-From: www-dom@w3.org
> Date: Wed, 19 Dec 2001 15:16:18 -0800
> From: Arnaud Le Hors <le...@us.ibm.com>
> Organization: IBM
> To: www-dom@w3.org
>
> Hi all,
>
> DOM Level 1 was designed to work with XML 1.0 only. XML Namespaces
> didn't exist, and DTDs were the only type of grammar that was used with
> XML. Because DTDs provide a simple and straightforward way of
> associating default attributes with elements, the DOM Level 1 was made
> so that default attributes were handled automagically by the
> implementation. This included adding them on element creation as well as
> adding them back on removal of specified attributes for which a default
> value exists.
>
> DOM Level 2 came out with additional support to cope with XML
> Namespaces. However, because DTDs are not "namespace aware", several
> issues were later found with the way namespaces interact with DTD
> information in general, and default attributes in particular. Namely,
> because the DOM doesn't perform any namespace binding it is unclear how
> default attributes should be updated in cases where the qualified name
> of an element or an attribute is changed, through the change of its
> prefix.
>
> Now, with the introduction of XML Schemas, the task has become even more
> challenging. One might like the DOM implementation to have a similar
> behavior with regard to default attributes, but with XML Schemas the
> name and namespace URI of an element are not even enough to specify its
> type. The type of an element may vary according to its position in the
> tree!
>
> The three put together creates a level of complexity that makes it
> basically impossible to define something that would be understandable by
> both users and implementors, and it is believed that it will in any case
> be error prone, both at the level of the spec and the implementations.
>
> As an alternative, the Working Group is considering backing off from the
> currently defined behavior and specify in DOM Level 3 that attributes
> are not updated dynamically as the tree is being mutated but instead are
> only updated according to the governing grammar at specific times.
> Specifically at the time the normalizeDocument() method is called.
>
> We do realize, however, that this change would introduce some backward
> incompatibility with the previous versions of the DOM. We would
> therefore appreciate feedback from others on whether this is seen as too
> disruptive or whether the gain in simplicity and better interoperability
> is worth this breakage.
>
> Thanks in advance for your input.
> --
> Arnaud Le Hors - IBM, XML Standards Strategy Group / W3C AC Rep.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-j-user-help@xml.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-dev-help@xml.apache.org