Problem with DITAVAL filtration
Post here questions and problems related to editing and publishing DITA content.
-
Alöna
- Posts: 4
- Joined: Fri Aug 25, 2023 7:54 am
Problem with DITAVAL filtration
I have a single bookmap with chapters that need to be filtered for three different documents. The attributes are structured like this: three attributes for different documents and two attributes for HTML and PDF.
Then there are different scenarios in which ditaval filters are enabled.
For one document, the filtering works successfully, but for the other two, the filters don't work and try to retrieve some topics that should be discarded. I checked the links to the topics and parent maps to make sure there are no attribute conflicts. I added the attributes to the mapref (not to the topics).
What mistake am I making in setting up filters? I'd like to maintain a single bookmap and a set of scenarios with ditaval.
Here's an example:
And one of the DITAVAL files:
However, topics with other "product" attributes are included in the output.
I also tried adding an "exclude" rule specifically for the other two products, but the result was the same.
Then there are different scenarios in which ditaval filters are enabled.
For one document, the filtering works successfully, but for the other two, the filters don't work and try to retrieve some topics that should be discarded. I checked the links to the topics and parent maps to make sure there are no attribute conflicts. I added the attributes to the mapref (not to the topics).
What mistake am I making in setting up filters? I'd like to maintain a single bookmap and a set of scenarios with ditaval.
Here's an example:
Code: Select all
<chapter href="topics/install/install.dita"
product="howto">
<topicmeta>
<data name="wh-menu">
<data name="hide" value="yes"/>
</data>
</topicmeta>
<mapref href="topics/install/install.ditamap" format="ditamap"
product="howto"/>
</chapter>
<chapter href="topics/applications/applications.dita"
product="guide">
<topicmeta>
<data name="wh-menu">
<data name="hide" value="yes"/>
</data>
</topicmeta>
<mapref href="topics/applications/applications.ditamap" format="ditamap" product="guide"/>
</chapter>Code: Select all
<val>
<prop action="exclude" att="product"/>
<prop action="exclude" att="otherprops"/>
<prop action="include" att="product" val="howto"/>
<prop action="include" att="otherprops" val="howto_web"/>
</val>I also tried adding an "exclude" rule specifically for the other two products, but the result was the same.
-
Alöna
- Posts: 4
- Joined: Fri Aug 25, 2023 7:54 am
Re: Problem with DITAVAL filtration
I think I've localized the problem. More precisely, two problems:
1) The project contains a set of summary files, some of which contain references to topics that should be filtered. The script was processing the summary files and their topic references. I refactored the reused components to avoid collisions.
2) Nested topics. I'm not sure, but it seems the filter script tries to process a topic if it contains nested topics. In any case, I find the chunk=to-content attribute more convenient, so I changed that as well during testing.
1) The project contains a set of summary files, some of which contain references to topics that should be filtered. The script was processing the summary files and their topic references. I refactored the reused components to avoid collisions.
2) Nested topics. I'm not sure, but it seems the filter script tries to process a topic if it contains nested topics. In any case, I find the chunk=to-content attribute more convenient, so I changed that as well during testing.
-
Radu
- Posts: 9689
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Problem with DITAVAL filtration
Hi Alöna,
Right, so a topic may be properly removed from the DITA Map by the filtering but if it's referenced in another topic with an xref which does not have the proper profiling attributes set on it, then it gets indirectly included in the output folder.
In the Oxygen DITA Maps Manager view if you do a "Validate and check for completeness" on the main DITA Map and also specify all the DITAVAL filter files there, you should receive validation for some topics that they are referenced in other topics but not in the DITA Map TOC.
Not sure if I understand the other "nested topics" issue, I understand you have let's say a single topic file containing inside sub topics. Maybe again those sub topics are referenced directly from other places without the profiling to be properly set there. It would help if you could send a small sample project (map, couple of topics, ditaval filters) to support@oxygenxml.com along with details about the problem you observe.
Regards,
Radu
Right, so a topic may be properly removed from the DITA Map by the filtering but if it's referenced in another topic with an xref which does not have the proper profiling attributes set on it, then it gets indirectly included in the output folder.
In the Oxygen DITA Maps Manager view if you do a "Validate and check for completeness" on the main DITA Map and also specify all the DITAVAL filter files there, you should receive validation for some topics that they are referenced in other topics but not in the DITA Map TOC.
Not sure if I understand the other "nested topics" issue, I understand you have let's say a single topic file containing inside sub topics. Maybe again those sub topics are referenced directly from other places without the profiling to be properly set there. It would help if you could send a small sample project (map, couple of topics, ditaval filters) to support@oxygenxml.com along with details about the problem you observe.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
Radu
- Posts: 9689
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Problem with DITAVAL filtration
Hi Alöna,
Great, when you edit a transformation scenario in Oxygen in the Parameters tab there is this parameter "onlytopic.in.map" which when enabled might fix such problems without the need to add profiling attributes to individual links, I have not tested how well it works though. But in my opinion such issues ideally need to be fixed individually, if for example you have an inline link somewhere in a paragraph and it gets filtered out maybe the content of the paragraph needs also to be re-written, or avoid using inline links and use related links at the end of the topic, or use a relationship table in the DITA Map with profiling attributes properly set on its rows.
Great, when you edit a transformation scenario in Oxygen in the Parameters tab there is this parameter "onlytopic.in.map" which when enabled might fix such problems without the need to add profiling attributes to individual links, I have not tested how well it works though. But in my opinion such issues ideally need to be fixed individually, if for example you have an inline link somewhere in a paragraph and it gets filtered out maybe the content of the paragraph needs also to be re-written, or avoid using inline links and use related links at the end of the topic, or use a relationship table in the DITA Map with profiling attributes properly set on its rows.
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
Return to “DITA (Editing and Publishing DITA Content)”
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ Artificial Intelligence (AI Positron Assistant add-on)
- ↳ 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