Conditional tagging
-
- Posts: 4
- Joined: Wed Sep 19, 2012 8:16 pm
Conditional tagging
Hi,
I was wondering if someone knows of a DocBook tag to use that we can tag content with that we only want displayed when generating (Transforming into WebHelp) Help files for certain customers. We have several items in our help files that are only available for those customers that want/pay for them, so when we generate our help files for Customer A we want to include them, but not for Customer B.
Any help is appreciated.
Thanks,
Frankwin
I was wondering if someone knows of a DocBook tag to use that we can tag content with that we only want displayed when generating (Transforming into WebHelp) Help files for certain customers. We have several items in our help files that are only available for those customers that want/pay for them, so when we generate our help files for Customer A we want to include them, but not for Customer B.
Any help is appreciated.
Thanks,
Frankwin
-
- Posts: 4141
- Joined: Fri Mar 28, 2003 2:12 pm
Re: Conditional tagging
Post by sorin_ristache »
Hi Frankwin,
Tagging content for different target audiences/output types is called profiling and in the DocBook framework that is usually accomplished by adding profiling attributes on the elements specific for some audience. The attributes used for profiling are general (available on every DocBook element). They are: audience, userlevel, role, vendor, security, condition, conformance, os, arch, etc. For example profiling for the expert and novice audience is done in the XML source document as in the following:
When the output is generated the profile is selected by setting the value of the corresponding profiling parameter in the DocBook transformation scenario. For example for the audience attribute the parameter profile.audience of the transformation should be set to either novice (for including in the output only the elements that have no audience attribute or have the attribute audience="novice") or expert (for including in the output only the elements that have no audience attribute or have the attribute audience="expert") or novice;expert (if both profiles need to be generated in the output). For the userlevel profiling attribute the transformation parameter is called profile.userlevel, etc.
Regards,
Sorin
Tagging content for different target audiences/output types is called profiling and in the DocBook framework that is usually accomplished by adding profiling attributes on the elements specific for some audience. The attributes used for profiling are general (available on every DocBook element). They are: audience, userlevel, role, vendor, security, condition, conformance, os, arch, etc. For example profiling for the expert and novice audience is done in the XML source document as in the following:
Code: Select all
<sect1>
<title>Checking for Updates</title>
<para audience="novice">If the connection is blocked at this point you should contact your
network administrator.</para>
<para audience="expert">If the program stops responding first check the user credentials
configured in the user options and the the proxy settings.</para>
</sect1>
Regards,
Sorin
-
- Posts: 1
- Joined: Tue Sep 03, 2013 9:08 pm
Re: Conditional tagging
Is profiling supported in oXygen PDF output as well? I am using the following XML:
<para condition="journal">This is optional for journals.</para>
<para condition="book">This is required for books.</para>
I edited the DocBook transformation scenario to set the profile.condition parameter to "journal", and ran the transformation. Both the "journal" and the "book" paragraphs were included in the PDF file. (I expected to see only the "journal" paragraph in the output.)
Thanks in advance!
<para condition="journal">This is optional for journals.</para>
<para condition="book">This is required for books.</para>
I edited the DocBook transformation scenario to set the profile.condition parameter to "journal", and ran the transformation. Both the "journal" and the "book" paragraphs were included in the PDF file. (I expected to see only the "journal" paragraph in the output.)
Thanks in advance!
-
- Posts: 4141
- Joined: Fri Mar 28, 2003 2:12 pm
Re: Conditional tagging
Post by sorin_ristache »
Hi,
Can you post here or send us the Docbook document for testing the PDF transformation on it with the profile.condition parameter set to journal?
Regards,
Sorin
Yes, profiling is supported in all Docbook transformations. If the profiling parameters are present in the Parameters dialog box then they should work.jsk wrote:Is profiling supported in oXygen PDF output as well?
I tried that too in a simple DOcbook document and only the journal paragraph was present in the PDF output, that is:jsk wrote:I am using the following XML:
<para condition="journal">This is optional for journals.</para>
<para condition="book">This is required for books.</para>
I edited the DocBook transformation scenario to set the profile.condition parameter to "journal", and ran the transformation. Both the "journal" and the "book" paragraphs were included in the PDF file. (I expected to see only the "journal" paragraph in the output.)
Code: Select all
<para condition="journal">This is optional for journals.</para>
Regards,
Sorin
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service