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

Post here questions and problems related to editing and publishing DITA content.
shudson310
Posts: 156
Joined: Sat Feb 26, 2005 12:09 am
Location: USA
Contact:

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

Post by shudson310 »

This request is similar to 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
Staff Content Engineer
Site: docs.servicenow.com
radu_pisoi
Posts: 403
Joined: Thu Aug 21, 2003 11:36 am
Location: Craiova
Contact:

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

Post by radu_pisoi »

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: 156
Joined: Sat Feb 26, 2005 12:09 am
Location: USA
Contact:

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

Post by shudson310 »

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
Staff Content Engineer
Site: docs.servicenow.com
radu_pisoi
Posts: 403
Joined: Thu Aug 21, 2003 11:36 am
Location: Craiova
Contact:

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

Post by radu_pisoi »

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
Post Reply