Skip to main content
Participant
July 17, 2019
Answered

Preserving cross-references to/from XML - again

  • July 17, 2019
  • 1 reply
  • 903 views

I can't get an external cross reference to appear in my XML.  I think I'm doing everything discussed in the discussion "Preserving cross-references to/from XML", but I must not be.  I start with an unstructured document with a cross reference to another document.

I structure the document using a conversion file and EDD I imported into the template and the cross reference appears successfully in the GUI (but there's no ID attribute,  Idref = <no value>).

When I export the XML, there's no source file or ID for external cross references, but the internal cross references are getting saved in the XML.

Where should I be looking for what I'm doing wrong?  Is it the missing attribute from when I did the conversion?

Thanks,

Jed

This topic has been closed for replies.
Correct answer Lynne A. Price

Jed,

  If by "directly" you mean without some type of programming or scripting, you are correct; FM does not provide a command that generates the ID reference for a cross-reference to an external file.

  I often use XSLT to change the structure created by a conversion table for other reasons as well. I may have one DTD for saving the conversion table output as XML and another for the final structure.

--Lynne

1 reply

Inspiring
July 17, 2019

Jed,

   Unfortunately, you will have to convert external cross-references yourself using some combination of XSLT, the FDK, Extend Script, or (shudder) manual editing.

  Even if you use the Structure > Utilities > Structure Current Book command to structure all files in a book, FrameMaker applies the specified conversion table one file at a time. Therefore, when it is processing the file containing a cross-reference, it does not have information about the elements and attributes in the external file or its eventual structured counterpart.

     --Lynne

Participant
July 17, 2019

Thanks for the super-fast reply Lynne.

I can figure out a solution with ExtendScript or XSLT,

I just want to confirm a couple things.

No matter what, from a structured .fm file, I can't directly get the external source file pointers into the saved XML? 

And instead, the only place I'll be able to insert pointers to the source files is by modifying the XML afterward after I've saved it (using XSLT or another method), or, in FM (using ExtendScript, or manually) after I've imported the XML back in?  Then, from that point, the source file pointers will be preserved during round-tripping.

Thanks again,

Jed

Lynne A. PriceCorrect answer
Inspiring
July 17, 2019

Jed,

  If by "directly" you mean without some type of programming or scripting, you are correct; FM does not provide a command that generates the ID reference for a cross-reference to an external file.

  I often use XSLT to change the structure created by a conversion table for other reasons as well. I may have one DTD for saving the conversion table output as XML and another for the final structure.

--Lynne