[oXygen-user] Automatically add @type when a topicref is added to a DITA map

Oxygen XML Editor Support support at oxygenxml.com
Thu Aug 16 08:41:02 CDT 2012


Hi Yves,

Some comments:

> I then have to remember to add type="concept" because the DITA Open Toolkit also uses this information for the "generated labels" for related topics (using reltable). For example, if you have related tasks and you have specified type="task", the generated label will read "Related tasks", which is good, because this helps the reader to navigate to the correct type of topic. If you didn't specify the @type attribute, the generated label will read "Related information", which is too vague for me.

Maybe this happens for you because the reltable has the header defined as:

>     <relheader>
>       <relcolspec type="topic"/>
>       <relcolspec type="topic"/>
>     </relheader>

but if you avoid setting the @type on the header like:

>     <relheader>
>       <relcolspec/>
>       <relcolspec/>
>     </relheader>

it seemed to me (in the samples I tried) that the DITA OT detected the 
type of the topic from the actual content.

> Maybe we can cross-post this conversation to the dita-users group and see what other people think?

That's a good idea, if you also want to post this on the dita-users list 
you can also link to our users list in order for people to see the 
already existing discussion:

> http://www.oxygenxml.com/pipermail/oxygen-user/2012-August/004339.html

Regards,
Radu

Radu Coravu
<oXygen/>  XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com

On 8/16/2012 3:23 PM, Yves Barbion wrote:
> Hi Radu
>
> I agree that, if the topic type changes, you don't have to remember to
> update @type on the topicref. However, I don't think that topic types
> changes that often, also because it's kinda hard to change topic types
> afterwards, because you also have to change the child elements, for
> example conbody and refbody. In my experience, it's easier to create a
> new topic and then just copy/paste the content into the <body> (or
> conbody, taskbody, refbody) of that topic.
>
> My use case:
>
> I'm not using a CMS. I add topics to my ditamap in various ways. The
> easiest one is to just create my topics first and then select the files
> in Windows Explorer and drag them into my ditamap. I then have to
> remember to add type="concept" because the DITA Open Toolkit also uses
> this information for the "generated labels" for related topics (using
> reltable). For example, if you have related tasks and you have specified
> type="task", the generated label will read "Related tasks", which is
> good, because this helps the reader to navigate to the correct type of
> topic. If you didn't specify the @type attribute, the generated label
> will read "Related information", which is too vague for me.
>
> Maybe we can cross-post this conversation to the dita-users group and
> see what other people think?
>
> Kind regards
>
> Yves
>
>
>
> On Thu, Aug 16, 2012 at 2:02 PM, Oxygen XML Editor Support
> <support at oxygenxml.com <mailto:support at oxygenxml.com>> wrote:
>
>     Hello Yves,
>
>     I consider that it's more flexible not to add the @type value when a
>     topic ref is inserted.
>     In this way, if the type of the referenced topic changes (it was a task
>     and then you change it to be a concept) then you do not need to remember
>     to also update the <topicref>.
>     What is your usecase? Do you have a CMS which requires the @type to be
>     added?
>
>     The DITA 1.2 specs is very vague:
>
>      > When a referencing element is first added to or updated in a
>     document, DITA aware editors may, but are not required to, set the
>     type attribute value based on the actual type of a referenced DITA
>     topic.
>
>     Regards,
>     Radu
>
>     Radu Coravu
>     <oXygen/>  XML Editor, Schema Editor and XSLT Editor/Debugger
>     http://www.oxygenxml.com
>
>     On 8/16/2012 1:07 PM, Yves Barbion wrote:
>      > Hi group
>      >
>      > When I add a topicref to a DITA map, I see that the @type
>     attribute is
>      > left unspecified. It would be nice if the @type attribute would then
>      > automatically be filled in, depending on the information type of the
>      > topic. For example, when I add a topicref to a task topic, the @type
>      > attribute would automatically be type="task".
>      >
>      > Is this possible or is this a new feature request?
>      >
>      > Thanks
>      >
>      > --
>      > Yves Barbion
>      > www.scripto.nu <http://www.scripto.nu> <http://www.scripto.nu>
>      >
>      >
>      > _______________________________________________
>      > oXygen-user mailing list
>      > oXygen-user at oxygenxml.com <mailto:oXygen-user at oxygenxml.com>
>      > http://www.oxygenxml.com/mailman/listinfo/oxygen-user
>      >
>     _______________________________________________
>     oXygen-user mailing list
>     oXygen-user at oxygenxml.com <mailto:oXygen-user at oxygenxml.com>
>     http://www.oxygenxml.com/mailman/listinfo/oxygen-user
>
>
>
>
> --
> Yves Barbion
> www.scripto.nu <http://www.scripto.nu>


More information about the oXygen-user mailing list