Date: prev next · Thread: first prev next last
2011 Archives by date, by thread · List index


Hi, Peter,

+    /*
+     * FLABridge provides some obscure attribute mangling to wordml2000 import/export filters.
+     * In the long run, you might want to replace this with an XSLT extension function.
+     */
+    class FLABridge : public WeakImplHelper1< DocumentHandlerAdapter >
+    {

FLA is a way to avoid doing heavy arithmetic computations of attribute
values directly in XSLT; instead, the arithmetic expression is emitted
to output as FLA expression and suffix '.value' is added to the name of
the attribute, so it can be recognised and evaluated by the FLABridge
(where the suffix is removed again). It is mainly used in
filter/source/xslt/import/wordml/wordml2ooo_props.xsl, but at a few
other places too.

So much for theory. In practice, the syntax of FLA is so horrible that
XLST is the essence of clarity in comparison .-) E.g., look at the
following snippet from
filter/source/xslt/import/wordml/wordml2ooo_props.xsl and description of
the FLA syntax in filter/source/xsltfilter/fla.cxx and tell what the
expression in 'select' does .-)

<xsl:attribute name="fo:margin-top.value">
   <xsl:value-of
   select="concat('(.(twips2cm(?[',name(w:hdr),'](?(>=($0[',w:pgMa
   r/@w:top,'])($1(|[',w:pgMar/@w:header,'][720])))($1)($0))[',w:pgMar/@w:top,']))
   [cm])')"/>
</xsl:attribute>

IMHO all these FLA computations should be rewritten to XSLT and the
FLABridge abolished. Maybe you'd want to attempt that? :-)

D.

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.