Crossreference to text part of element.
Copy link to clipboard
Copied
We have structured documents and we make a crossrefences to elements inside document.
We know how to create reference to element using its ID.
But we want also to make a reference to text part of elements.
See highlighted parts in picture below:
But this text part has no ID attribute. So how can we make a crossreference to this part of element?
Thanks for any info.
Copy link to clipboard
Copied
Hi,
actually there are several ways, you can achieve this.
As long as you don't produce XML and stay in a binary FM document, you could always set your cross-reference to a certain paragraph format (which just looks like the surrounding text).
When you've got influence on the EDD/DTD, you could either add an ID to the <Para> element or (if those paragraphs are lengthy) you could define either some new inline element or set a specific attribute value to an inline element (such as Emph).
If none of the above is the case - as in you have no influence on the EDD/DTD and the document is going to XML - you have no real way to do that.
Either way - you'll need to put some thought into this. Is it really necessary to link there exactly? Or is this just out of some more obscure reason? If your paragraphs are so lengthy, that a link to the para element does not well, you maybe should rethink your way to use paragraphs anyway.
Cheers
Alex
Copy link to clipboard
Copied
Hello.
We need to create crossref to this text parts. We have function which validate structure and this text part are sometimes invalid so we create report with crossref to such a text.
We have IDs for Para element, but we want a link to text and not so the Para element.
Copy link to clipboard
Copied
Do you need this xref to be valid in XML for any editor? Or will the report always be in FrameMaker? If it's in FrameMaker, you can insert an xref marker in the text, and make xrefs to that marker in your report.
Copy link to clipboard
Copied
It sounds like you will want to wrap the invalid text segment with an in-line element tag (similar to the Emph element in your example) and assign an @ID attribute to the element. That way you can cross-reference the element@id.
If you are asking how to create a cross-reference to an arbitrary text range, without adding any markup or inserting any cross-reference markers, I don't think such magic exists (at least not within FM12).

