keyscope attribute does not work as expected
Post here questions and problems related to editing and publishing DITA content.
-
- Posts: 6
- Joined: Mon Feb 04, 2019 5:59 pm
keyscope attribute does not work as expected
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
-
- Posts: 9436
- Joined: Fri Jul 09, 2004 5:18 pm
Re: keyscope attribute does not work as expected
Hi Marcel,
I would not have expected the conref to work but I would have expected the conkeyref to work.
I tested your sample also with DITA OT 3.2.1 but it still does not work as expected.
There is an already opened issue which in my opinion is similar to yours, I added a comment and your samples there:
https://github.com/dita-ot/dita-ot/issues/2525
Regards,
Radu
I would not have expected the conref to work but I would have expected the conkeyref to work.
I tested your sample also with DITA OT 3.2.1 but it still does not work as expected.
There is an already opened issue which in my opinion is similar to yours, I added a comment and your samples there:
https://github.com/dita-ot/dita-ot/issues/2525
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 922
- Joined: Thu May 02, 2019 2:32 pm
Re: keyscope attribute does not work as expected
Post by chrispitude »
I think this was fixed in DITA-OT 3.7:
https://github.com/dita-ot/dita-ot/issues/2525
I added my findings in the log.
https://github.com/dita-ot/dita-ot/issues/2525
I added my findings in the log.
Return to “DITA (Editing and Publishing DITA Content)”
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service