Conditioning Question
Having trouble installing Oxygen? Got a bug to report? Post it all here.
-
- Posts: 63
- Joined: Tue Mar 14, 2017 12:36 am
Conditioning Question
Hello:
I know that you can exclude conditioned content from the final product, but is there a way to include content?
For example, products A and C use some of the same information. If I condition out A, the documentation for C is missing the information that was shared by A and C. Have I missed something? Is there a way to show all of the information for C, even if it's marked with A (as long as it's marked for C as well)?
I know that you can exclude conditioned content from the final product, but is there a way to include content?
For example, products A and C use some of the same information. If I condition out A, the documentation for C is missing the information that was shared by A and C. Have I missed something? Is there a way to show all of the information for C, even if it's marked with A (as long as it's marked for C as well)?
-
- Posts: 922
- Joined: Thu May 02, 2019 2:32 pm
Re: Conditioning Question
Post by chrispitude »
Hi Stacey,
I find it easiest to use profiling attributes to specify what to include. For example,
Now, you can make DITAVAL files that -- for elements where @audience is defined -- includes content relevant to a value. For example, novice.ditaval would look like this:
If content is relevant to multiple values, just include them, space-separated:
I find this inclusion-based use of attributes more intuitive than an exclusion-based approach.
I find it easiest to use profiling attributes to specify what to include. For example,
Code: Select all
<p>This is for everyone.</p>
<p audience="novice">This is for novice users only.</p>
<p audience="intermediate">This is for intermediate users only.</p>
<p audience="expert">This is for expert users only.</p>
Code: Select all
<val>
<!-- if @audience is defined, exclude all values... -->
<prop att="audience" action="exclude"/>
<!-- ...then incrementally include only "novice" -->
<prop att="audience" val="novice" action="include"/>
</val>
Code: Select all
<p audience="intermediate expert">This is for intermediate and expert users.</p>
-
- Posts: 24
- Joined: Tue Jun 14, 2022 1:08 pm
Re: Conditioning Question
Hello,
my question is not related to the original one but still a rather general question about conditions:
Is there a possibility to force-exclude elements where an attribute has multiple values but only one of the values is defined as "excluded" in the DITAVAL? This is the default behavior in Madcap Flare which was quiet practical. After I made a DITA project out of a Flare project, I regularly find paragraphs or whole topics in the output that should have been excluded and the reason is always multiple values in an attribute.
For fun, I tried using regex in the @val attribute to catch cases where the target value is enclosed by other values. But of course that did not work.
So is there another way to force exclude without having to find out and write down every possible combination of multiple values in the ditaval?
Example element:
Example ditaval:
Note:
- The DITA project uses a subject scheme.
- Please ignore the fact, that the second value is regarding language. This is just as an example.
- I know that I could make specializations of @props, but this is a rather complicated approach.
Kind regards
im_rem
my question is not related to the original one but still a rather general question about conditions:
Is there a possibility to force-exclude elements where an attribute has multiple values but only one of the values is defined as "excluded" in the DITAVAL? This is the default behavior in Madcap Flare which was quiet practical. After I made a DITA project out of a Flare project, I regularly find paragraphs or whole topics in the output that should have been excluded and the reason is always multiple values in an attribute.
For fun, I tried using regex in the @val attribute to catch cases where the target value is enclosed by other values. But of course that did not work.
So is there another way to force exclude without having to find out and write down every possible combination of multiple values in the ditaval?
Example element:
Code: Select all
<topic id="beispiel_zur_datenanlage" audience="internal lang_de">
<title>Beispiel zur Datenanlage</title>
...
Code: Select all
<val>
<prop action="exclude" att="audience" val="lang_de"/>
</val>
- The DITA project uses a subject scheme.
- Please ignore the fact, that the second value is regarding language. This is just as an example.
- I know that I could make specializations of @props, but this is a rather complicated approach.
Kind regards
im_rem
-
- Posts: 9431
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Conditioning Question
Hi,
The DITA 1.3 specs describes exactly how filtering with DITAVAL filter files should work:
https://www.oxygenxml.com/dita/1.3/spec ... ering.html
Regards,
Radu
The DITA 1.3 specs describes exactly how filtering with DITAVAL filter files should work:
https://www.oxygenxml.com/dita/1.3/spec ... ering.html
So the DITA OT publishing engine bundled with Oxygen precisely follows the DITA specification in this regard and there is no setting to control this as the specification is quite clear about how the filtering should work.if any token in the attribute value evaluates to "include", the element evaluates to "include"; otherwise it evaluates to "exclude". In other words, the attribute evaluates to "exclude" only when all the values in that attribute evaluate to "exclude".
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
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