Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
0

XML files with xrefs in book

Community Beginner ,
Oct 29, 2008 Oct 29, 2008

Copy link to clipboard

Copied

Hello,
I have a book with several chapter files in xml format.
The chapters have xrefs to each other, which works fine when working with the FM book.

My problem is saving the book as PDF. I get one big PDF file, but the references are still pointing to separate PDF files.
Example:
A link from chapter_1 to chapter_2 gives an error saying "Cannot find chapter_2.pdf".
If I swap the xml files to FM binary files in the book, it works as it should: the page of chapter_2 is shown in the big PDF file.

Has anyone had the same problem and maybe a solution for it?
I use FrameMaker 8 with all availabvle patches installed.

Best Regards
Mikael
TOPICS
Structured

Views

1.2K
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
community guidelines
Mentor ,
Oct 29, 2008 Oct 29, 2008

Copy link to clipboard

Copied

Mikael,

This sounds like one of the many quirks (perhaps bugs) related to how FrameMaker handles non-FM files in books. The current book model doesn't play well with XML files as chapters and this seems like yet another problem. Apparently, if an xref does not target another .fm file in the book, Frame assumes that the target file is not in the book and therefore will not be in the book PDF.

There have been discussions here about this in the past. The solution that I use is to run an API client before publishing that converts all XML files to .fm files, and redirect all xrefs appropriately. Then, book features work as expected and PDFs come out as normal. This is not feasible, however, without the automation from the API client.

There may be some who would say that the best approach is to use XML and books the way that the designers did account for... that is, the whole book becomes an XML document with entity references to the separate chapters. In my work, though, this model was not appropriate... rather, I needed a binary FM book to act like a book, except with XML files as chapters. So, I think I understand your situation.

Is API programming or FrameScript an option for you? I think it may be the only way to get what you are looking for.

Russ

Votes

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
community guidelines
Community Beginner ,
Nov 05, 2008 Nov 05, 2008

Copy link to clipboard

Copied

Thanks Russ,

We have now solved it with API programming: the xml chapters are stored in binary format and the book is updated with those.

Thanks again!
Mikael

Votes

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
community guidelines
New Here ,
Nov 05, 2008 Nov 05, 2008

Copy link to clipboard

Copied

Russ, a related question for you:
I am trying to create a script that:
- converts a set of book components from xml to binary
- updates the binary book
- generates a TOC and IX for the book
- saves the whole thing as a PDF
Does all that sound doable? If so, do you have any
advice on exactly how to structure the FrameScript?
In particular, is it realistic to expect to generate
the TOC and IX and get them located correctly in the
book before creating the PDF?

Votes

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
community guidelines
Mentor ,
Nov 05, 2008 Nov 05, 2008

Copy link to clipboard

Copied

Hi Marc,

I don't use FrameScript personally, but I do use the FDK whose concept is similar. My recommendation for the generation of TOCs and indexes is to have sample templates saved somewhere, then you can (for each file):

- Add the file to the book in the correct place
- Set the book component property to mark it as a generatable file, along with the "extract tags" property if necessary to set up the TOC
- Open the file, maybe "Save As" to get it to the proper location if necessary
- Update the book
- Save as PDF

In summary, it should be completely doable. You'll just need to get the hang of inserting book components and setting the generatable file properties. Unfortunately, I won't be able to help you with the FrameScript syntax, but there are others around here who probably can help if you have specific questions.

Russ

Votes

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
community guidelines
New Here ,
Nov 05, 2008 Nov 05, 2008

Copy link to clipboard

Copied

Thanks, Russ, for your advice. I will see what I can come up with. FDK would be another possibility if I cannot get the FrameScript figured out, but I will try the FrameScript first. Thanks again.

Votes

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
community guidelines
Mentor ,
Nov 06, 2008 Nov 06, 2008

Copy link to clipboard

Copied

Marc, this should be a small task for FrameScript, it's just that I personally don't know the syntax. Consider asking on the Yahoo FrameScript list... I'm sure the gurus there can point you the right way.

Russ

Votes

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
community guidelines
New Here ,
Dec 23, 2008 Dec 23, 2008

Copy link to clipboard

Copied

LATEST
Hello Mr. Sten,

For the XML dialect DITA there is a very good API client from leximation that can convert XML>FM on the fly, so you would
1. Work with XML files for input
2. convert them to PDF automatically
3. Publish the subsequent book afterwards.

If you wanted the book to have TOC, Title, Index a.s.o, you might use the DITA-Services of SYSTEC, which are exactly for this kind of thing.

Hope this helps,
With kind regardsm
Franz.

[excessive signature removed]

Votes

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
community guidelines