ID handling for conrefered structures
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
- Issue type
- Bug
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- xml
- Domain
- documentation, tooling
Research direction
Start with the attached ID-handling-normalizeDITA.zip and reproduce the duplicate-ID cases described for repeated and nested conrefs. Compare the generated output IDs across each cascade; done means the intended ID-selection behavior is defined and duplicate IDs no longer occur within a topic.
Written by the indexing model from the issue text.
Description
How this plugin handles IDs in conrefered contend depends on the nesting context and can result in output files with duplicate IDs:
-
If a conrefered element contains an ID the plugin ignores this for the output element.
Source:<conref> --> <ph id=”ABC”>
Output:<ph> -
If a conrefered element contains other elements with IDs the plugin generates new IDs for these elements in the corresponding output elements.
Source:<conref> --> <ph id=”ABC”><ph id=”DEF”>
Output:<ph><ph id=”djpigfv”>
But it generates for each conref target only one publication wide ID.
If a conref is used several times within a topic (e. g. product name variables) we get duplicate IDs in the output. -
If an element with conkeyref attribute on top level contains a ID there are two possible outputs:
- If the conrefered element contains another conkeyref the ID of this target will be set as output ID all other IDs (top-level and all lower conreference levels) are ignored.
Source:<conref1 id=”ABC”> --> <conref2 id=”DEF”> --> <conref3 id=”GHI”>
Output: Output ID from conref 2id=“DEF” - If the conrefered element is not a conreference element by itself the top-level ID is set as output ID
Source:<conref1 id=”ABC”> --> <ph id="DEF"><conref2 id=”GHI”> --> <conref3 id=”JKL”>
Output: Output ID from conref 1id=“ABC”
("top-level" means the conreference cascade chain starting point)
("low-level" means the last conrefered target in chain finaly rendered)
I am not shure about the intended handling but first of all it would be good to prevent duplicate ID generation within a topic. Is it possible to generate new IDs for each use case of a conref target or to set a suffix?
Otherwise maybe it would be possible to controll ID generation of nested elements using something like -dita-use-conref-target.
Additionally I would like to get the original id values rendered to the output files instead of new generated.
In my opinion the described cases 1. and 2. should grab IDs from the same level: "ABC" (top level) or "DEF" (second level).
Testing Files:
ID-handling-normalizeDITA.zip
- Dominant language
- XSLT
- Stars
- 6
- Forks
- 3
- PR merge metrics
- No merged PRs in 30d
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from dita-ot/org.dita.normalize
-
bug
Difficulty 3/5 1-2 days Newbie friendliness 35/100
-
bug
Difficulty 4/5 3-5 days Newbie friendliness 28/100
dita-ot/org.dita.normalize#7 · 3 comments ·
-
enhancement
Difficulty 4/5 3-5 days Newbie friendliness 35/100
-
Possibly add parameter which specified whether merged map or individual topics should be obtainedOpen
Difficulty 4/5 3-5 days Newbie friendliness 25/100
dita-ot/org.dita.normalize#1 · 2 comments ·
All issues in dita-ot/org.dita.normalize
Similar issues
-
documentation
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
ianktoo/project-monitor#14 ·
-
documentation good first issue help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
steerion-labs/bounded-agent-runtime#93 ·
Maintainers usually reply within 1 day
-
documentation P2
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
Maintainers usually reply within 1 day
-
:watch: Not Triaged dotnet-csharp/svc fundamentals/subsvc
Difficulty 1/5 Under an hour Newbie friendliness 88/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
daniel-ospina/tortoise#9038 ·
Maintainers usually reply within 1 day