Page 1 of 1

Paragraph nested in conref'd section

Posted: Fri Aug 16, 2013 4:01 am
by sbodoff
I have this concept that I was able to construct in oXygen:

Code: Select all


<concept id="concept_urm_4ml_2l">
<title>Concept title</title>
<conbody>
<section id="section_wpx_4ml_2l">
<p id="p_yff_pml_2l">Concept definition.</p>
</section>
<section conref="#concept_urm_4ml_2l/section_wpx_4ml_2l" id="section_eml_rml_2l">
<p>This paragraph is dropped.</p>
</section>
</conbody>
</concept>
The second section is just conref'ing the first section but has an additional paragraph. oXygen allows me to add the paragraph to the second section, but when I generate HTML or PDF the second paragraph is dropped. So is the second section legal DITA?

Re: Paragraph nested in conref'd section

Posted: Fri Aug 16, 2013 8:51 am
by Radu
Hi,
So is the second section legal DITA?
Yes, it is legal. And no, the paragraph inside the <section> will not appear in the published output.

According to the specs:

http://docs.oasis-open.org/dita/v1.2/os ... fattribute
When using the conref attribute on an element, the content of that element is ignored.
So the content of the section is not appended to the content of the conreffed section.
But you can probably make it work like:

Code: Select all

 <section id="section_eml_rml_2l">
<section conref="#concept_urm_4ml_2l/section_wpx_4ml_2l" />
<p>This paragraph is dropped.</p>
</section>
Regards,
Radu

Re: Paragraph nested in conref'd section

Posted: Fri Aug 16, 2013 7:52 pm
by sbodoff
Thank you for the reference to the spec. The proposed workaround isn't valid DITA because you can't nest a section inside another section, but this one is:

Code: Select all

	<section id="section_wpx_4ml_2l">
<p id="p_yff_pml_2l">Concept definition.</p>
</section>
<section conref="#concept_urm_4ml_2l/section_wpx_4ml_2l" id="section_eml_rml_2l"/>
<section><p>This paragraph is dropped.</p></section>

Re: Paragraph nested in conref'd section

Posted: Sat Aug 17, 2013 9:08 pm
by Radu
Hi,

Right, sorry,l should have checked if sections can nest.
Indeed you can add more content in a section after the one which makes the conref.


Regards,
Radu