' issue revisited

Jacob Kjome <[email protected]>
Newsgroups gmane.comp.java.enhydra.xmlc
Message-ID <[email protected]>
Why have the hackish methods getUseAposEntity()/setUseAposEntity(boolean) 
in OutputOptions when we could just use the numeric entity for escaping 
apostrophies?

See:
http://www.w3.org/TR/xhtml1/#guidelines

specifically...

C.16. The Named Character Reference &apos;
The named character reference &apos; (the apostrophe, U+0027) was 
introduced in XML 1.0 but does not appear in HTML. Authors should therefore 
use &#39; instead of &apos; to work as expected in HTML 4 user agents.


Using &#39; would allow us to remove the methods from OutputOptions and get 
rid of the if statement in BaseDOMFormatter where it checks for 
getUseAposEntity().  Once we do this, we'd just change any place that 
returns the &apos; entity to return &#39;.

How does that sound?  Am I missing anything?  Would this mean having to 
change something that we didn't want to change?


BTW, the javadoc for getUseAposEntity was misleading.  It said the default 
is "false" when it is actually "true".  I committed a fix to make the 
default match what the javadoc claims.

Jake
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.