Provide invariant permalinks for subtopics

Are you missing a feature? Request its implementation here.
chrispitude
Posts: 907
Joined: Thu May 02, 2019 2:32 pm

Provide invariant permalinks for subtopics

Post by chrispitude »

WebHelp provides handy "permalink" icons by section and subtopic titles that provide a link to that section or subtopic.

Given the following DITA source with three sections and three subtopics:

Code: Select all

<topic id="topic_id">
    <title>My Topic</title>
    <body>
        <p>This is a topic.</p>
        <section id="section_w3z_f5m_qxb">
            <title>Feature A</title>
            <p>This is about feature A.</p>
        </section>
        <section id="section_m3j_k5m_qxb">
            <title>Feature B</title>
            <p>This is about feature B.</p>
        </section>
        <section id="section_mnx_k5m_qxb">
            <title>Feature C</title>
            <p>This is about feature C.</p>
        </section>
    </body>
    <topic id="topic_bqx_x5m_qxb">
        <title>Feature D</title>
        <body><p>This is about feature D.</p></body>
    </topic>
    <topic id="topic_tdh_y5m_qxb">
        <title>Feature E</title>
        <body><p>This is about feature E.</p></body>
    </topic>
    <topic id="topic_wcp_y5m_qxb">
        <title>Feature F</title>
        <body><p>This is about feature F.</p></body>
    </topic>
</topic>
the permalink URLs are:

Code: Select all

Feature A section: file:/.../topic.html#topic_id__section_w3z_f5m_qxb
Feature B section: file:/.../topic.html#topic_id__section_m3j_k5m_qxb
Feature C section: file:/.../topic.html#topic_id__section_mnx_k5m_qxb
Feature D subtopic: file:/.../topic.html#ariaid-title2
Feature E subtopic: file:/.../topic.html#ariaid-title3
Feature F subtopic: file:/.../topic.html#ariaid-title4
The section permalinks are derived from their ID values, but the subtopic permalinks are sequentially numbered "ariaid-title" values. As a result, if a new "Feature D2" subtopic is inserted, existing email/bookmark references to the subsequent subtopics E and F become incorrect.

It would be nice if subtopic permalinks could be invariant to structural changes in the same way that section permalinks are.

Testcase:
webhelp_invariant_subtopic_links.zip
(1.5 KiB) Downloaded 81 times
cosmin_andrei
Posts: 138
Joined: Mon Jun 12, 2017 10:50 am

Re: Provide invariant permalinks for subtopics

Post by cosmin_andrei »

Hi Chris,
Thank you for your feedback!
I have added an issue in our internal issues tracker (WH-3173) in order to be further analyzed by our development team.
Regards,
Cosmin
--
Cosmin Andrei
oXygen XML Editor and Author Support
chrispitude
Posts: 907
Joined: Thu May 02, 2019 2:32 pm

Re: Provide invariant permalinks for subtopics

Post by chrispitude »

I noticed that the links in the left-side navigation TOC and right-side "On this page" TOC show the desired ID-based links:

Code: Select all

Feature D subtopic: file:/.../topic.html#topic_bqx_x5m_qxb
Feature E subtopic: file:/.../topic.html#topic_tdh_y5m_qxb
Feature F subtopic: file:/.../topic.html#topic_wcp_y5m_qxb
This makes sense because these links are derived from the DITA-OT-computed navigation link hierarchy. So I guess the enhancement would be for WebHelp publishing to somehow use that same DITA-OT-computed navigation data.
radu_pisoi
Posts: 403
Joined: Thu Aug 21, 2003 11:36 am
Location: Craiova
Contact:

Re: Provide invariant permalinks for subtopics

Post by radu_pisoi »

Indeed, the links value should be consistent for permalinks and On this page component. I have updated out internal issue with these details.
Radu Pisoi
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
Post Reply