Subject Schemes and Non-Default Profiling Attributes

Questions about XML that are not covered by the other forums should go here.
dgallo
Posts: 90
Joined: Tue Mar 31, 2015 10:43 pm

Subject Schemes and Non-Default Profiling Attributes

Post 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>
dgallo
Posts: 90
Joined: Tue Mar 31, 2015 10:43 pm

Re: Subject Schemes and Non-Default Profiling Attributes

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

Re: Subject Schemes and Non-Default Profiling Attributes

Post 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
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
dgallo
Posts: 90
Joined: Tue Mar 31, 2015 10:43 pm

Re: Subject Schemes and Non-Default Profiling Attributes

Post by dgallo »

Thanks. Is it possible you could send an email plugin that is described in topic12861.html#p37076?
Radu
Posts: 9054
Joined: Fri Jul 09, 2004 5:18 pm

Re: Subject Schemes and Non-Default Profiling Attributes

Post 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
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
chrispitude
Posts: 907
Joined: Thu May 02, 2019 2:32 pm

Re: Subject Schemes and Non-Default Profiling Attributes

Post 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>
Post Reply