Skip to content

Decide how to handle links that currently contain attributes #4092

@aneta-petrova

Description

@aneta-petrova

See LinkAttribute in https://github.com/jhradilek/asciidoctor-dita-vale?tab=readme-ov-file#available-rules:

DITA 1.3 does not allow references to reusable content in link URLs. Remove attribute references from the link or replace the entire link macro with an attribute reference.

We do this quite a lot, one example out of many is

* {InstallingServerDocURL}Port_and_firewall_requirements_{project-context}[Ports and firewall requirements] in _{InstallingServerDocTitle}_

The potential solutions I can see right now are:

  1. Stop linking to individual sections and instead link to the whole guide. Links to whole guides could be still included as attributes -- if they consist of both the link and the link label. Example:
    :AdministeringDocURL: [https://docs.theforeman.org/3.15/Administering_Project/index-katello.html](Administering Foreman)].

  2. Keep linking to individual sections but always include the whole link, no attributes. Example: Instead of {InstallingServerDocURL}Port_and_firewall_requirements_{project-context}[Ports and firewall requirements], this would be https://docs.redhat.com/en/documentation/red_hat_satellite/6.18/html-single/installing_satellite_server_in_a_connected_network_environment/index#Port_and_firewall_requirements_satellite. Repeat for each flavor (using ifdefs).

  3. I wonder if we could leverage conditionals somehow. If the DITA migration tool consumes only content relevant for satellite, we could keep upstream links as they are (with ifndef::satellite[]) and only include hard-coded links for Satellite (with ifdef::satellite[]).

Note that neither of these solutions support defining a specific document version through an attribute, the way we do it now with {ProjectVersion}.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions