[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Clarification setAttributeNS
Hi Lofton, all, I noticed that the setAttributeNS method is currently underspecified. I would like to propose a clarification. Since you now seem to be in charge of the spec, I'll be sending you proposed wording, ok (while CCing the group of course)? The XML DOM spec says the following for the getAttributeNS method: -"Retrieves an attribute value by local name and namespace URI." and the following for setAttributeNS: -"Adds a new attribute. If an attribute with the same local name and namespace URI is already present on the element, its prefix is changed to be the prefix part of the qualifiedName, and its value is changed to be the value parameter." We're missing the second sentence (If an attribute ...) in the WebCGM DOM. Here's why that wording is needed. A user calls: setAttributeNS("http://goodwines.com/bordeaux","favorite:petrus","1982"); followed with this call: setAttributeNS("http://goodwines.com/bordeaux","hold:petrus","2014"); and this one: getAttributeNS("http://goodwines.com/bordeaux","petrus"); Note: getAttributeNS takes a local name not a qualified name). What is the returned value from the getAttributeNS call, 1982 or 2014? According to our current WebCGM spec, this is underspecified; but it is well defined by the XML DOM spec. We should clarify the WebCGM spec by adding the following wording: "If an attribute with the same local name and namespace URI is already present on the element, its prefix is changed to be the prefix part of the qualifiedName, and its value is changed to be the value parameter." Thoughts, opinions? -- Benoit mailto:benoit@itedo.com
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]