Page 1 of 1

Having an issue with keys in some bookmeta elements of bookmaps

Posted: Mon Jul 18, 2016 11:18 pm
by BobbyG66
I recently started using conkeyrefs for some of our variable terms.
I am now trying to use them for some bookmeta content in bookmaps, but ran into an issue.
It seems like you cannot use them in the

Code: Select all

<postalcode>
and

Code: Select all

<contactnumber>
elements.

Is there a solution or workaround to this?
I tried conrefs, but they are not allowed either.

Thanks
BG66

Re: Having an issue with keys in some bookmeta elements of bookmaps

Posted: Tue Jul 19, 2016 8:25 am
by Radu
Hi,

I tried to validate with both the DITA 1.2 DTDs and the DITA 1.3 DTDs a bookmap structure like this:

Code: Select all


<bookmap id="taskbook">
<booktitle>
<booklibrary>Retro Tools</booklibrary>
<mainbooktitle>Product tasks</mainbooktitle>
<booktitlealt>Tasks and what they can do</booktitlealt>
</booktitle>
<bookmeta>
<author>Howe Tuduit</author>
<authorinformation>
<organizationinfo>
<addressdetails><locality><postalcode conkeyref="..."/></locality></addressdetails>
<contactnumbers>
<contactnumber conkeyref="..."/>
</contactnumbers>
</organizationinfo>
</authorinformation>
and the @conkeyref attribute seemed to be allowed on both postalcode and contactnumber.
Are you using a specialization of the DITA standard?
Could you give me an example with how your DITA Map looks like?

Regards,
Radu

Re: Having an issue with keys in some bookmeta elements of bookmaps

Posted: Tue Jul 19, 2016 2:42 pm
by BobbyG66
Radu,

We may have some customization's, will have to check that.
The problem may be the way we are using the conkyref's.
We are inserting a <term> element to the <postalcode> element, where it looks like you are adding the conkeyref to the <postalcode> element.

When I try your method, I get a
Conref was not expanded
error message.
The source element "postalcode" with class value "+ topic/ph xnal-d/postalcode " is not a generalization of target element "term" with class value "- topic/term "
Here is our code:

Code: Select all

    <bookmeta>
<authorinformation>
<organizationinfo>
<namedetails>
<organizationnamedetails>
<organizationname><term
conkeyref="r_brandnames_variables/ph_organizationname"
/></organizationname>
</organizationnamedetails>
</namedetails>
<addressdetails>
<thoroughfare><term conkeyref="r_brandnames_variables/ph_thoroughfare"
/></thoroughfare>
<locality>
<localityname><term conkeyref="r_brandnames_variables/ph_localityname"/>
</localityname>
<postalcode>12345</postalcode>
</locality>
<administrativearea><term
conkeyref="r_brandnames_variables/ph_administrativearea"/>
</administrativearea>
</addressdetails>

Re: Having an issue with keys in some bookmeta elements of bookmaps

Posted: Tue Jul 19, 2016 4:42 pm
by Radu
Hi,

Thanks for the details.
Actually the particular error message you receive means that you have a postalcode element with a conkeyref which points to a term element located in another topic. These elements are not compatible. You cannot make a conkeyref from "term" to "postalcode" or from "postalcode" to "term".
Usually with DITA you can make a conkeyref or conref from one type element to the same type of element. So you can make a conref from a <term> to a <term>. You can also make a conref from a generalization of an element to a particularization of an element. So you can make a conref for example from a <ph> element to a <b> element. The <ph> element has the DITA class - topic/ph and <b> has the class + topic/ph hi-d/b meaning that bold is a specialization of phrase so you can conref from phrase to bold.

Regards,
Radu

Re: Having an issue with keys in some bookmeta elements of bookmaps

Posted: Fri Jul 22, 2016 4:41 pm
by BobbyG66
Thanks Radu!

I was not able to get it to work with a conkeyref on the postalcode element, but did get it to work by inserting a <keyword> element inside the <postalcode> element.
I applied the conkeyref to the <keyword> element.

BG66