DITA and XMetaL Discussion

XMetaL Community Forum DITA and XMetaL Discussion Possible to use conditions for different chapters of same book?

  • 1023

    Possible to use conditions for different chapters of same book?

    Participants 3
    Replies 4
    Last Activity 12 years, 9 months ago

    I'm creating a bookmap in DITA. Several of the chapters reuse much of the same content, but each chapter is specific to a different product, so only one or two words change.

    For example, a paragraph in chapter 1 may say, “The X card is based on the following items.” Chapter 2 has the same sentence, but lists a different product name, “The Y card is based on the following items.”

    I've used conrefs for as much of the text as possible, but I'm wondering if there's a way to add conditions for the few words that differ. I'm only familiar with conditions being used for multiple book outputs, and am not sure if there's a way to specify text to output with certain chapters of the same book output.

    Reply

    gcrews

    Reply to: Possible to use conditions for different chapters of same book?

    Sounds like the same issue I had about a month ago when I needed to conditionally process different things in same deliverable. I asked on the dita-users forum and got a bunch of good feedback.
    http://tech.groups.yahoo.com/group/dita-users/message/18259

    What I ended up doing was to create a build run that first compiles a map though a new target I created that filters the content with a datival. The filtered xml files get placed in a folder where I can then run my final compile on and it will pull in the conditionally processed files into the final. It’s a bit of a kluge but it works for us for the current time being. It seems like dita 1.2 may have some ways to get this done.

    Here is the target I made that just filters the files and copies any referenced images:


     
     

    Reply

    1023

    Reply to: Possible to use conditions for different chapters of same book?

    Thanks for the suggestion! I'll give it a try.

    Reply

    Derek Read

    Reply to: Possible to use conditions for different chapters of same book?

    I think very likely the ultimate solution to this (assuming I understand what is described here) is the DITA 1.2 “keyref” attribute and associated functionality. A few things need to fall into place before that can be done though, with the DITA OT being the main one obviously.

    If you want to work on the bleeding edge (and perhaps ideally you also have a second computer or virtual machine you can muck around with) you might check this out: http://forums.xmetal.com/index.php/topic,747.0.html

    I'm not sure what the support in the DITA OT that comes with that is like for “keyref”, but as far as editing is concerned you get the 1.2 version of the DTDs. This “configuration kit” doesn't add any special UI helpers for inserting the new 1.2 stuff, so you will be working in the Element List and Attribute Inspector when it comes to that.

    Reply

    Su-Laine Yeo

    Reply to: Possible to use conditions for different chapters of same book?

    I don't think the DITA 1.2 keyref feature, or any other feature of DITA 1.2, would be of use for this particular scenario. The draft DITA 1.2 spec says, “A root map and its directly addressed, local scope descendant maps establish a unique key space within which each unique key name has exactly one binding to a set of resources.” In other words, you can't define a key in different ways for different chapters within a bookmap.

    I did some testing with DITA Open Toolkit 1.5 and its behaviour was consistent with what the spec says. The ideas that gcrews suggests are your best bet.

    Cheers,
    Su-Laine

    Reply

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

Lost Your Password?

Products
Downloads
Support