Page 1 of 1

Reusing a range of table rows with conrefend

Posted: Wed May 02, 2012 3:59 pm
by susannecm
I am trying to reuse a range of table rows with conref and conrefend.
I can reuse a single row, the source code then looks similar to this:

Code: Select all

<row conref="#top__20120424115510670/row_objinsp_ID">
<entry/>
</row>
If I add the conrefend attribute like this, I get an error.

Code: Select all

<row conref="#top__20120424115510670/row_objinsp_ID" conrefend="#top__20120424115510670/row_objinsp_Name">
<entry/>
</row>
The error message is:
Problem when constructing conref range between "top__20120424115510670/row_objinsp_ID" and "top__20120424115510670/row_objinsp_Name" because: Conrefend target element is not a sibling of the conref target element.
The error message is, I think, misleading, because the row elements are actually siblings.
Anyway, do I have to reference all the rows separately, or is there a way to refer to a range of rows?

Thanks a lot for your help

Susanne

Re: Reusing a range of table rows with conrefend

Posted: Wed May 02, 2012 4:43 pm
by Radu
Hi Susanne,

What exact Oxygen version are you using?
The error you reported is probably displayed in the Author page.
Did you try to also publish the DITA Map to PDF using the standard DITA Open Toolkit transformation scenarios provided by Oxygen?

I tested using Oxygen 13.2 with a small topic like this:

Code: Select all

<topic id="top__20120424115510670">
<title>Introduction</title>
<body>
<table frame="all" id="table_zlx_nhw_cg">
<title>Table 1</title>
<tgroup cols="2">
<colspec colname="c1" colnum="1" colwidth="1.0*"/>
<colspec colname="c2" colnum="2" colwidth="1.0*"/>
<thead>
<row>
<entry>1</entry>
<entry>2</entry>
</row>
</thead>
<tbody>
<row id="row_objinsp_ID">
<entry>3</entry>
<entry>4</entry>
</row>
<row>
<entry>5</entry>
<entry>6</entry>
</row>
<row id="row_objinsp_Name">
<entry>7</entry>
<entry>8</entry>
</row>
<row conref="#top__20120424115510670/row_objinsp_ID"
conrefend="#top__20120424115510670/row_objinsp_Name">
<entry/>
</row>
</tbody>
</tgroup>
</table>
</body>
</topic>
And it was displayed OK in the Author page + the publishing using the DITA Open Toolkit was succesful.

I think that the problem in your case might be the fact that the <row> on which you set the starting ID "row_objinsp_ID" is actually located in the table header "<thead>" and thus is not a sibling of the other rows (although the rows are rendered as a single table).

The publishing to PDF should also not render the conrefend correctly in such cases because the conrefend specification states:

http://docs.oasis-open.org/dita/v1.2/os ... ibute.html
Processors will resolve the range by pulling in the start target and following sibling DOM nodes across to and including the end target.
So all table <rows> inside the conref range should be direct siblings of the same parent XML tag.

Regards,
Radu

Re: Reusing a range of table rows with conrefend

Posted: Wed May 02, 2012 8:59 pm
by susannecm
Hi Radu,

I took your sample and tried again in my files. I don't know exactly what the difference is, but it's working now. I may have added an empty row to the table head by mistake but I cannot reproduce the situation.

Thanks a lot for your help ...

And just for the records: I have version 13.1, the error message was displayed in the Author view.

Best regards

Susanne