RFR (JAXP): 8148350: Element.setAttributeNS() empty namespace does not throw exception
Hi, Please, help to review the fix for org.w3c.dom.Element#setAttributeNS method in JDK9: According to w3.org documentation empty string cannot be used as a namespace name [1]. Therefore the setAttributeNS [2] should raise DOMException (NAMESPACE_ERR) when namespaceURI is empty string (similar to null value). Webrev with proposed fix (regtest is included): http://cr.openjdk.java.net/~aefimov/8148350/9/00/ Best Regards, Aleksej [1] https://www.w3.org/TR/xml-names/#iri-use [2] https://docs.oracle.com/javase/8/docs/api/org/w3c/dom/Element.html#setAttrib...
Hi Aleksej, The change looks good. Ideally though, it would be good to update the relevant Javadoc to reflect the change since this part of Javadoc is quite explicit about when NAMESPACE_ERR is thrown. Also, this is a good opportunity to update the Lic header. Thanks, Joe On 7/12/2016 11:04 AM, Aleks Efimov wrote:
Hi, Please, help to review the fix for org.w3c.dom.Element#setAttributeNS method in JDK9: According to w3.org documentation empty string cannot be used as a namespace name [1]. Therefore the setAttributeNS [2] should raise DOMException (NAMESPACE_ERR) when namespaceURI is empty string (similar to null value). Webrev with proposed fix (regtest is included): http://cr.openjdk.java.net/~aefimov/8148350/9/00/
Best Regards, Aleksej
[1] https://www.w3.org/TR/xml-names/#iri-use [2] https://docs.oracle.com/javase/8/docs/api/org/w3c/dom/Element.html#setAttrib...
Looks OK also. Joe given this is a change in functionality, it might need a CCC fast tracked before it is pushed?
On Jul 12, 2016, at 4:03 PM, huizhe wang <huizhe.wang@oracle.com> wrote:
Hi Aleksej,
The change looks good. Ideally though, it would be good to update the relevant Javadoc to reflect the change since this part of Javadoc is quite explicit about when NAMESPACE_ERR is thrown.
Also, this is a good opportunity to update the Lic header.
Thanks, Joe
On 7/12/2016 11:04 AM, Aleks Efimov wrote:
Hi, Please, help to review the fix for org.w3c.dom.Element#setAttributeNS method in JDK9: According to w3.org documentation empty string cannot be used as a namespace name [1]. Therefore the setAttributeNS [2] should raise DOMException (NAMESPACE_ERR) when namespaceURI is empty string (similar to null value). Webrev with proposed fix (regtest is included): http://cr.openjdk.java.net/~aefimov/8148350/9/00/
Best Regards, Aleksej
[1] https://www.w3.org/TR/xml-names/#iri-use [2] https://docs.oracle.com/javase/8/docs/api/org/w3c/dom/Element.html#setAttrib...
<http://oracle.com/us/design/oracle-email-sig-198324.gif> <http://oracle.com/us/design/oracle-email-sig-198324.gif> <http://oracle.com/us/design/oracle-email-sig-198324.gif> <http://oracle.com/us/design/oracle-email-sig-198324.gif>Lance Andersen| Principal Member of Technical Staff | +1.781.442.2037 Oracle Java Engineering 1 Network Drive Burlington, MA 01803 Lance.Andersen@oracle.com <mailto:Lance.Andersen@oracle.com>
On 7/12/2016 1:35 PM, Lance Andersen wrote:
Looks OK also. Joe given this is a change in functionality, it might need a CCC fast tracked before it is pushed?
Agree. A quick CCC to clarify the spec would be good. -Joe
On Jul 12, 2016, at 4:03 PM, huizhe wang <huizhe.wang@oracle.com <mailto:huizhe.wang@oracle.com>> wrote:
Hi Aleksej,
The change looks good. Ideally though, it would be good to update the relevant Javadoc to reflect the change since this part of Javadoc is quite explicit about when NAMESPACE_ERR is thrown.
Also, this is a good opportunity to update the Lic header.
Thanks, Joe
On 7/12/2016 11:04 AM, Aleks Efimov wrote:
Hi, Please, help to review the fix for org.w3c.dom.Element#setAttributeNS method in JDK9: According to w3.org <http://w3.org> documentation empty string cannot be used as a namespace name [1]. Therefore the setAttributeNS [2] should raise DOMException (NAMESPACE_ERR) when namespaceURI is empty string (similar to null value). Webrev with proposed fix (regtest is included): http://cr.openjdk.java.net/~aefimov/8148350/9/00/ <http://cr.openjdk.java.net/%7Eaefimov/8148350/9/00/>
Best Regards, Aleksej
[1] https://www.w3.org/TR/xml-names/#iri-use [2] https://docs.oracle.com/javase/8/docs/api/org/w3c/dom/Element.html#setAttrib...
<http://oracle.com/us/design/oracle-email-sig-198324.gif> <http://oracle.com/us/design/oracle-email-sig-198324.gif><http://oracle.com/us/design/oracle-email-sig-198324.gif> <http://oracle.com/us/design/oracle-email-sig-198324.gif>Lance Andersen| Principal Member of Technical Staff | +1.781.442.2037 Oracle Java Engineering 1 Network Drive Burlington, MA 01803 Lance.Andersen@oracle.com <mailto:Lance.Andersen@oracle.com>
Hi Lance, Joe, Thanks for your reviews and comments. I will work on CCC and javadoc/Lic header modifications. Will return back to you when it is done. Best Regards, Aleksej On 12/07/16 23:53, huizhe wang wrote:
On 7/12/2016 1:35 PM, Lance Andersen wrote:
Looks OK also. Joe given this is a change in functionality, it might need a CCC fast tracked before it is pushed?
Agree. A quick CCC to clarify the spec would be good.
-Joe
On Jul 12, 2016, at 4:03 PM, huizhe wang <huizhe.wang@oracle.com> wrote:
Hi Aleksej,
The change looks good. Ideally though, it would be good to update the relevant Javadoc to reflect the change since this part of Javadoc is quite explicit about when NAMESPACE_ERR is thrown.
Also, this is a good opportunity to update the Lic header.
Thanks, Joe
On 7/12/2016 11:04 AM, Aleks Efimov wrote:
Hi, Please, help to review the fix for org.w3c.dom.Element#setAttributeNS method in JDK9: According to w3.org <http://w3.org> documentation empty string cannot be used as a namespace name [1]. Therefore the setAttributeNS [2] should raise DOMException (NAMESPACE_ERR) when namespaceURI is empty string (similar to null value). Webrev with proposed fix (regtest is included): http://cr.openjdk.java.net/~aefimov/8148350/9/00/ <http://cr.openjdk.java.net/%7Eaefimov/8148350/9/00/>
Best Regards, Aleksej
[1] https://www.w3.org/TR/xml-names/#iri-use [2] https://docs.oracle.com/javase/8/docs/api/org/w3c/dom/Element.html#setAttrib...
<http://oracle.com/us/design/oracle-email-sig-198324.gif> <http://oracle.com/us/design/oracle-email-sig-198324.gif><http://oracle.com/us/design/oracle-email-sig-198324.gif> <http://oracle.com/us/design/oracle-email-sig-198324.gif>Lance Andersen| Principal Member of Technical Staff | +1.781.442.2037 Oracle Java Engineering 1 Network Drive Burlington, MA 01803 Lance.Andersen@oracle.com <mailto:Lance.Andersen@oracle.com>
participants (3)
-
Aleks Efimov
-
huizhe wang
-
Lance Andersen