logo       

' issue revisited: msg#00029

java.enhydra.xmlc

Subject: ' issue revisited


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 '
The named character reference ' (the apostrophe, U+0027) was introduced in XML 1.0 but does not appear in HTML. Authors should therefore use ' instead of ' to work as expected in HTML 4 user agents.


Using ' 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 ' entity to return '.

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
<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise