keyscope attribute does not work as expected
Posted: Tue Feb 05, 2019 12:39 pm
Hello,
I try to work with the "keyscope" attribute on two maprefs in the main "Map.ditamap".
Each referenced map defines the same key "topic".
This key is used in a topic with a keyref (see <dt>A</dt>) and it works as expected.
If I use the key within a <p> element (see <p id="Referrer"> in TemplatesA.dita) which itself is used by a conkeyref (see <dt>B</dt>) or conref (see <dt>C</dt>) the reference is resolved only once.
Have i missed something?
The result is this:
---------------
Referring 1
This topic should refer to "Topic 1"
A
Referring to: Topic 1
B
This Template text refers to the special text of: Topic 1
C
This Template text refers to the special text of: Topic 1
---------------
Referring 2
This topic should refer to "Topic 2"
A
Referring to: Topic 2
B
This Template text refers to the special text of: Topic 1 //<<< unexpected!!! should be: Topic 2
C
This Template text refers to the special text of: Topic 1 //<<< unexpected!!! should be: Topic 2
---------------
Here an excerpt of my files:
"Chapter1\Chapter1.ditamap"
"Chapter1\Referring1.dita"
"Chapter1\Topic1.dita"
"Chapter2\Chapter2.ditamap"
"Chapter2\Referring2.dita"
"Chapter2\Topic2.dita"
"TemplatesFolder\Templates.ditamap"
"TemplatesFolder\TemplatesA.dita"
"Map.ditamap"
Complete download here:
https://inosoftgmbh-my.sharepoint.com/: ... Q?e=xdTQU2
Thanks
Marcel
I try to work with the "keyscope" attribute on two maprefs in the main "Map.ditamap".
Each referenced map defines the same key "topic".
This key is used in a topic with a keyref (see <dt>A</dt>) and it works as expected.
If I use the key within a <p> element (see <p id="Referrer"> in TemplatesA.dita) which itself is used by a conkeyref (see <dt>B</dt>) or conref (see <dt>C</dt>) the reference is resolved only once.
Have i missed something?
The result is this:
---------------
Referring 1
This topic should refer to "Topic 1"
A
Referring to: Topic 1
B
This Template text refers to the special text of: Topic 1
C
This Template text refers to the special text of: Topic 1
---------------
Referring 2
This topic should refer to "Topic 2"
A
Referring to: Topic 2
B
This Template text refers to the special text of: Topic 1 //<<< unexpected!!! should be: Topic 2
C
This Template text refers to the special text of: Topic 1 //<<< unexpected!!! should be: Topic 2
---------------
Here an excerpt of my files:
"Chapter1\Chapter1.ditamap"
Code: Select all
<mapref href="../TemplatesFolder/Templates.ditamap" processing-role="resource-only" />
<topicref href="Referring1.dita"/>
<keydef keys="topic" href="Topic1.dita"/>
Code: Select all
<p>This is individual text of Referring one.</p>
<p>This topic should refer to "Topic 1"</p>
<dt>A</dt>
<dd><p>Referring to: <xref keyref="topic"/></p></dd>
<dt>B</dt>
<dd><p conkeyref="TemplatesA/Referrer"></p></dd>
<dt>C</dt>
<dd><p conref="../TemplatesFolder/TemplatesA.dita#Inhalt/Referrer"></p></dd>
Code: Select all
<title>Topic 1</title>
Code: Select all
<mapref href="../TemplatesFolder/Templates.ditamap" processing-role="resource-only" />
<topicref href="Referring2.dita"/>
<keydef keys="topic" href="Topic2.dita"/>
Code: Select all
<p>This is individual text of Referring two.</p>
<p>This topic should refer to "Topic 2"</p>
<dt>A</dt>
<dd><p>Referring to: <xref keyref="topic"/></p></dd>
<dt>B</dt>
<dd><p conkeyref="TemplatesA/Referrer"></p></dd>
<dt>C</dt>
<dd><p conref="../TemplatesFolder/TemplatesA.dita#Inhalt/Referrer"></p></dd>
Code: Select all
<title>Topic 2</title>
Code: Select all
<keydef keys="TemplatesA" href="TemplatesA.dita"/>
Code: Select all
<p id="Referrer">This Template text refers to the special text of: <xref keyref="topic"/></p>
Code: Select all
<mapref href="Chapter1/Chapter1.ditamap" keyscope="ONE" />
<mapref href="Chapter2/Chapter2.ditamap" keyscope="TWO" />
https://inosoftgmbh-my.sharepoint.com/: ... Q?e=xdTQU2
Thanks
Marcel