- From: Anne van Kesteren <fora@annevankesteren.nl>
- Date: Thu, 19 Jan 2006 17:55:30 +0100
- To: Robin Berjon <robin.berjon@expway.fr>
- Cc: www-svg@w3.org
Quoting Robin Berjon <robin.berjon@expway.fr>: >> the specification states that viewers are allowed to return >> normalized values for getAttributeNS. This conflicts with DOM Level >> 3 Core which states that it just returns the attribute value. > > I think this is the seventh or eighth time that we get this comment, > maybe I should make an autoresponder :) See DOM Level 3 Core: > > """ > The way attribute value normalization is performed by the DOM > implementation depends on how much the implementation knows about the > schema in use. Typically, the value and nodeValue attributes of an > Attr node initially returns the normalized value given by the parser. > It is also the case after Document.normalizeDocument() is called > (assuming the right options have been set). But this may not be the > case after mutation, independently of whether the mutation is > performed by setting the string value directly or by changing the > Attr child nodes. In particular, this is true when character > references are involved, given that they are not represented in the > DOM and they impact attribute value normalization. On the other hand, > if the implementation knows about the schema in use when the > attribute value is changed, and it is of a different type than CDATA, > it may normalize it again at that time. This is especially true of > specialized DOM implementations, such as SVG DOM implementations, > which store attribute values in an internal form different from a > string. > """ > > That's just one quote, gotten by grepping for "normalization", IIRC > there are other parts of the spec that deal with this as well in > other variants. The DOM is a model, it's not a storage mechanism. > > Please let us know shortly if this does not address your concerns, It only talks about modified attribute values (in one way or another). The same is true for the "style" attribute in (X)HTML documents which will after being modified give 'unexpected' results when you do a getAttribute on it. Initially though it represents what is being set. And I have either misread the above quote or implementations are not allowed to return a modified (normalized) attribute value when it is not modified. -- Anne van Kesteren <http://annevankesteren.nl/>
Received on Thursday, 19 January 2006 16:55:31 UTC