What's wrong with binaryObject?
common/common_figures.xsl contains this:
<xsl:template match="tei:binaryObject">
<xsl:message terminate="yes">ERROR: binaryObject element is not supported</xsl:message>
</xsl:template>
That seems a bit extreme, to say the least; binaryObject is a perfectly good tag. This handler is overridden in the html/html_figures.xsl file by a template which calls showGraphic; that in turn also in theory terminates if there's no @url:
<xsl:message terminate="yes">Cannot work out how to do a graphic, needs a URL</xsl:message>
although this template doesn't seem to get called, and I haven't yet figured out why.
Meanwhile, over in PDF-land, the fo processing creates an <external-graphic> element, which is good, but it borks it like this:
<external-graphic src="url('data:image/auto;{$enc},
...
In other words, the ${enc} parameter is not successfully injected, and a carriage return at the beginning of a test element is converted instead of (as I think it should be) stripped. That blows up the FOP transformer when it gets to that element.
There's an example <binaryObject> tag in Test/test22.xml. In my Test2 folder I've renamed that file inputFiles/testQuotations1.xml (because it's mostly about testing quotations). I'm going to split out the <binaryObject> element and create a separate file with a couple more of them, and then work on implementing proper handling for these. I believe it should be possible to get base64-encoded graphic content to work in HTML and in FO/PDF.
I believe I've fixed the FO processing in commit 09933af.
I've done a bunch more tweaking to get binaryObject graphics to fit on the page in XSL:FO output. Next is HTML.
I have the HTML working in a sequence of commits leading up to ff43c6e.
I think I've finished what I'm competent to do; I'll leave the ticket open for Council to look at in case they want to assign someone to work on docx, odt and so on. I'll unassign it from myself now.
Tokyo F2F subgroup.
Thanks for all this work, @martindholmes !
We need volunteers for other formats or we need to indicate (where?) that binaryObject cannot be handled in certain transformations.
- markdown does not fail, but outputs gibberish. Possible solution: use image tag
 - @peterstadler tested LaTeX, which fails as well. No suggestions for fix
- @peterstadler tested docx, which fails
- @peterstadler tested odt, which fails