Hi,
I want to annotate an image by using a <calloutlist> referencing elements of an <areaspec> child in a <mediaobjectco> element as described in the example on http://www.docbook.org/tdg/en/html/mediaobjectco.html.
Is the <mediaobjectco> fully supported (both HTML and PDF output) by daps and its tool-chain?
Are there any examples or (DocBook5) XML test documents for this?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
the areaspec element is a nasty one: to process it correctly, you need DocBook extensions which are available for Saxon only. The xsltproc processor doesn't support it.
At the moment, I don't see how this can work.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
We always use xsltproc as an XSLT processor. Although daps can use Saxon6, it isn't really well tested. As Saxon6 is quite picky about some things expect problems.
I've tried it in our doc-sleha project to see how far I will come. However, I got the following error message:
Profiling /local/repos/GH/SUSE/doc-sleha/xml/art_sle_ha_install_quick.xml Validating...
/local/repos/GH/SUSE/doc-sleha/build/.profiled/x86_amd64_em64t_sles/art_sle_ha_install_quick.xml:38:20: fatal: xpointer attribute must be present when href attribute is absent.
/usr/share/daps/make/validate.mk:35: recipe for target '/local/repos/GH/SUSE/doc-sleha/build/.profiled/x86_amd64_em64t_sles/.validate' failed
It seems, the xi:include elements are incorrectly profiled. They turn up as empty <xi:include/> and are useless. I haven't found the reason so I've circumvented this for the moment and it seems, I found a typo/bug in our stylesheets (already fixed, see https://github.com/openSUSE/suse-xsl/commit/f4ae4a3f6d19b). As I said before, Saxon is more picky than xsltproc...
I did the following:
Make sure you have installed the saxon6-fop package.
Applied the above fix in /usr/share/xml/docbook/stylesheet/suse2013-ns/common/xref.xsl (basically, it's xsl:param -> xsl:with-param).
Create a symlink in /usr/share/java:
ln -s /usr/share/xml/docbook/stylesheet/nwalsh/current//extensions/saxon65.jar docbook-xsl-saxon.jar
Run VERBOSE=1 saxon6 -h and check the output. In the line starting with classpath used: ... you should see /usr/share/java/docbook-xsl-saxon.jar.
Now the system is prepared. Make sure, your files does not contain any xi:include elements for the time being. If that is fullfilled, I used:
daps --xsltprocessor=saxon -vv -d DC-SLE-HA-install-quick pdf
when I did all the above I could at least built the PDF. However, I'm not sure if it the areaspec really works... in theory it should as the JAR file is correctly integrated in the saxon6 script.
As you can see, it's complicated. It shouldn't be, but it's a combination of different issues. So sorry if this makes you troubles.
Last edit: Thomas Schraitle 2017-07-16
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
I want to annotate an image by using a <calloutlist> referencing elements of an <areaspec> child in a <mediaobjectco> element as described in the example on http://www.docbook.org/tdg/en/html/mediaobjectco.html.
Is the <mediaobjectco> fully supported (both HTML and PDF output) by daps and its tool-chain?
Are there any examples or (DocBook5) XML test documents for this?
Hi Stefan,
the
areaspec
element is a nasty one: to process it correctly, you need DocBook extensions which are available for Saxon only. The xsltproc processor doesn't support it.At the moment, I don't see how this can work.
Hi, any news to this issue ?
Not really. It's difficult...
We always use
xsltproc
as an XSLT processor. Although daps can use Saxon6, it isn't really well tested. As Saxon6 is quite picky about some things expect problems.I've tried it in our doc-sleha project to see how far I will come. However, I got the following error message:
It seems, the
xi:include
elements are incorrectly profiled. They turn up as empty<xi:include/>
and are useless. I haven't found the reason so I've circumvented this for the moment and it seems, I found a typo/bug in our stylesheets (already fixed, see https://github.com/openSUSE/suse-xsl/commit/f4ae4a3f6d19b). As I said before, Saxon is more picky than xsltproc...I did the following:
saxon6-fop
package./usr/share/xml/docbook/stylesheet/suse2013-ns/common/xref.xsl
(basically, it'sxsl:param
->xsl:with-param
)./usr/share/java
:ln -s /usr/share/xml/docbook/stylesheet/nwalsh/current//extensions/saxon65.jar docbook-xsl-saxon.jar
VERBOSE=1 saxon6 -h
and check the output. In the line starting withclasspath used: ...
you should see/usr/share/java/docbook-xsl-saxon.jar
.Now the system is prepared. Make sure, your files does not contain any
xi:include
elements for the time being. If that is fullfilled, I used:when I did all the above I could at least built the PDF. However, I'm not sure if it the
areaspec
really works... in theory it should as the JAR file is correctly integrated in thesaxon6
script.As you can see, it's complicated. It shouldn't be, but it's a combination of different issues. So sorry if this makes you troubles.
Last edit: Thomas Schraitle 2017-07-16
Did you open an issue for this at https://github.com/openSUSE/suse-xsl ?
I think this could reasonably be done without support from the formatter at least for HTML.
Last edit: Stefan Knorr 2017-07-17
Uhm, understand... thanks, currently is not a must for me now, but hope some day that feature work, Is a thing that I found great to use.
I can't promise that we will get to implementing every feature request on GitHub.
But, I can pretty much promise that if there is no one who opens an issue for it, it will be forgotten at some point. :)
Hi, where to publish this issue in github? in daps or opensuse susexls?
Use the suse-xsl isse tracker: https://github.com/openSUSE/suse-xsl
Thanks!