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

Calling XSLT with CallClient

Community Expert ,
Nov 27, 2017 Nov 27, 2017

Copy link to clipboard

Copied

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

TOPICS
Scripting

Views

868

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

correct answers 1 Correct answer

Explorer , Feb 28, 2018 Feb 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.

Votes

Translate

Translate
Adobe Employee ,
Nov 27, 2017 Nov 27, 2017

Copy link to clipboard

Copied

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.

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
Community Expert ,
Nov 27, 2017 Nov 27, 2017

Copy link to clipboard

Copied

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

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
Explorer ,
Feb 28, 2018 Feb 28, 2018

Copy link to clipboard

Copied

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.

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
Community Expert ,
Sep 13, 2018 Sep 13, 2018

Copy link to clipboard

Copied

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

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
Explorer ,
Sep 14, 2018 Sep 14, 2018

Copy link to clipboard

Copied

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'");

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
Community Expert ,
Sep 20, 2018 Sep 20, 2018

Copy link to clipboard

Copied

LATEST

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

-Alan

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