Highlighted

Problems inserting cross references

Community Beginner ,
May 03, 2018

Copy link to clipboard

Copied

Please can someone help, I am having problems inserting a cross reference.

I am using Structred Framemaker version 10.

I have gone to the element that I want to use for the cross reference and selected Assign ID to element. I know it does assign an element as I did this twice and it prompted me that one was already assigned and did I want to replace it.

Then, when I click the text that I want to use to refer to this section and select the Special menu – Cross reference, the ID is not displayed in Element data list in the Dita Cross-Reference dialog: What am I doing wrong?

crossref.png

TOPICS
Structured

Views

371

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

Problems inserting cross references

Community Beginner ,
May 03, 2018

Copy link to clipboard

Copied

Please can someone help, I am having problems inserting a cross reference.

I am using Structred Framemaker version 10.

I have gone to the element that I want to use for the cross reference and selected Assign ID to element. I know it does assign an element as I did this twice and it prompted me that one was already assigned and did I want to replace it.

Then, when I click the text that I want to use to refer to this section and select the Special menu – Cross reference, the ID is not displayed in Element data list in the Dita Cross-Reference dialog: What am I doing wrong?

crossref.png

TOPICS
Structured

Views

372

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
May 03, 2018 0
Explorer ,
May 03, 2018

Copy link to clipboard

Copied

Is the element that you're referencing in a different file? If so, make sure that the other file is open and then select it from the drop-down menu (where it says "Current" in your screenshot). Also make sure that you have selected the correct element tag in the "Element Tag" field.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
May 03, 2018 0
Community Beginner ,
May 04, 2018

Copy link to clipboard

Copied

No the element is in the current file that I am using; I just want to jump to another part of it. I don't understand why it's not listed in this dialog as I've marked it as a cross reference.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
May 04, 2018 0
Explorer ,
May 04, 2018

Copy link to clipboard

Copied

I took another look at it this morning; it looks like the <choice> element cannot have an xref tag applied. The xref dialog won't let you insert invalid structure. You can, however, use a <ph> element within your <choice> element, assign an ID, and then apply an xref to that.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
May 04, 2018 0
Community Beginner ,
May 04, 2018

Copy link to clipboard

Copied

Ah ok thank you, I will take a look and get back to you if I need further assistance.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
May 04, 2018 0
Community Beginner ,
May 04, 2018

Copy link to clipboard

Copied

Ok I just tried inserting a ph element and the same thing gets displayed in the dialog. I also notice that an xref is not selectable from the list. So, I still can't insert the cross reference.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
May 04, 2018 0
Explorer ,
May 04, 2018

Copy link to clipboard

Copied

I might not be reading the scenario correctly. Let me start over.

Let's assume that the info to which you want to refer is called "Browse" and it is in some other area of your document, as an individual <choice> element within a <choices> element. I noticed that, at least with my setup (DITA 1.3 FM 2017), a <choice> element automatically gets a <p> element assigned. So I might have steered you a bit wrong with the <ph> element, and I apologize for that. You have assigned an id to that element, so in the end it all looks like this:

<choices><choice id="foo"><p>Browse</p></choice></choices>

That should be all you need at this end of the cross-reference.

Now, elsewhere in your document, you want to xref to this <choice> element.

Looking at it this way, I think your problem might be that the location where you want to put the xref might be invalid in the structure. Let's say it's a <choice> element again, which cannot contain an <xref> element, because that is invalid structure. <xref> is invalid for a lot of elements, and you won't see the <xref> element as an option when it's not valid at your current location.

So what you're trying to do is something like this (which is invalid):

<xref><choice>...</choice></xref>

And what I originally meant is that you should try is something like this:

<choice><ph><xref></xref></ph></choice> (edited this because I did it incorrectly before)

This was assuming that there isn't already another valid element like <p> inside the <choice> element. If that's the case, you can wrap the <xref> element around that instead.

What helps me a lot is to work with the Element Boundaries turned on so I can quickly see what elements are in use.

Here's an example with element boundaries on. I assigned an id to the <choice>Here is some text</choice> element, and successfully put in the <xref> right below it, as the <cmd> element is a valid place for an <xref> element. Where <cmd> not valid for an xref, but I still wanted to put one there, I could use the <ph> element.

xref.JPG

I hope this helps. Sorry for the earlier confusion.

edit to add:

Here's an example using the <ph> element:

zref2.JPG

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
May 04, 2018 0
Enthusiast ,
May 04, 2018

Copy link to clipboard

Copied

It may be the way you are describing it but maybe you have the process back-to-front?

In your last message you say that the xref is not available in the list, which list do you mean? The element catalog, or the list of elements in the DITA cross reference dialog? I wouldn't expect to link to an xref although it's not impossible...

Could you tell me the element that you want to link to and the element that will contain the xref.

I have just tried this on FM10 and while not as intuitive and easy as the non-DITA xref system it all seems to work as expected.

ohne_hosen​, you say that the choice element cannot 'have an xref element applied'. Well that's not strictly true as it can be the target for a cross-reference (because it has an ID attribute) and it can contain an xref too.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
May 04, 2018 0
Explorer ,
May 07, 2018

Copy link to clipboard

Copied

I had written that a choice element cannot be wrapped in an xref element, then in hasty editing I changed it, but you're right. A choice element CAN contain an xref element.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
May 07, 2018 0
Community Beginner ,
May 08, 2018

Copy link to clipboard

Copied

Hi Ian,

I can see that the fm-xref element is selectable from the Dita Cross reference dialog, but when I click it it highlights the External Xref button. I do not want to add an external xref. I want to assign a xref to a place within this Framemaker document. I have already assigned an ID that I want the text to refer to within the same Framemaker file, and therefore I would expect it to appear in the Element Data [id | content] area of the Dita Cross Reference dialog. What I can't understand is that I have assigned an ID to the text that I want to reference, but I can't select it anywhere.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
May 08, 2018 0
Enthusiast ,
May 08, 2018

Copy link to clipboard

Copied

I see what's going wrong. You should be inserting the xref element from the element catalog into the correct location in your existing text.  This will then open the DITA Cross-Reference dialog. Once in the dialog you can forget about the xref or fm-xref elements. You just need to locate the 'target' element that you want to reference - the element that needs an id value.

In this trivial example, I have inserted several steps, each containing a <cmd> element. The second step contains the text 'This is the target for an xref'. It also has an id value.

structureView.png.

Further down the structure inside the <example> element I have added the text 'This is an example: ' Then selected xref from the element catalog.

xrefs.png

In the dialog you can see that the <cmd/> element is the target and the associated structure is show next to it. In the fm-xref, the idref attribute's value is the same as the id value of the target <cmd/> element.

The only reason that my Element Tags list shows the fm-xref is because I added an id value (x2) otherwise it would not be in the list. You wouldn't normaly make a cross-reference to an fm-xref (Although I'm sure there are reasons to do it sometimes...).

I hope that helps

Ian

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
May 08, 2018 0
Community Beginner ,
May 08, 2018

Copy link to clipboard

Copied

Hi Ian,

I tried exactly what you said but I still see no elements when I select the cmd element tag. Maybe it is the way my DTD has been set up.

I will continue to investigate, many thanks for your help.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
May 08, 2018 0