• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Problem with reusable paragraphs

Explorer ,
Jan 30, 2019 Jan 30, 2019

Copy link to clipboard

Copied

Hi

What I try to do?

- I wan't to create a "library" file where I list terms like product name which can change between projects. Then I reuse these paragraphs in my files and I have to update only this one file when the project changes. I would use the same idea for the warnings and notes as well.

How I have done it?

- I created topic MyVariables.xml and included <ph> element for product name. I added id product_name for the element.

- In the file which is used in my ditamap I added <ph> and added to conref attribute MyVariables.xml#shared/product_name (I found this "shared" from some web discussion")

Result?

- As long as all the files are located in the same folder it works as wanted.

Problem?

- I would like to have is a possibility to keep files in different folders so that those could be grouped logically, not to have dozens of files in one folder. I haven't found how this could be done. I found an instruction to add folder path to conref but there was not instruction how to do it (and I do it wrong as it is not working).

Any advice?

Br,

Pekka

TOPICS
Structured

Views

484

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Explorer , Feb 05, 2019 Feb 05, 2019

The solution was keyspace. I had tried it earlier but in a wrong way. After creating the keyspace I referred to the element by adding the element to my concept and setting the attribute conref to refer to the wanted paragraph.

I was told to use the selection Insert - Conref. And it is working.

Votes

Translate

Translate
Explorer ,
Jan 31, 2019 Jan 31, 2019

Copy link to clipboard

Copied

Other way I have tested:

Map:

<map xmlns:ditaarch="http://dita.oasis-open.org/architecture/2005/">

<title>MY TEST MAP</title>

<keydef href="MyTestingVariables2.xml" keys="ReuseTest"

    type="topic">

<topicmeta>

<navtitle>MyTestVariables2</navtitle>

</topicmeta>

</keydef>

<topicref href="My test concept.xml" type="concept">

<topicmeta>

<navtitle>My test concept</navtitle>

</topicmeta>

</topicref>

</map>

Concept:

<concept id="id191VCE00GY4"

    xmlns:ditaarch="http://dita.oasis-open.org/architecture/2005/">

<title>My test concept</title>

<shortdesc>Only for testing</shortdesc>

<prolog>

<author></author>

</prolog>

<conbody>

<p>The name of the product is

<ph

    conref="ReuseTest/ProductName"></ph>

</p>

</conbody>

</concept>

Topic (Including the reusable content):

<topic id="id191VF300W5Z"

    xmlns:ditaarch="http://dita.oasis-open.org/architecture/2005/">

<title>MyTestVariables2</title>

<shortdesc>For testing only</shortdesc>

<prolog>

<author></author>

</prolog>

<body>

<p>

<ph id="ProductName">Test product</ph>

</p>

</body>

</topic>

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Feb 05, 2019 Feb 05, 2019

Copy link to clipboard

Copied

LATEST

The solution was keyspace. I had tried it earlier but in a wrong way. After creating the keyspace I referred to the element by adding the element to my concept and setting the attribute conref to refer to the wanted paragraph.

I was told to use the selection Insert - Conref. And it is working.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines