Please send all your questions related to DocBook to the relevant
DocBook mailing lists and not to the XMLmind XML Editor mailing lists.
XMLmind Software is not involved in any way in the specification of
DocBook. Therefore our answers cannot be authoritative.
On 10/11/21 15:59, Albert wrote:
In docbook we can incorporate image date like:
<informalfigure>
<mediaobject>
<imageobject>
<imagedata width="50%" align="center" valign="middle"
scalefit="0" fileref="../../d6/d99/qcstring_8cpp__incl.png"></imagedata>
</imageobject>
</mediaobject>
</informalfigure>
In other words we have to specify the filename.
I looked in the specification and documentation but I could not find a
solution to incorporate the image as a data "blob".
* Is this possible?
* or would this require an extension to the docbook specifications (in
the later case I can file an issue for it).
The background is that now the docbook file and the separate images have
to be distributed and otherwise just the docbook file can be distributed.
XMLmind XML Editor supports "data:" URLs
(https://en.wikipedia.org/wiki/Data_URI_scheme). See attached sample file.
This may solve your problem but we have no idea whether this is legit
DocBook. Even if this is legit DocBook, this may cause interchange problems.<?xml version="1.0" encoding="UTF-8"?>
<section version="5.1" xmlns="http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:xila="http://www.w3.org/2001/XInclude/local-attributes"
xmlns:xi="http://www.w3.org/2001/XInclude"
xmlns:trans="http://docbook.org/ns/transclusion"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns:m="http://www.w3.org/1998/Math/MathML"
xmlns:html="http://www.w3.org/1999/xhtml"
xmlns:db="http://docbook.org/ns/docbook">
<title>Test</title>
<figure>
<title>Attribute <tag class="element">imagedata</tag>/@<tag
class="attribute">fileref</tag> contains a <literal>data:</literal>
URL</title>
<mediaobject>
<imageobject>
<imagedata fileref="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPHN2ZyB3aWR0aD0iMTIiIGhlaWdodD0iMTIiIHZpZXdCb3g9IjAgMCAxNzkyIDE3OTIiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzBBODRGRiI+PHBhdGggZD0iTTE3MjggNjQ3cTAgMjItMjYgNDhsLTM2MyAzNTQgODYgNTAwcTEgNyAxIDIwIDAgMjEtMTAuNSAzNS41dC0zMC41IDE0LjVxLTE5IDAtNDAtMTJsLTQ0OS0yMzYtNDQ5IDIzNnEtMjIgMTItNDAgMTItMjEgMC0zMS41LTE0LjV0LTEwLjUtMzUuNXEwLTYgMi0yMGw4Ni01MDAtMzY0LTM1NHEtMjUtMjctMjUtNDggMC0zNyA1Ni00Nmw1MDItNzMgMjI1LTQ1NXExOS00MSA0OS00MXQ0OSA0MWwyMjUgNDU1IDUwMiA3M3E1NiA5IDU2IDQ2eiIvPjwvZz48L3N2Zz4K"/>
</imageobject>
</mediaobject>
</figure>
</section>
--
XMLmind XML Editor Support List
xmleditor-support@xmlmind.com
http://www.xmlmind.com/mailman/listinfo/xmleditor-support