Most generic container element?
Posted: Fri Jun 17, 2016 11:30 am
Hi,
I am creating some reusable topics and these topics can contain anything: sections, li, you name it.
Then I have a set of topics that will pull content from the topics I mentioned above.
By script I add a conref to these, and every time I do this, I need all the content of the reusable topic pulled in my topic. So I need to link to the parent element, or wrapper.
So here is an example.
Reusable topic:
And a topic that pulls the other one in:
So my question is: I need to wrap the content of my reusable topic into an element that will fit almost everywhere where it is pull-in.
I have tried div like in the example, conbody, refbody, section but it seems there is often a catch to these elements.
I don't expect to be able to use my reusable topics in <step> elements as they are naturally very specific, but what can I use as a wrapper to always be valid below a <body> element for example? Is there anything more generic than <div>?
Thank you!
I am creating some reusable topics and these topics can contain anything: sections, li, you name it.
Then I have a set of topics that will pull content from the topics I mentioned above.
By script I add a conref to these, and every time I do this, I need all the content of the reusable topic pulled in my topic. So I need to link to the parent element, or wrapper.
So here is an example.
Reusable topic:
Code: Select all
<topic id="D777">
<title>something</title>
<body>
<div id="d2e80362">
<section>
<ul>
<li>some li</li>
<li>some li</li>
</ul>
</section>
</div>
</body>
</topic>
Code: Select all
<task id="D254875">
<title>Whatever</title>
<shortdesc>blabla.</shortdesc>
<taskbody>
<prereq>
<p>Make sure you blabla.</p>
<div conref="reuse/D254126.dita#D777/d2e80362"/>
</prereq>
...
</task>
So my question is: I need to wrap the content of my reusable topic into an element that will fit almost everywhere where it is pull-in.
I have tried div like in the example, conbody, refbody, section but it seems there is often a catch to these elements.
I don't expect to be able to use my reusable topics in <step> elements as they are naturally very specific, but what can I use as a wrapper to always be valid below a <body> element for example? Is there anything more generic than <div>?
Thank you!