On Jan 14, 2008, at 14:23, Max Berger wrote:

Hi Max,

I've just recently encountered a possible "bug" in the jeuclid plugin
for fop.

Just checking (would make tracking it a bit easier):
Do you have any idea if this ever worked, and if yes, when this stopped working? (or: Do you remember having used the MathML extension and not running into the issue?)

Would be nice to know, but no matter if you don't have the answer.

More inline below...

A complete .fo file is added at the end of the mail.

In this file there is a foreign math object:
        <fo:instream-foreign-object>
          <mml:math>
            <mml:mstyle mathsize="6pt">
              <mml:mi>x</mml:mi>
            </mml:mstyle>
          </mml:math>
        </fo:instream-foreign-object>,

which, as you can see, uses the "mathsize" attribute. HOWEVER, the
attribute gets ignored, because it is in the default namespace, and only
the attributes in the mml namespace are actually processed by the
plugin. So the above needed to be fixed to:

            <mml:mstyle mml:mathsize="6pt">
              <mml:mi>x</mml:mi>
            </mml:mstyle>

to work properly.

So here are my questions:

- Is this indeed the expected behavior? It seems unintuitive.

For FO, we assume all attributes in the default namespace to be XSL- FO properties, so I think this is unexpected... :/

- If it is, should it be? Should the plugin not also process attributes
from the default namespace?

I would definitely say so.

- If it is not, where do i need to start looking for the bug? Jeuclid
completely ignores namespaces in attributes, so it is either in the
fop/plugin interface, fop itself, or the xerces parser?

I can't quite put my finger on it yet, but if I were to start looking, I'd try placing a breakpoint in the private org.apache.fop.fo.XMLObj#setAttributes(). See what happens there. Judging from the code, the attributes without a prefix are added to the node via the generic org.w3c.dom.Element#setAttribute().

Maybe problems with the (writable) DOM implementation? Or does the MathML extension not use the 'XMLObj.element' member, or ....?


HTH!

Andreas

Reply via email to