Many times it is required to generate a slightly different version of the same document for different audiences. Previously the only way to achieve this using AurigaDoc was to make a copy of the original document for each variation and make the necessary changes. This was a maintenance headache as common changes in one had to be manually copied into others.
Starting from version v1.4.0-b AurigaDoc supports profiling of documents. With profiling, elements(sections, paragraphs, etc) can be marked as conditional. While actual output generation one or more conditions can be specified to generate the output with elements matching those conditions.
e.g. some sections can be given a os attribute like this
<section os="win".. to indicate that it is intended for only windows operating systems. While generating output a parameter can be passed to specify a value for os like this
With the above parameter only elements which have a os attribute value of win will be included in the output. Other supported attributes can be specified similarly.
Even multiple values can be specified for a attribute like this
With the above setting the element will be selected if the value of profile.os is win or windows
AurigaDoc supports a predefined set of profiling attributes. These are similar to those supported by DocBook. Listed below are the attributes and the name of corresponding command line parameters.
|Attribute||Description||Command Line Param|
|os||the operating system||profile.os|
|role||can be used for indicating a user role.||profile.role|
|security||security level like high, medium, low, etc||profile.security|
|userlevel||user level like beginner, intermediate, expert, etc||profile.userlevel|
|format||output format like html, mhtml, dhtml, pdf, ps, fo, jhelp, etc.
The profile.format parameter value is set implicitly depending on the output format specified.
A sample usage of this would be to have different page header, etc for pdf and html related outputs.
|NONE. The parameter is implicitly passed.|
Some of the situations where profiling is useful are:-