You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 2 id=“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 1 id=“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).
In case of conref push with conaction="pushreplace" the plugin handles IDs quiet different too.
The result IDs are fetched from all levels of pushed source content.
IDs of the push-replace target placeholder structures are ignored on all levels.
Source: <ph id="ABC"> <-- <ph conaction="pushreplace" id="DEF" ...><ph id="GHI"><ph id="JKL">
Output: <ph id="DEF"><ph id="GHI><ph id=JKL>
This behaviour is the best for us because we are able to control all rendered IDs.
Of course, the problem with duplicate IDs within topics is still there but unavoidable.
Even the described ID handlings are no issues, if someone needs controlled IDs in normalized DITA for post processing this behavior might be good to know.
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:
Source:
<conref1 id=”ABC”> --> <conref2 id=”DEF”> --> <conref3 id=”GHI”>
Output: Output ID from conref 2
id=“DEF”
Source:
<conref1 id=”ABC”> --> <ph id="DEF"><conref2 id=”GHI”> --> <conref3 id=”JKL”>
Output: Output ID from conref 1
id=“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
The text was updated successfully, but these errors were encountered: