Topics

Conref woes

imknewby <inewby@...>
 

Hopefully this will be my last post for a while. I'm trying to use
conref and am not getting the results I want.

testin1.xml contains:
<dita>
<concept id="rss001">
<title>Reference Services and Resources</title>
<conbody>
<section>
<title id="rs001title">Types of Reference Services</title>
....
</section></conbody></concept>
</dita>

test.xml contains:
<dita>
<concept id="rss000">
<title>Reference Services and Resources</title>
<conbody>
<p>After reading this you will know about:</p>
<ul><li><xref conref="testin1.xml#rs001title"
scope="local"></li></ul>
</cobody></concept>
</dita>

I'd like the output of text.xml to grad the title from testin1.xml,
but it doesn't. I've tried various combinations of conref
(e.g.,testin1.xml#/rs001title, testin1.xml#rs001/rs001title)

but nothing works. What's the correct syntax?

TIA,

Ilana

Michael Priestley
 

Hi Ilana,

Conref in DITA is between two elements of the same type. For example, you
can reuse from a list item to a list item:

<li id="source">this is the text I want to reuse</li>
...
<li conref="#mytopic/source"></li>

In the case below, you want to reuse text from a title in a list item. This
isn't directly allowed, since title and li are different elements, and the
conref process won't allow reuse if the elements are different, and
therefore might allow different kinds of content. You can get around this
by creating a <ph> container in both places, and using the <ph> to manage
the conref. This makes the conref process happy, since it can now tell that
you are reusing something that will be valid in its new context (it doesn't
know whether title content is valid in a list item, but it does know that
phrase content is valid in a phrase). The other issue is the syntax of the
conref attribute which should be: filename.dita#topicID/elementID.

Try this:

testin1.xml contains:
<dita>
<concept id="rss001">
<title>Reference Services and Resources</title>
<conbody>
<section>
<title><ph id="rs001title">Types of Reference
Services</ph></title>
....
</section></conbody></concept>
</dita>

test.xml contains:
<dita>
<concept id="rss000">
<title>Reference Services and Resources</title>
<conbody>
<p>After reading this you will know about:</p>
<ul><li><ph conref="testin1.xml#rss001/rs001title"/></li></ul>
</cobody></concept>
</dita>


Michael Priestley
mpriestl@...
Dept PRG IBM Canada phone: 416-915-8262
Toronto Information Development




"imknewby"
<inewby@... To: dita-users@...
> cc:
Subject: [dita-users] Conref woes
06/25/2004 07:31
PM
Please respond to
dita-users




Hopefully this will be my last post for a while. I'm trying to use
conref and am not getting the results I want.

testin1.xml contains:
<dita>
<concept id="rss001">
<title>Reference Services and Resources</title>
<conbody>
<section>
<title id="rs001title">Types of Reference Services</title>
....
</section></conbody></concept>
</dita>

test.xml contains:
<dita>
<concept id="rss000">
<title>Reference Services and Resources</title>
<conbody>
<p>After reading this you will know about:</p>
<ul><li><xref conref="testin1.xml#rs001title"
scope="local"></li></ul>
</cobody></concept>
</dita>

I'd like the output of text.xml to grad the title from testin1.xml,
but it doesn't. I've tried various combinations of conref
(e.g.,testin1.xml#/rs001title, testin1.xml#rs001/rs001title)

but nothing works. What's the correct syntax?

TIA,

Ilana








Yahoo! Groups Links