transforming dom with a CDATA section set to null 2003-01-29 - By Tim Cronin
>To resolve this: Determine whether the DOM officially considers null a >legitimate value when set, and if so what it returns when retrieved. If >the answer to the first is yes and the answer to the second is null, Xalan >will have to tolerate the null. If the answer to the first is yes and the >answer to the second is empty-string, Xerces has a problem. If the answer >to the first is null, your application code has a problem.
Thanks for the info I'll test it and let you know what I find.
-----Original Message----- From: Joseph Kesselman [mailto:keshlam@(protected)] Sent: Wednesday, January 29, 2003 2:47 PM To: Tim Cronin Cc: xalan-j-users@(protected) Subject: Re: transforming dom with a CDATA section set to null
I'm afraid this is a clear case of "If it hurts when you do that, and you know you shouldn't do that, stop doing that."
Passing nulls into the DOM API where they aren't expected may trigger error responses at the time you set those values or at the time you read them or both. This was deliberately left for DOM implementations to decide since it's a performance-versus-robustness issue. Obviously, if the DOM decided not to spend time protecting itself and instead fails when accessed, a bad DOM may disrupt the transformation.
We might be able to configure Xalan to check for this. But again, that means spending cycles testing for something that you shouldn't have created in the first place.
To resolve this: Determine whether the DOM officially considers null a legitimate value when set, and if so what it returns when retrieved. If the answer to the first is yes and the answer to the second is null, Xalan will have to tolerate the null. If the answer to the first is yes and the answer to the second is empty-string, Xerces has a problem. If the answer to the first is null, your application code has a problem.
______________________________________ Joe Kesselman / IBM Research
|
|