Validation error when conref pushreplacing specialization of an element

Having trouble installing Oxygen? Got a bug to report? Post it all here.
jorahood
Posts: 13
Joined: Thu May 26, 2011 2:50 am

Validation error when conref pushreplacing specialization of an element

Post by jorahood »

I have specialized <title> to create a <customtitle>, the use of which is to conref pushreplace in to the title when the correct audience is specified. In Author view though, I'm getting a validation error that says
Conref was not expanded:
The source element "customtitle" with class value "+ topic/title kuali-kms-d/customtitle " is not a generalization of target element "title" with class value "- topic/title "
It seems to me that this message would make sense if I was not doing pushreplace because I shouldn't be able to conref a more general element (title) in place of the specialized element (customtitle). But since I'm pushreplacing, I'm actually replacing the more general element with the specialized one so I don't think the validation error is correct. Could you add a check for conaction="pushreplace" to this validation error so that it does not come up in this case?

Thanks,
Andy
jorahood
Posts: 13
Joined: Thu May 26, 2011 2:50 am

Re: Validation error when conref pushreplacing specialization of an element

Post by jorahood »

This is with Oxygen 13.1
Radu
Posts: 9059
Joined: Fri Jul 09, 2004 5:18 pm

Re: Validation error when conref pushreplacing specialization of an element

Post by Radu »

Hi Andy,

You are correct according to the DITA 1.2 specification:

http://docs.oasis-open.org/dita/v1.2/os ... nattribute
In the descriptions below, the word target always refers to the element referenced by a conref attribute.
An element pushed using conref must be of the same type as, or more specialized than, its target. If the pushed element is more specialized than the target, then it should be generalized when the conref is resolved. This ensures that the content will be valid in the target topic.
We will rectify this problem in Oxygen 14 (should probably be released in the summer of 2012).

By the way, does the publishing using the DITA OT work for you?
I made a small example in which I had a small

Code: Select all

<ph id="ph_k3n_x1b_ff"/>
in a DITA Topic which was then referenced in another topic by:

Code: Select all

<b conref="care.xml#care/ph_k3n_x1b_ff" conaction="pushreplace">
The publishing did not properly replace the target until I renamed the <ph> to <b>.
The error I received from the DITA OT was:
[conref-push] [DOTJ043W][WARN] There is no correct target "#care/ph_k3n_x1b_ff" in "D:\projects\eXml\samples\dita\flowers\temp\topics\care.xml" specified for the conref push action. Please make sure that the target exists and is not filtered out or the target type matches.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Radu
Posts: 9059
Joined: Fri Jul 09, 2004 5:18 pm

Re: Validation error when conref pushreplacing specialization of an element

Post by Radu »

Hi Andy,

Indeed regarding the publishing part, DITA OT 1.5.4 which is shipped with Oxygen 13.2 added some validation between target and source, but the validation code is not correct.
I added a bug for it:

https://sourceforge.net/tracker/?func=d ... tid=725074

So if you want publishing to work for your case you should continue using DITA OT 1.5.3.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Radu
Posts: 9059
Joined: Fri Jul 09, 2004 5:18 pm

Re: Validation error when conref pushreplacing specialization of an element

Post by Radu »

Hi Andy,

Oxygen 14.0 which was released a couple of weeks ago fixed the problem reported in the Author page.
As for the publishing problem, probably Oxygen 14.1 will come with DITA OT 1.6.1 which will fix this second problem.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Post Reply