Skip to main content
Participating Frequently
June 30, 2010
Question

Can read/write rule file be configured dynamically in structapps.fm for an XML application

  • June 30, 2010
  • 1 reply
  • 842 views

Hi,

I've a RPC client running in Solaris machine. Whenever I open a XML template from RPC client, I pass the XML application name to be used for the XML template. I've around 10 XML templates for different geographies, though the nature of the application is same, I've to create 10 applications in structapps.fm file because of different encoding formats and read/write rules used for each application.

As I've XML template for different geographies which uses different read/write rule file and encoding formats. But, DTD, template name, DOCTYPE remains same, so, is there a way, where in, I can configure the XMLApplication dynamically using API's.

Any inputs would be much appreciated.

Thanks,

Basav

This topic has been closed for replies.

1 reply

Michael_Müller-Hillebrand
Legend
June 30, 2010

Basav,

What do you want to achieve: configure R/W rules or XMLApplication?

The XMLApplication to be used with an XML file can be controlled via the FDK (I assume, because it can be done when using FrameScript), with FrameMaker 9 there is also a special Processing Instruction you can embed into your XML.

The R/W rules file is a part of the XMLApplication and therefore cannot be changed independently, but you can of course change the content of that file  before opening the XML; if can be a simple text file and the content is not cached.

- Michael

Legend
June 30, 2010

Hi Basav,

Along with what Michael said... you can open the R/W rules file and make changes to it with your client, before attempting to open the XML file. If the rules file is a FrameMaker document, you will need to use the FDK to open and edit it in FrameMaker. One suggestion, though... it might be easier (and safer) to keep the current setup where you have a set of different R/W rules files sitting somewhere... then before opening the XML file in FM, go get the file you want, copy it to your structured app location, and rename it to match the definition in structapps.fm.

Are we understanding your request properly?

Russ

Participating Frequently
June 30, 2010

Hi,

As you both correctly understood and suggested, the content of the r/w rule file can be changed or a file can be copied before opening the file. How do I change other value for XMLEncoding and XML Display Encoding ?

DTD:

Template:

Read/write rules:

XML Export Encoding:

XML Display Encoding:

Is there an API availabe in FDK that sets the values for these parameters?

KSC5601-1992
EUC-KR
$STRUCTDIR\xml\gfs-str\rules.fm
$STRUCTDIR\xml\gfs-str\uk_simple_template.fm
$STRUCTDIR\xml\gfs-str\SingleSrc.DTD