How to Flag DITA Content in WebHelp OutputEdit online
Flagging content in WebHelp output involves defining a set of images that will be used for marking content across your information set.
To flag DITA content, you need to create a filter file that defines properties that will be applied on elements to be flagged. Generally, flagging is supported for block elements (such as paragraphs), but not for phrase-level elements within a paragraph. This ensures that the images that will flag the content are easily scanned by the reader, instead of being buried in the text.
Using Oxygen XML Editor/Author
- Create a DITA filter file (DITAVAL) and add it in a directory of your choice (for example, named myFile.ditaval.
- Define the property for the elements you want to be flagged. For example, if you want
to flag any element that has the
audienceattribute set toprogrammer, the content of the DITAVAL file should look like this:<?xml version="1.0" encoding="UTF-8"?> <val> <prop att="audience" val="programmer" action="flag" img="D:\resource\delta.gif" alt="sample alt text"/> </val>
Note that for an element to be flagged, at least one attribute-value pair needs to have a property declared in the DITAVAL file.
- Edit a DITA Map to WebHelp transformation scenario.
- Specify the DITAVAL file in the Filters tab (with the Use DITAVAL File option).
- Run the transformation scenario.
Using a Script Outside of Oxygen XML Editor/Author
- You must have a valid license for the Oxygen XML WebHelp Plugin (https://www.oxygenxml.com/buy_webhelp.html).
- The Oxygen XML WebHelp Plugin must be installed and integrated for the DITA Open Toolkit or a DocBook XSL Distribution.
- Create a DITA filter file (DITAVAL) and add it in a directory of your choice (for example, named myFile.ditaval.
- Define the property for the elements you want to be flagged. For example, if you want
to flag any element that has the
audienceattribute set toprogrammer, the content of the DITAVAL file should look like this:<?xml version="1.0" encoding="UTF-8"?> <val> <prop att="audience" val="programmer" action="flag" img="D:\resource\delta.gif" alt="sample alt text"/> </val>
Note that for an element to be flagged, at least one attribute-value pair needs to have a property declared in the DITAVAL file.
- Use the
args.filterparameter in your transformation script and set its value to the path of the DITAVAL file you created. - Execute the transformation script.
- Windows:
dita.bat -i c:\mySampleMap.ditamap -f webhelp -Dargs.filter=c:\myFile.ditaval - Mac OS X/ Linux:
dita -i /mySampleMap.ditamap -f webhelp -Dargs.filter=/myFile.ditaval