Hi Daniel, you mean with my webrev built in or with the current jdk9 dev?
Best Christoph > -----Original Message----- > From: Daniel Fuchs [mailto:daniel.fu...@oracle.com] > Sent: Dienstag, 26. Juli 2016 15:47 > To: Langer, Christoph <christoph.lan...@sap.com>; huizhe wang > <huizhe.w...@oracle.com> > Cc: core-libs-dev@openjdk.java.net > Subject: Re: JAXP: XSLTC transformer swallows empty namespace declaration > which is necessary to undeclare default namespace > > Hi Christoph, Joe, > > Actually what I see with the latest dev version of > JDK 9 (eng. build built a few minutes ago) is this: > > <?xml version="1.0" encoding="UTF-8"?><root xmlns="ns1" > xmlns="ns1"><test></test></root> > > Notice that xmlns="ns1" appears twice in the root element. > > So maybe there's more than one bug here :-( > > cheers, > > -- daniel > > On 26/07/16 12:56, Langer, Christoph wrote: > > Hi Joe, > > > > thanks for looking at this. > > > > Here is my comments: > >> I'm not sure why empty namespace was explicitly excluded. But for the > >> 2nd part, the developer was clear with a note on the intention. You may > >> want to try removing the condition statement that excluded the empty > >> namespace, but keep the 2nd part as is, and then run the tests to see if > >> there's any issue or a reason why it was excluded. > > > > You are right, the comment for the second part is quite explicit. However, > > the > method declaresDefaultNS() of XslElement always returns false and the > comment to it says: "This method is now deprecated. The new implemation of > this class never declares the default NS". As I didn't find any other class > in the > hierarchy overwriting this method, I decided to remove it and to cleanup code. > Are you ok with that or is it illegal here? > > > > > >> On another thought, if the following workaround works for you, we may as > >> well leave the current implementation as is: > >> try replacing <test xmlns=""/> in the above, with <xsl:element > >> name=\"test\" namespace=\"\" />" > > > > This might work, however, the customer wants to change his current XML > toolkit to the JDK one and expects his existing XML/XSL code to work as is. So > that's no option. > > > > I'll go open a bug for that now and prepare a real review. > > > > Best regards > > Christoph > >