resolve conref with href in between two task xmls

Questions about XML that are not covered by the other forums should go here.
GKlimeck
Posts: 14

resolve conref with href in between two task xmls

Mon Mar 13, 2017 10:31 pm

Hi there,
I would like to use <conref> to reuse content from one step of a task document in a second task document. The conref includes an <xref href.

I read on https://docs.oasis-open.org/dita/dita/v ... opics.html
to use <xref href="#./elementid" />
The #. is supposed to resolve the href when used in another task.
Both task documents are in the same directory.

When I transform the first task, it transforms to pdf and xhtml, but I get the following error.
Description: [DOTX032E]: Unable to retrieve link text from target: 't_add-a-subcomponent-to-a-product-by-building-phase.xml#task_ixz_45x_dz/step_hqb_kn2_ly'. If the target is not accessible at build time, or does not have a title, provide the link text inside the reference.

When I transform the second task, the conref works, but the <xref href doesn't work, and I get the following errors:
DITA PDF
Description: [DOTX032E]: Unable to retrieve link text from target: 'oxy_ex-1/topics/t_add-a-subcomponent-to-a-product-by-building-phase.xml#task_ixz_45x_dz/step_hqb_kn2_ly'. If the target is not accessible at build time, or does not have a title, provide the link text inside the reference.
Description: [DOTX032E]: Unable to retrieve link text from target: 't_add-a-subcomponent-to-a-product-by-building-phase.xml#task_ixz_45x_dz/step_hqb_kn2_ly'. If the target is not accessible at build time, or does not have a title, provide the link text inside the reference.

DITA XHTML
Description: [DOTX032E]: Unable to retrieve link text from target: 't_add-a-subcomponent-to-a-product-by-building-phase.xml#task_ixz_45x_dz/step_hqb_kn2_ly'. If the target is not accessible at build time, or does not have a title, provide the link text inside the reference.

I would like to send you the task, info, but maybe this post is already too long.
I appreciate your help,
Thank you.
GKlimeck
Posts: 14

Re: resolve conref with href in between two task xmls

Tue Mar 14, 2017 6:28 pm

Continuing the question posed earlier, the two tasks between which I would like to use conref are:

In the first task <task id="task_fs5_m5x_dz">
for which the xml file is called t_add-a-subcomponent-to-a-product-by-building-phase.xml
I have the following. Notice the element <xref href="#./step_hqb_kn2_ly" type="step"/>

Code: Select all

         <step importance="optional" id="step_hqb_kn2_ly">
            <cmd> </cmd>   
              <step>
            <cmd> </cmd>
            <choices id="choices_b11_vxp_fz">
               <choice>Select  if: <ul>
                     <li></li>
                     <li>Example: See step
                           <xref href="#./step_hqb_kn2_ly" type="step"/>.
                        </p></li>
                  </ul>
               </choice>
               <choice>Clear if: <ul>
                     <li></li>
                  </ul>
               </choice>
            </choices>
         </step>

In the second task <task id="task_ixz_45x_dz"> I have:

Code: Select all

         <step importance="optional" id="step_hqb_kn2_ly">
            <cmd> </cmd>
         <step importance="optional" id="step_hqb_kn2_ly">
         <step>
            <cmd> </cmd>
            <choices
               conref="../topics/t_add-a-subcomponent-to-a-product-by-building-phase.xml#task_fs5_m5x_dz/choices_b11_vxp_fz">
               <choice/>
            </choices>
         </step>

Your help is appreciated.
Thank you!
Radu
Posts: 5088

Re: resolve conref with href in between two task xmls

Thu Mar 16, 2017 12:45 pm

Hi,

Sorry for the delay.
Your code samples are not 100% clear for me. Could you send some sample DITA files via email ? (support@oxygenxml.com).

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

Re: resolve conref with href in between two task xmls

Fri Mar 17, 2017 2:38 pm

Hi,

Thanks for the samples, in my opinion what you are trying is correct and it should work according to the specs.
I tried to publish using the DITA OT 2.x bundled with Oxygen 18.1 to plain XHTML and indeed I can reproduce the problem.
After this I tried publishing with DITA OT 2.4.4 (which will be bundled with Oxygen 19.0) and it seems to work better with it.
We are planning to release Oxygen 19.0 in a couple of weeks. Actually we just released an announcement with Oxygen 19 beta kits so you may want to test this for yourself:

https://www.oxygenxml.com/pipermail/oxygen-user/2017-March/005877.html

You can also separately download and install DITA OT 2.4.4 from the DITA OT project:

http://www.dita-ot.org/download

and use it with Oxygen:

https://www.oxygenxml.com/doc/versions/18.1/ug-editor/topics/dita-ot-install-plugin.html

but if you want to publish to WebHelp you would need to manually install our WebHelp plugins in it:

https://www.oxygenxml.com/doc/versions/18.1/ug-editor/tasks/integrating-webhelp-plugin-with-dita-ot.html

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
GKlimeck
Posts: 14

Re: resolve conref with href in between two task xmls

Fri Mar 17, 2017 6:10 pm

Hi Radu,
Thank you for examining this problem.

Is there a better way to do this?
<conkeyref>?
Exterior file that holds all <conref>s?

How would you accomplish reuse of content that contains (xref href...>?
Best Regards,
GKlimeck
Radu
Posts: 5088

Re: resolve conref with href in between two task xmls

Mon Mar 20, 2017 11:18 am

Hi,

In general reuse of content which has links is safe because those links usually point to content located in other topics.
It's only this case when the links need to point to content in the same topic where problems arise.
Links in the same topic are usually seldom used, actually as a best practice in general it is recommended to avoid internal links.
The DITA 1.3 "#./elementID" notation was created just for this case, because previous there was no other way to handle this.
So I do not have another workaround for this.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
GKlimeck
Posts: 14

Re: resolve conref with href in between two task xmls

Thu Mar 23, 2017 3:57 pm

Thank you, Radu. I look forward to oxygen 19.0.

Your comment that internal links are not "best practice" stands out, and I would like to learn more. There is prodigious instruction on the oxygen and the oasis websites about how to reference links to internal steps, list items, tables, figures, etc. A task step very logically references another task step when necessary, such as when an if-then statement is made. Why do you say this is not best practice?

Best Regards,
GKlimeck
Radu
Posts: 5088

Re: resolve conref with href in between two task xmls

Thu Mar 23, 2017 4:42 pm

Hi,

In general links inside the topic content should be avoided and moved to the end of the topic (if so, they can then be defined in relationship tables in the DITA Map). Here's a small topic from the DITA Style Guide written by dr Tony Self:

https://www.oxygenxml.com/dita/styleguide/webhelp-feedback/#Artefact/Cross_Referencing/c_Avoiding_Cross_References.html

Links are disruptive. The end user tries to complete a step because they want to get something done and they see a link to another step. Should they follow that link or read on-wards through the rest of the steps? Whenever possible you can conref content, for example instead of linking to a paragraph you can sometimes conref to it.
Also if the generated HTML page is very small, without vertical scroll, the link will not jump anywhere.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
GKlimeck
Posts: 14

Re: resolve conref with href in between two task xmls

Thu May 11, 2017 6:05 pm

Radu wrote:Hi,

Thanks for the samples, in my opinion what you are trying is correct and it should work according to the specs.
I tried to publish using the DITA OT 2.x bundled with Oxygen 18.1 to plain XHTML and indeed I can reproduce the problem.
After this I tried publishing with DITA OT 2.4.4 (which will be bundled with Oxygen 19.0) and it seems to work better with it.
We are planning to release Oxygen 19.0 in a couple of weeks. Actually we just released an announcement with Oxygen 19 beta kits so you may want to test this for yourself:

https://www.oxygenxml.com/pipermail/oxygen-user/2017-March/005877.html

You can also separately download and install DITA OT 2.4.4 from the DITA OT project:

http://www.dita-ot.org/download

and use it with Oxygen:

https://www.oxygenxml.com/doc/versions/18.1/ug-editor/topics/dita-ot-install-plugin.html

but if you want to publish to WebHelp you would need to manually install our WebHelp plugins in it:

https://www.oxygenxml.com/doc/versions/18.1/ug-editor/tasks/integrating-webhelp-plugin-with-dita-ot.html

Regards,
Radu


Hello,
I downloaded dita-ot-2.4.4 directory as you directed above.
The Oxygen page https://www.oxygenxml.com/doc/versions/18.1/ug-editor/topics/dita-ot-install-plugin.html
does not clearly tell me where to put dita-ot-2.4.4

There are many "pluggins" directories. Which one?
Can you send me an address such as:
C:\Program Files\Oxygen XML Editor 18\frameworks\dita\DITA-OT2.x\pluggins
or this:
C:\Program Files\Oxygen XML Editor 18\frameworks\dita\DITA-OT\pluggins
or this:
C:\Program Files\Oxygen XML Editor 18\frameworks\dita\plugin

Or do I follow this instruction:
Note: If the plugin is only supported in DITA-OT 2.3.3 version, make sure that you copy the plugin in the [OXYGEN_INSTALL_DIR]/frameworks/dita/DITA-OT2.x directory.

Also, do I need to rename the directory from dita-ot-2.4.4 to dita-ot2.4.4 ? (Remove the dash)

Thank you for your help.
GKlimeck
Radu
Posts: 5088

Re: resolve conref with href in between two task xmls

Tue May 16, 2017 9:01 am

Hi,

We released Oxygen 19.0 about a month ago so you could try to use it as it is.
Or if you download the latest DITA OT from the DITA Open Toolkit website you should place that DITA OT folder anywhere on your disk where you have full write access.
Then copy from the folder C:\Program Files\Oxygen XML Editor 18\frameworks\dita\DITA-OT2.x\plugins all the plugins starting with "com.oxygenxml" to the equivalent place in your custom DITA OT folder, instruct Oxygen in the Preferences->DITA page to use your DITA OT folder as the default DITA OT, then run the integrator (in the Transformation Scenarios view there is a drop down button allowing you to show all transformation scenarios, then search for "integrator" and run the scenario).

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
GKlimeck
Posts: 14

Re: resolve conref with href in between two task xmls

Fri May 26, 2017 11:58 pm

Hi Radu,
I successfully loaded DITA-OT-2.4.4. Thank you.

I saw that 2.4.6 is out, so I tried it. However, on a transformation I get the following error.
For this line on an xml:
<li><xref href="#concept_uvf_lhm_nz/li_jyc_xzv_tz" type="li"><text>Estimating Integration Type</text></xref></li>
The error is:
Unexpected element "text". The content of the parent element type must match "(boolean|keyword|apiname|option|parmname|cmdname|msgnum|varname|wintitle|ph|b|i|sup|sub|tt|u|codeph|synph|filepath|msgph|systemoutput|userinput|menucascade|uicontrol|q|term|abbreviated-form|tm|state|data|data-about|foreign|unknown|image|desc)".

I switched back to DITA-OT-2.4.4. Are you aware of this bug in 2.4.6?
Best Regards-
Radu
Posts: 5088

Re: resolve conref with href in between two task xmls

Mon May 29, 2017 9:30 am

Hi,

I downloaded and unpacked DITA OT 2.4.6, then in the Oxygen Preferences->DITA page I pointed to it as the default used DITA OT distribution.
I had a small DITA Map with a small topic in which I have an ordered list looking like this:

Code: Select all

<ol id="ol_en1_ky1_b1b">
 <li id="li_jyc_xzv_tz">ONE MORE</li>
 <li><xref href="#introduction/li_jyc_xzv_tz" type="li"><text>Estimating Integration Type</text></xref></li>
</ol>


Validation works for the topic. Also publishing my small sample to XHTML works.
Maybe you should also try to publish a small DITA project, if it works then somehow your larger project has something in it which breaks the publishing.
If you can zip the larger project and send it to us:

https://www.oxygenxml.com/techSupport.html

we could have a look at it.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
GKlimeck
Posts: 14

Re: resolve conref with href in between two task xmls

Wed May 31, 2017 9:06 pm

Hi Radu,

I sent you (support@oxygenxml.com) the xml of one of the files that was generating the <text> error on transformation with DITA OT 2.4.6.

Problem with DITA OT upgrade (2.x to 2.4.4)
Since 2.4.6 was not working, on Friday 5/26 I switched from DITA OT 2.x to DITA OT 2.4.4
I followed the instructions you sent on May 11 in this thread. I'm running Oxygen 18.1.

However, an issue with the DITA XHTML transformation with DITA OT 2.4.4 has appeared. The SAME issue was reported in
post38784.html?hilit=output%20directory%20${cfd}/out/#p38784
The resolution of that thread was not really conclusive.

On the "Edit DITA Scenario" window in the Output tab, the following are set:
Base directory: ${cfd} -------------------------------- C:\Knowledge\Pipeline\Content\topics
Temporary Files Directory: ${cfd}/temp/topic-xhtml
Output directory: ${cfd}/out/topic-html

But the DITA XHTML transformation is creating the following subdirectory and putting the html file into it:
${cfd}/out/topic-html/topics/ ---------------------- C:\Knowledge\Pipeline\Content\topics\out\topic-xhtml\topics

Instead of putting the files into the appointed output directory, the transformation is creating a subdirectory /topics in the Output directory (note the subdirectory has the same name as the Base directory).

At the same time, the transformation is putting 70 out of my 110 other html files into this new subdirectory - files for which I did not initiate a transformation. These files are being "created" instantaneously - much faster than when I run transformations for 70 files. This makes me wonder where the files are originating. I don't know why it is putting 70 instead of all 110 files.

When I delete the new subdirectory and rerun the transformation, the transformation again creates the subdirectory.
When I switch back to DITA OT 2.x, the problem disappears, and output files go to the appointed output directory.
I verified my dita map - no errors.

Do you know why my html files are not going to the correct Output directory when I try to upgrade the DITA OT?

Best Regards,
GKlimeck

Return to “General XML Questions”

Who is online

Users browsing this forum: No registered users and 0 guests