Menu

Annotating images with callouts

2016-06-20
2016-06-20
  • Stefan Quandt

    Stefan Quandt - 2016-06-20

    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?

     
    • Thomas Schraitle

      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.

       
  • Patricio Mercado

    Hi, any news to this issue ?

     
    • Thomas Schraitle

      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:

         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:

      1. Make sure you have installed the saxon6-fop package.
      2. Applied the above fix in /usr/share/xml/docbook/stylesheet/suse2013-ns/common/xref.xsl (basically, it's xsl:param -> xsl:with-param).
      3. Create a symlink in /usr/share/java:
        ln -s /usr/share/xml/docbook/stylesheet/nwalsh/current//extensions/saxon65.jar docbook-xsl-saxon.jar
      4. 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
  • Stefan Knorr

    Stefan Knorr - 2017-07-17

    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
  • Patricio Mercado

    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.

     
    • Stefan Knorr

      Stefan Knorr - 2017-07-18

      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. :)

       
  • Patricio Mercado

    Hi, where to publish this issue in github? in daps or opensuse susexls?

     
    • Thomas Schraitle

      Use the suse-xsl isse tracker: https://github.com/openSUSE/suse-xsl

      Thanks!

       

Anonymous
Anonymous

Add attachments
Cancel





Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.