DITA and XMetaL Discussion

XMetaL Community Forum DITA and XMetaL Discussion Using custom image bullets

  • Scibert

    Using custom image bullets

    Participants 8
    Replies 9
    Last Activity 10 years, 3 months ago

    We would like to use custom image bullets for elements rendered in XHTML. Although this can be achieved by modifying the commonltr.css file, that is by setting the list-style-image property of relevant

      tags, how do we let XMetaL 7.0 automatically include bullet images in WebHelp output?

    Reply

    Derek Read

    Reply to: Using custom image bullets

    I'm not sure I understand the question as it seems that you have your solution already.

    I think what I need to know to help you is: “What do you want output to generate that it is not already generating?”

    Reply

    Scibert

    Reply to: Using custom image bullets

    Hi Derek,

    I found that if you place .gif files in the DITA_OT/resource folder, they are automatically included in the WebHelp output. However, .png and .jpg files are not included. So it seems that if you want to use custom image bullets in XMetaL (or the DITA Open Toolkit), you must use the .gif format.

    If we did want to use .png of .jpg files though, is there any way to have them automatically published in WebHelp output?

    Reply

    Derek Read

    Reply to: Using custom image bullets

    I see. That's not specific to WebHelp, that's the DITA OT outputting to the XHTML transtype, which is what WebHelp (and many of the other output types that the DITA OT supports, CHM, Eclipse Help, etc) use as the basis for its content (the HTML pages that are transformed from individual topics).

    The DITA OT seems coded to copy only specific file types from that resource folder (CSS and GIF apparently). I'm not sure where that code lives but I suspect it would likely be in a Java file somewhere. Not sure how easy it will be to track that down.

    Reply

    Derek Read

    Reply to: Using custom image bullets

    Found it. This stuff is actually defined in the following file (thankfully not Java):
    build_preprocess.xml

    The following contains hard coded file names to copy over from the “resource” folder:

         description="Copy flag files">
       
                 includes="delta.gif,deltaend.gif" casesensitive="no"/>
       

       
     

    The quick and dirty solution is to add your file names to the list of “includes”.

    Reply

    Derek Read

    Reply to: Using custom image bullets

    Note that, strictly speaking, that section of the file defines things for DITAVAL flags.

    So, to be “clean” you might wish to add a new section to keep it separate from the standard DITA OT stuff:


       
         
       

          

    But then to have that called you would need to change the following line:

    , copy-list-style-images" />

    Reply

    Scibert

    Reply to: Using custom image bullets

    Thanks, Derek! Your solution works.

    I modified your code snippet to automatically include all files in the DITA_OTresource folder:

    *.*” casesensitive=”no”>

    Do the or elements have attributes to include subfolders as well? This would allow files to be organized in subfolders, which would automatically be included in WebHelp output.

    Reply

    Derek Read

    Reply to: Using custom image bullets

    I don't see anything obvious that would include sub-folders. There's no documentation for stuff at this level included with the DITA OT either, that I know of anyway.

    Might be a good question to ask at a place where there are real DITA OT experts:
    http://tech.groups.yahoo.com/group/dita-users/

    Reply

    Derek Read

    Reply to: Using custom image bullets

    So, since this is ANT we should really be checking here:
    http://ant.apache.org/manual/Types/fileset.html

    I don't see anything mentioning sub-folders though. Seems like something that must be supported somehow. If I wasn't so busy I'd see if I can dig into this further right away. Might take me a while to hunt it down.

    Reply

    Derek Read

    Reply to: Using custom image bullets

    Just found this:
    http://stackoverflow.com/questions/3423555/copy-content-of-subfolders-with-ant

    See the top answer. I haven't tried it but seems reasonable.

    Reply

  • You must be logged in to reply to this topic.

Lost Your Password?

Products
Downloads
Support