[xep-support] Operating on all of the pcdata of an XML file: Considered harmful?

David Tolpin dvd at davidashen.net
Thu Mar 31 22:51:24 PST 2005


Hi Lou,

> The person who is responsible for implementing and maintaining our
> XSL tool chain is, however, resistant to such an approach, claiming 
> that
> he has "philosophical objections" to performing an operation on all of 
> the
> pcdata of an XML file. Other than lacking elegance, I don't really
> understand the foundation of his objection to this sort of solution

XEP hyphenates ALL WORDS and splits them into syllables. The difference 
between doing
this before formatting (as it is done now) and delaying it till the 
formatting stage and
recalculating things on the fly is less than one percent of the 
formatting time, and that
one percent is not always in favor of the more sophisticated solution 
(which I chose not to
use).

Pre-processing documents and inserting zero width spaces into long 
words at right
places IS the ELEGANT solution. It is, by the way, what DocBook XSL 
stylesheets
do to URLs.

> Ideally, I think RenderX should provide a configuration option that 
> would
> allow text to break rather than squeeze, with the caveat that such 
> breaks
> may often not be very pretty. Lacking that, I am gunning for a simple
> pre-processing step that will do the same.

RenderX cannot provide such an option because RenderX does not specify 
XSL FO,
but implements it. XEP does not 'squeeze' long words because they are 
too long; it
follows the specification to adjust letter-spacing to fit a word within 
the page measure.
If you specify fixed letter-spacing, it will not squeeze, but overflow.

It will also break on ZWSP; but there is no such thing as 'break if too 
long' in XSL FO.
The main advantage of XSL FO is that is an open standard. It makes your 
and our life
easier: RenderX knows that to win competition, it must simply have a 
really good XSL formatter,
and you know that if RenderX screws up, you can switch.

David Tolpin
RenderX

-------------------
(*) To unsubscribe, send a message with words 'unsubscribe xep-support'
in the body of the message to majordomo at renderx.com from the address
you are subscribed from.
(*) By using the Service, you expressly agree to these Terms of Service http://www.renderx.com/tos.html



More information about the Xep-support mailing list