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

ExtendScript: Open XML as an FM Book

Enthusiast ,
May 04, 2020 May 04, 2020

Copy link to clipboard

Copied

I am developing a publishng application that takes externally generated XML files and opens them as FrameMaker book files. The XML file is split into separate book components according to the read/write rules file. This all works perfectly as a manual process, but I need to force FramMaker to open the XML without requesting a file name for the book, is that possible? I want to provide that name in my script but I can't find any way to set the name of the bookfile throught the API either through  GetOpenDefaultParams()  or by sending parameters to CallClient() for FmDispatcher. Any guidance would be very helpful. 

If it's not possible I can just pre-process the XML to split it as required.

Thanks

Ian

Views

1.1K

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
community guidelines
Explorer ,
May 04, 2020 May 04, 2020

Copy link to clipboard

Copied

Is this non-DITA XML?

 

Do you have the <?FM book?> and <?FM document "fname"?> PI tags in the document you are trying to open?

 

As far as I'm aware, a normal XML book does not require a name. It's name is just the filename of the XML file.

Could you elaborate on that bit more?

 

Thanks,

Dan

Votes

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
community guidelines
Enthusiast ,
May 04, 2020 May 04, 2020

Copy link to clipboard

Copied

Hi Dan,

This is non-DITA XML. The default behaviour for this in hands-on manual mode is that a Save Book dialog pops-up at the latest save location and with nothing in the 'File name:' field. I would then add a new folder and save the book in that folder with a suitable name. I've never seen it provide a name for the book file. Book components are named according to their root element name with a numeric suffix.

Now I need to take control of this for a hands-off process where the file names are provided by an external application. 

I had forgotten about the FM processing instruction and will check to see if they provide a way forward.

Thanks

Ian

Votes

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
community guidelines
Enthusiast ,
May 04, 2020 May 04, 2020

Copy link to clipboard

Copied

LATEST

Hi Dan,

I re-read the documentation and there's no indication that the book processing instructions would provide a better solution than the read/write rules. I tried all options with no difference in behaviour. 
I seem to remember that many years ago it was possible to open XML or SGML with the book name ready to use? 

Ian

 

Votes

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