logo       

Re: default for using ' in OutputOptions?: msg#00038

java.enhydra.xmlc

Subject: Re: default for using ' in OutputOptions?

At 09:52 AM 6/26/2003 +0200, you wrote:
On Èt, 2003-06-26 at 09:36, Jacob Kjome wrote:
> XMLC-2.2 is close to ready.  I wanted to check on one thing, though.  In
> OutputOptions, the javadoc for getUseAposEntity() said that the default was
> false.  However, the field actually defaulted to true.  I changed it to
> false, but I wonder if the default shouldn't actually be true since it is
> actually a quirk that some browsers might not be able to deal with '
> and XML requires the escaping of single quotes since they can be used to
> surround attributes.

Well, there was the problem with _javascript_ in XHTML. XMLC converted the
quotes of _javascript_ function parameters to ' and browsers didn't
understand that. The solution was to replace ' with some hex code,
wasn't it? I thought you had done that already.

What I had done, actually, is leave the existing work around in place, which is get/setUseAposEntity().  The work around using the numeric character escape sequence which I mentioned on the list wasn't well liked by some of the XMLC committers.  Said methods work for the situation.  I just figured they were unnecessary if we could use the numeric escape, but the methods will work fine as well.

The question is if the hex code in the _javascript_ parameters is
understood by browsers correctly or not.

Actually, the question is whether we should use the quirk of not escaping the single quotes as a default when that violates the XML spec (for the case where you are outputting XML or XHTML).  What I am talking about is making the default for escaping single characters with ' be "true" instead of "false" which I switched it to, but am now having second thoughts.  One can always turn this off by using OutputOptions#setUseAposEntity(false) and you will be golden.  This would make XMLC consistent in how it uses quirks.  No Qurik would be used by default.  Only via a custom OutputOptions would they be used.  The defaults would be entirely non-quirks oriented.

Does that  make more sense?

Jake
<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise