#397 Highlighting revisions in chunked output

output: HTML
open-fixed
nobody
XSL (399)
5
2008-10-07
2007-10-25
No

In case of single HTML document there is available changebars.xsl template, but for chunked output I don't know better way than to use its code as customization layer over htmlhelp.xsl in my case. As this code is not suited for this purpose, highlighting fails in some circumstances. For example, if several sections have set revision flag, only the first in chapter is highlighted (chunk.first.sections=0), in rest (chunked to the individual files) there is missing wrapping div element.

Discussion

  • Mauritz Jeanson

    Mauritz Jeanson - 2008-09-15

    I can't reproduce the problem using a customization of changebars.xsl that imports chunk.xsl. But I may be missing something.

    Please provide a test document that demonstrates the problem.
    What version of DocBook-XSL do you use?

     
  • Mauritz Jeanson

    Mauritz Jeanson - 2008-09-19

    I did not receive any mail when I added my previous comment; trying again.

     
  • Jan Tosovsky

    Jan Tosovsky - 2008-09-19
     
  • Jan Tosovsky

    Jan Tosovsky - 2008-09-19

    I've tried your solution but it fails on my test document (test.xml). In my case the section 2.2 isn't colored as it should be (it should inherit properties of its parent). I've found work around which works for me, but I am not sure if this is the best way. I've realized some changes in templates must be done before chunking. With regard to description in chunk.xsl file I am importing customization layer first. It is slightly modified file changebars.xsl, renamed to mydocbook.xsl. Almost the same code is later used again in customization of 'process-chunk-element' template, which is placed directly in chunk.xsl file. All these files can be found in the attachment.
    File Added: test.zip

     
  • Mauritz Jeanson

    Mauritz Jeanson - 2008-09-19

    Please state what version of DocBook-XSL that you use.

     
  • Jan Tosovsky

    Jan Tosovsky - 2008-09-19

    Oops, I forgot, now it is 1.73.2. I don't think there were any significant changes in templates used in my customization layer (changebars/chunk). If chunked output ("using a customization of changebars.xsl that imports chunk.xsl") of test.xml would be Ok on different machine, it would be quite clear that my settings is wrong and my workaround was wasting of the time...

     
  • Mauritz Jeanson

    Mauritz Jeanson - 2008-09-20

    My logic was muddled. Instead of having a customization of changebars.xsl that imports chunk.xsl, one should use a customization of chunk.xsl that imports changebars.xsl.

    But this does not quite work, as you point out: if a chapter has a @revisionflag setting, the highlighting is not inherited by the chunked children of that chapter. However, your modification of the 'process-chunk-element' template fixes that problem. A general solution could perhaps be to add a new standard stylesheet module (called chunk-changebars.xsl, for example) that includes this modification.

     
  • Mauritz Jeanson

    Mauritz Jeanson - 2008-09-30

    A new stylesheet, chunk-changebars.xsl, has been committed to the codebase.

     
  • Mauritz Jeanson

    Mauritz Jeanson - 2008-09-30
    • status: open --> pending-fixed
     
  • Jan Tosovsky

    Jan Tosovsky - 2008-10-07

    Illustrative images of mentioned issues

     
  • Jan Tosovsky

    Jan Tosovsky - 2008-10-07
    • status: pending-fixed --> open-fixed
     
  • Jan Tosovsky

    Jan Tosovsky - 2008-10-07

    Thanks for your effort. I have following suggestions:
    - it would be nice to have single chunk.xsl file with code depending on setting of show.revisionflag parameter. I think this is the only parameter which influences that. Current solution has shortcoming as for CHM output the htmlhelp.xsl file must be customized too (chunk->chunk-changebars).
    - remove show.revisionflag parameter from changebars.xsl file (to enable above mentioned and manage highlighting of changes externaly)
    - add varlistentry[not(@revisionflag)] and glossentry[not(@revisionflag)] templates which will wrap content of these elements with div element. Reason and remedy is available in test.zip file. In images.zip file can be found differences in CHM file if these div elements are missing.
    - css styles for all div.xxxx elements in changebars.xsl file should be enhanced by adding border specification, for example: div.changed { background-color: #99ff99; border: 1px solid #99ff99}. Image in images.zip shows the result in CHM file if the border is not set this way.
    File Added: images.zip

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks