JAXP: XSLTC transformer swallows empty namespace declaration which is necessary to undeclare default namespace
christoph.langer at sap.com
Tue Jul 26 11:56:41 UTC 2016
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.
More information about the core-libs-dev