I am building a structured application in FrameMaker 12 for DITA 1.2 xml.
When I insert Dynamic HTML Effects > Drop Down Caption and Drop Down Body on elements in the xml, the dropdowns appear correctly in the help output. But after I close the xml file, reopen it, and create output, the dropdowns do not work.The code does not retain.
Is there a read/write rule I can add to the rules file to retain the dropdowncaption and body?
Because I couldn't find a rule on my own, I attempted the following workaround:
If context is: [platform = "dropdowncaption"]
Use paragraph format: DropDownCaption
Else, if context is: [platform = "dropdownbody"]
Use paragraph format: DropDownBody
Using this workaround on the platform attribute and the paragraph tags works and retains for the p element. The note element also appears in the dropdown, but the formatting is replaced by the paragraph tag formatting making the word NOTE look odd.
The problem is that table, fig, ol, and ul will not work with this method. I would like them to appear within a dropdown, too.
Does anyone have any ideas?
I hope there is a read/write rule that can be used, but I am open to other options.
Unfortunately, this is not how the XML authoring/publishing process is intended to work in FrameMaker Those commands should probably be disabled for XML files.
You'll need to assign attributes to the elements you want formatted, then save the map to a FM book and files. Then set up some process that you run on the generated FM files that applies the necessary formatting, then exports those files to HTML (I'm assuming that's your output format?). In theory you may be able to do this with some ExtendScript .. but it'll be a bit of work.
You may want to check out DITA-FMx. This is a plugin that I developed which provides extended DITA authoring and publishing features in FrameMaker. One feature is the ability to add your own custom processing (ExtendScript, FrameScript, or FDK plugin) into the book build process. This may be able to automate the formatting process you're trying to do .. although I've not messed around with the effects you're using so can't say for sure.
Thanks, Scott and Lynne!
I believe the problem is that you cannot apply the DropDownBody paragraph format using an attribute and context rules to advanced elements and their child elements (fig/image, table/tgroup/entry, ol/ul/li) and have them process in HTML output as a dropdown. Maybe I am missing something...
Does anyone have ideas?
Yeah .. I have a feeling that this can't be done using standard structure app development techniques. You'd need to set some flag (attribute) on the target elements while authoring, then after the book and FM files have been generated from the XML files, run some automated publishing process that applies the "formatting" that you need. Using ExtendScript (or the FDK) it may be possible to programmatically select the target element(s) and run the commands from the menu. I don't know if there's an API for this "drop down" formatting or not (I haven't seen one).
Remember that FM applies format rules to outer elements before it formats inner elements. Thus, if your <note> contains a <p>, and your text format rules specify a paragraph format to use, FM will apply the paragraph format to the <note>, but when it formats the <p>, it will replace the <note>'s format with the one for the <p>. One way to avoid this problem is with a context rule in the definition of <p> that only applies a paragraph format in contexts that do not apply something else. If the desired <p> and <note> formatting are similar, you can also apply individual properties instead of entire paragraph catalog entries.
You may find the StructureTools > Show Element Context command helpful for debugging your EDD--it tells you which format rules have been applied.