Skip to main content
frameexpert
Community Expert
Community Expert
November 27, 2017
Answered

Calling XSLT with CallClient

  • November 27, 2017
  • 2 replies
  • 1193 views

What is the syntax for calling XSLT transformations with ExtendScript's CallClient method? An example would be helpful.

Also, are there any other undocumented methods or properties that have been recently added? I was disappointed about not knowing about this before. Adobe guys, please let us power users know when there are new features in ExtendScript. Thank you very much.

-Rick

This topic has been closed for replies.
Correct answer JoH

Here's a syntax example if you're still interested:

CallClient("FmXSLT","XSLTRunTrScenario -file 'c:\\temp\\input.xml' -xslfilepath 'c:\\temp\\export.xslt' -outputfilepath 'c:\\temp\\out.xml'");

The article on the blog also mentioned an argument "-processor". I tried "-processor XALAN", but FM appears to be using the default XSLT processor (SAXON in my case) anyway.

2 replies

Alan Houser
Community Expert
Community Expert
September 13, 2018

I was able to use this to solve a vexing use case ... so I'm grateful!

Possibly an uninformed question, but serious ... how would one figure out the required client name and arguments in the absence of Jang's blog post? Is this discernible from anything in the FrameMaker installation or FDK? I'm curious about both this specific case, and the general case (what clients can I call from ExtendScript, and what is the required syntax for doing so?).

-Alan

Inspiring
September 14, 2018

I don't think it's possible to write an API client call without having some form of documentation (or prior knowledge).

The name of an API client is less of a secret. You can find it in the maker.ini file:

[APIClients]

;------------------------------ API Clients ------------------------------

; scroll down and somewhere you'll find ...

FmXSLT=Standard, Central client for XSL transformation, fminit\XSLT.dll,structured

One could actually define a different name in the maker.ini file. After restarting FM, the API client would be available under its new name. (I don't suggest you should do this, it's just a demonstration that the client name is not hard-coded.)

abcde=Standard, Central client for XSL transformation, fminit\XSLT.dll,structured

// Extendscript:

CallClient("abcde","XSLTRunTrScenario -file 'c:\\temp\\input.xml' -xslfilepath 'c:\\temp\\export.xsl' -outputfilepath 'c:\\temp\\out.xml'");

Alan Houser
Community Expert
Community Expert
September 21, 2018

I neglected to thank you for your answer. I feared that I was missing something. Good to know I wasn't.

-Alan

Legend
November 27, 2017

Hi Rick,

just a few days ago we published this nice article from 4everJang on the Adobe TechComm blog:

XSLT Support in FrameMaker 2017

See especially this section in the post:

XSLT Support in FrameMaker 2017 – Making XSLT part of your ExtendScript automation

Cheers,

*Stefan.

frameexpert
Community Expert
Community Expert
November 28, 2017

Hi Stefan, Yes I saw the blog post and that is why I posted here. I need some details on the exact syntax to use. And I was hoping for an example or two. Thanks. -Rick

www.frameexpert.com
JoHCorrect answer
Inspiring
February 28, 2018

Here's a syntax example if you're still interested:

CallClient("FmXSLT","XSLTRunTrScenario -file 'c:\\temp\\input.xml' -xslfilepath 'c:\\temp\\export.xslt' -outputfilepath 'c:\\temp\\out.xml'");

The article on the blog also mentioned an argument "-processor". I tried "-processor XALAN", but FM appears to be using the default XSLT processor (SAXON in my case) anyway.