Paragraph nested in conref'd section

Post here questions and problems related to editing and publishing DITA content.
sbodoff
Posts: 20
Joined: Tue Jun 14, 2011 10:42 pm

Paragraph nested in conref'd section

Post 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?
Radu
Posts: 9473
Joined: Fri Jul 09, 2004 5:18 pm

Re: Paragraph nested in conref'd section

Post 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
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
sbodoff
Posts: 20
Joined: Tue Jun 14, 2011 10:42 pm

Re: Paragraph nested in conref'd section

Post 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>
Radu
Posts: 9473
Joined: Fri Jul 09, 2004 5:18 pm

Re: Paragraph nested in conref'd section

Post 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
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Post Reply