Page 1 of 1

Subject Schemes and Non-Default Profiling Attributes

Posted: Tue Jul 23, 2019 11:20 pm
by dgallo
I have created a Subject Scheme ditamap to define my own conditional profiling values. I would like to define attributes outside of the default values such as audience, product, props, and otherprops.

Once I have created the Subject Scheme and referenced it in my main ditamap, I do not see these conditions are available from the Profiling Attributes. Is it not possible to define your own attributes? Are you required to use the default attributes provided?

For example:
<subjectScheme>
<subjectHead>
<subjectHeadMeta>
<navtitle>Documentation Conditions</navtitle>
</subjectHeadMeta>
</subjectHead>
<hasInstance>
<subjectdef keys="props">
<subjectdef keys="approachKey">
<subjectdef keys="setup"/>
<subjectdef keys="sto"/>
<subjectdef keys="verification"/>
<subjectdef keys="opt"/>
<subjectdef keys="fit"/>
<subjectdef keys="doe"/>
<subjectdef keys="basic"/>
</subjectdef>
<subjectdef keys="phaseKey">
<subjectdef keys="evaluate"/>
<subjectdef keys="postprocess"/>
</subjectdef>
</subjectdef>
</hasInstance>
<enumerationdef>
<attributedef name="approach"/>
<subjectdef keyref="approachKey"/>
</enumerationdef>
<enumerationdef>
<attributedef name="phase"/>
<subjectdef keyref="phaseKey"/>
</enumerationdef>
</subjectScheme>

Re: Subject Schemes and Non-Default Profiling Attributes

Posted: Tue Jul 23, 2019 11:27 pm
by dgallo
Apologies, I shared the wrong Subject Scheme in my earlier post. Please reference this:

<subjectScheme>
<subjectHead>
<subjectHeadMeta>
<navtitle>Conditions</navtitle>
</subjectHeadMeta>
</subjectHead>
<hasInstance>
<subjectdef keys="approachKey">
<subjectdef keys="setup"/>
<subjectdef keys="sto"/>
<subjectdef keys="verification"/>
<subjectdef keys="opt"/>
<subjectdef keys="fit"/>
<subjectdef keys="doe"/>
<subjectdef keys="basic"/>
</subjectdef>
<subjectdef keys="phaseKey">
<subjectdef keys="evaluate"/>
<subjectdef keys="postprocess"/>
</subjectdef>
</hasInstance>
<enumerationdef>
<attributedef name="approach"/>
<subjectdef keyref="approachKey"/>
</enumerationdef>
<enumerationdef>
<attributedef name="phase"/>
<subjectdef keyref="phaseKey"/>
</enumerationdef>
</subjectScheme>

Re: Subject Schemes and Non-Default Profiling Attributes

Posted: Wed Jul 24, 2019 9:15 am
by Radu
Hi,

With a Subject Scheme map you can restrain values for existing profiling attributes. If you want to define a new DITA profiling attribute you will need to do that with DITA specialization, creating your own DTD specialization which adds the new profiling attribute and then using the DTD specialization in your DITA maps and topics.

Actually there has been an older blog post from someone wanting a very similar thing, it may help you:

topic12861.html#p37076

Regards,
Radu

Re: Subject Schemes and Non-Default Profiling Attributes

Posted: Thu Jul 25, 2019 12:14 am
by dgallo
Thanks. Is it possible you could send an email plugin that is described in topic12861.html#p37076?

Re: Subject Schemes and Non-Default Profiling Attributes

Posted: Thu Jul 25, 2019 9:17 am
by Radu
Hi,

I uploaded here a DITA Open Toolkit plugin which contains a specialization of a DITA task adding a profiling attribute called "generation":

http://www.oxygenxml.com/forum/files/sa ... zation.zip

You can integrate the plugin in the DITA OT publishing engine used by Oxygen:

https://www.oxygenxml.com/doc/versions/ ... ation.html

In the plugin folder there is also a "sampleTask.dita" sample file which when opened should be valid if the plugin was integrated.

Regards,
Radu

Re: Subject Schemes and Non-Default Profiling Attributes

Posted: Tue Nov 12, 2019 2:06 am
by chrispitude
You can also use the following utility to create attribute plugins for you:

https://github.com/chrispy-snps/DITA-plugin-utilities

Here are two attributes I use in our books (style and paginate), along with a docshell that includes them:

Code: Select all

<plugin directory="./com.mine.docshell" uri_prefix="com:mine:docshell">

 <attributedomain filename="styleAttMod.rng" domain="style">
  <specialize attribute="style" from="base" model="(bold|italic|wide|smallfonts|tight)*"/>
 </attributedomain>

 <attributedomain filename="paginateAttMod.rng" domain="paginate">
  <specialize attribute="paginate" from="base" model="(keep-with-next|keep-with-previous|top-of-page)*"/>
 </attributedomain>

 <topicshell filename="myTopicShell.rng">
  <title>My Topic</title>
  <root_element>topic</root_element>
  <include_domains>topic hi-d style paginate</include_domains>
 </topicshell>

</plugin>