Dynamic filtering of TOC and topics from webhelp (using client-side config file)

shudson310
Posts: 86
Location: USA

Dynamic filtering of TOC and topics from webhelp (using client-side config file)

Fri Mar 17, 2017 1:22 am

This request is similar to https://www.oxygenxml.com/forum/topic11057.html, however, we do not want to show the options to the user to have to pick from a list in the interface.

Rather, we have a highly configurable application, where certain product features can be enabled or not. We want the help system to only show topics (in TOC, and search and related links) for those associated features that are enabled. We want to hide those that are not enabled.

Our application generates an XML file that can be parsed for the list of features, and we are using the <resourceid appid="" appname=""/>feature of DITA 1.3 on our map to identify which feature (appid) a particular topic is associated with. We are using the appname to identify the particular application.

How can we setup up the dynamic filtering so that it uses the XML file to then hide content that is not in the feature XML file?
Scott Hudson
Content Strategist
Jeppesen
Site: jeppesen.com
radu_pisoi
Posts: 310
Location: Craiova

Re: Dynamic filtering of TOC and topics from webhelp (using client-side config file)

Mon Mar 20, 2017 1:24 pm

Hi,

We are going to implement a similar feature that allows the user to dynamic output filter/profile in a future oXygen WebHelp version.

Most probably, we will collect the filters/facets by analyzing the DITAVAL files. One of the possible value for the prop/@action DITAVAL attribute is passthrough, case when the profiled content will be included in the output together with the profiling information.
https://www.oxygenxml.com/dita/1.3/spec ... assthrough

Hence, based on the values collected from the DITAVAL file, the user will be able to select a list of facets(product, audience, platform) to filter the WebHelp output (TOC, content, related links, search results, etc).

I hope that this approach covers your use case.
Radu Pisoi
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
shudson310
Posts: 86
Location: USA

Re: Dynamic filtering of TOC and topics from webhelp (using client-side config file)

Mon Mar 20, 2017 7:17 pm

The only problem I have is that we need to filter based on the resourceid, which is not a part of the ditaval files.

Again, we will want to have a local config file that would be a subset of the context-help-map.js. The Context Help Map lists all of the available IDs in the documentation, but the local config file would list only the enabled features (a subset).

The other filters would be nice as well, but but I'm still looking for a way to handle the resource approach, too.
Scott Hudson
Content Strategist
Jeppesen
Site: jeppesen.com
radu_pisoi
Posts: 310
Location: Craiova

Re: Dynamic filtering of TOC and topics from webhelp (using client-side config file)

Tue Mar 21, 2017 3:03 pm

Hi,

I don't think it will be easy to implement dynamic output filtering based on the resourceID information. The main problem is that the resourceID information is not propagated to the HTML topics. I see that you already discovered this problem and you have reported to the DITA-OT project: https://github.com/dita-ot/dita-ot/issues/2630.

However, if you find any correlation between the resourceID and the HTML topic, you can try to implement a custom solution with a JavaScript. To add the JavaScript file in the WebHelp Responsive output, you can use the Insert Custom XHTML Fragments in Predefined Placeholders customization method described in our user manual.
Radu Pisoi
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com

Return to “DITA (Editing and Publishing DITA Content)”

Who is online

Users browsing this forum: No registered users and 2 guests