outputclass-based content completion
Posted: Tue Sep 28, 2021 8:38 pm
We have a client that has transitioned from a custom schema to DITA. They are using oXygen 23.1.
Their content has a particular order to it -- an example might be <section><intro/><body/><conclusion/></section>.
They would want to maintain that order in DITA like:
There are potentially 200 different outputclasses.
They relied on the content-completion handler quite a bit in their old schema. I want to make that work for them with DITA, but I don't see a way to configure what they would need in cc_config.xml.
A few examples of what I would want to do are:
or
or
I'm pretty sure cc_config.xml will not let me do these things. Do you have any suggestions on how to customize the ccHandler without having to write 200 different actions (pointing to the same AuthorOperation but passing a custom name as a parameter) and adding them here:
Their content has a particular order to it -- an example might be <section><intro/><body/><conclusion/></section>.
They would want to maintain that order in DITA like:
Code: Select all
<section outputclass="about">
<title>About</title>
<sectiondiv outputclass="intro">
<p outputclass="something">....</p>
</sectiondiv>
<sectiondiv outputclass="body">
<p outputclass="somethingElse">...</p>
</sectiondiv>
<sectiondiv outputclass="conclusion">
<p outputclass="maybeSomethingElse">...</p>
</sectiondiv>
They relied on the content-completion handler quite a bit in their old schema. I want to make that work for them with DITA, but I don't see a way to configure what they would need in cc_config.xml.
A few examples of what I would want to do are:
Code: Select all
<!-- attempting to specify particular outputclasses on an element in the insertElements attribute -->
<elementProposals path="section" insertElements="title sectiondiv sectiondiv[@outputclass='intro']......."/>
<elementProposals path="section[@outputclass='about']/sectiondiv[@outputclass='intro']" insertElements="p[@outputclass='something']"/>
Code: Select all
<!-- attempting to use an alias here -->
<elementProposals path="section[@outputclass='about']" insertElements="Intro"/>
Code: Select all
<!-- attempting to 'alias' an element with a particular outputclass -->
<render element="sectiondiv[@outputclass='intro']" as="Intro"/>