Filtering DITA Content By Attribute and Saving Filtered Map

patjporter
Posts: 2
Joined: Sat May 22, 2021 6:04 pm

Filtering DITA Content By Attribute and Saving Filtered Map

Post by patjporter » Sat May 22, 2021 6:19 pm

Hello,

I have content that includes three attributes with values that I am trying to filter on: product, platform, and audience. I set up Profiling Settings for each, and I also read this post:

topic19857.html

I set up a DITA-OT transformation "Export DITA Map contents to ZIP archive" and I have tried all three filtering options: "Use DITAVAL file:", Use profiling condition set:", and "Exclude from output all elements with any of the following profiling attributes:".

In each case the export returns a set of files that includes all of the content that is tagged for exclusion. The process of setting these up seems very straightforward, but it does not work.

Is there something on the Parameters, Advanced, or Output tabs that I am missing? Seems like a fundamental XML operation to filter content, but since it does not work, it has to be something I am missing.

Please help!

Thanks,
Pat

Radu
Posts: 7535
Joined: Fri Jul 09, 2004 5:18 pm

Re: Filtering DITA Content By Attribute and Saving Filtered Map

Post by Radu » Mon May 24, 2021 9:43 am

Hi Pat,

This should work only for situations when the filters exclude entire topics (they are set up on each topicref element in the DITA Map).
If you want to exclude certain elements inside topics, I'm afraid we do not have this possibility.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com

patjporter
Posts: 2
Joined: Sat May 22, 2021 6:04 pm

Re: Filtering DITA Content By Attribute and Saving Filtered Map

Post by patjporter » Wed May 26, 2021 1:15 am

Thank you Radu,

I know nothing about scripting...but..would there be a way to create some sort of "thing" that I could click on that would run one or more re-factoring operations to delete all elements that have certain attribute values? I would need several versions of the "thing" so I could name them in accordance with the particular document I am creating and which attribute/value combinations I want removed.

Also, the publishing scripts I am using in Adobe FrameMaker require a flattened DITA file structure (all topics and maps at the root level). My source files are all in folders of various hierarchies. Does Oxygen have a way to take a root map whose source files are in a hierarchical folder structure and convert the maps and the source files to a flattened file structure?

Thanks!
Pat

Radu
Posts: 7535
Joined: Fri Jul 09, 2004 5:18 pm

Re: Filtering DITA Content By Attribute and Saving Filtered Map

Post by Radu » Wed May 26, 2021 7:13 am

Hi Pat,

In the Oxygen main menu "Tools->XML Refactoring" you can find a "Delete element" operation which can be applied on multiple files. You can set an XPath expression for the element to delete, like for example:

Code: Select all

*[contains(@audience, 'novice')]
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com

Radu
Posts: 7535
Joined: Fri Jul 09, 2004 5:18 pm

Re: Filtering DITA Content By Attribute and Saving Filtered Map

Post by Radu » Wed May 26, 2021 8:51 am

Forgot about this question:
Also, the publishing scripts I am using in Adobe FrameMaker require a flattened DITA file structure (all topics and maps at the root level). My source files are all in folders of various hierarchies. Does Oxygen have a way to take a root map whose source files are in a hierarchical folder structure and convert the maps and the source files to a flattened file structure?
I'm afraid we do not have such an export action.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com

Post Reply