DITA and XMetaL Discussion

XMetaL Community Forum DITA and XMetaL Discussion How do you use <prereq> in web help?

  • kwag_myers

    How do you use <prereq> in web help?

    Participants 3
    Replies 4
    Last Activity 11 years, 8 months ago

    XMetaL Help talks about how the pre-requisite links are placed, etc., but I've yet to figure out how this works or found an example of a completed section.

    In my published web help the Pre-requisite section displays as a paragraph with no title, i.e., nothing distinguishing it from any other paragraph. What I'm hoping for is something like:

    Pre-requisites:

    1. Read Concepts. This is good stuff to know.
    2. Do This. Otherwise, it won't work.

    Reply

    Derek Read

    Reply to: How do you use <prereq> in web help?

    WebHelp relies on files included with the standard DITA OT XHTML transtype to transform to XHTML. This transtype does nothing special to identify the element markup-wise in the XHTML; it inserts a

    with a class attribute value of “p”. If you want something else to appear in the output you will need to modify the XSLT.

    The file that handles this part of the transformation is here:
    ....DITA_OTxslxslhtmltaskdisplay.xsl

    Around line 65 there's a section that begins like so:

     
       
     

     
       
         
       

     


     ...etc...

    The second to last line above is probably where you will want to start mucking around.

    The simplest thing to do would be to change the value for the class to be unique so you can more easily address it in your CSS. You might also stick in a heading, perhaps like so:


     
       
     

     
       
         
       

     

    Prerequisites:


     ...etc...

    Then in your CSS you can address that section and each portion it contains with specific styling if you want:

    div.prereq {border:1px solid red}
    div.prereq h2 {font-family: "Comic Sans"; font-size: 1.2em; color: red}

    This change is not changing the Webhelp output directly, it is changing files in the XHTML transtype that are used by other parts of the DITA OT. This means it will affect WebHelp, but also CHM, Multiple HTML, Single HTML, Eclipse Help, Java Help, etc. I assume this is what you would want because then all your various HTML-like outputs will be similar.

    Reply

    kwag_myers

    Reply to: How do you use <prereq> in web help?

    That works, thanks!

    However, I'm still a bit perplexed by this statement in Help:

    “Prerequisite links will be placed in a list after the related-links section; on output the links from the related-links section are added to the section.”

    I get the impression that, when is used, an element in, or after is made available in order to make a list. But I've played around with elements and see nothing to indicate a “prerequisite link” or anything other than the usual elements.

    Reply

    Derek Read

    Reply to: How do you use <prereq> in web help?

    This quote comes from the DITA Language Specification 1.1, which we include verbatim as part of our documentation so that you can access it easily for reference when working on DITA documents in XMetaL.

    See: http://docs.oasis-open.org/dita/v1.1/OS/langspec/langref/prereq.html

    This documentation (maintained by the DITA TC at OASIS) contains guidance on proper or suggested usage for elements. In some cases it also makes statements about how particular elements and attributes should affect output, but it was not written to describe the proper functioning of the DITA Open Toolkit (ie: it is an input into how the DITA OT is created, not written to describe what the DITA OT actually does).

    The DITA OT is developed separately from this documentation as an open source project (hosted currently at SourceForge). I think that is where the disconnect is in this particular case. In most cases the DITA OT has implemented features following these recommendations but in some cases it may not have (either the implementation is incomplete or might be buggy). There are other solutions for generating output from DITA content and they will probably follow this documentation to a similar degree but implement things in different ways as well (see: [url=http://www.xmlmind.com/ditac/]ditac[/url]).

    If you feel that the output is not correct (for any element or a particular set of documents) you can check on the status of existing feature requests and bugs (and file new ones) here: http://sourceforge.net/tracker/?group_id=132728

    Reply

    kwag_myers

    Reply to: How do you use <prereq> in web help?

    If you feel that the output is not correct…

    Actually, it's more curiosity than necessity. I'll just use the

      . Thanks for the info.

      edit: Which .xsl do I edit for my PDF output?

    Reply

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

Lost Your Password?

Products
Downloads
Support