Skip to main content
Participant
January 14, 2015
Answered

How do I get a pre-process XSLT in a structured app to run?

  • January 14, 2015
  • 1 reply
  • 1256 views

Hello,

I think this is a very basic question, but I'm stuck. I have a structured application that is supposed to use a XSLT to preprocess its files. I've added a XMLApplication/XSLTPreferences/PreProcessing/Stylesheet; I've tried it both manually and with the designer. Now I try to open a XML file in a book and it doesn't seem to use the stylesheet at all. It does ask me for the application type, I select it, then it simply opens the file as it was without applying the XSLT.

Could somebody please explain to me how this is supposed to work?

Background: I have a structured app set up by someone else that has the right structure already and they've already put it into a book. I want to write a XSLT to get the same file but with preprocessing instructions for conditional tags, but cannot get it to run. I'm good at XSLT, but my FrameMaker level is a novice.

This topic has been closed for replies.
Correct answer Russ Ward

Mikhail,

This should work, because according to your description, it seems that you are doing everything correctly. So, let me ask the obvious questions, without intending to insult you:

- Are you absolutely sure the path in structapps is correct? Did you try both an absolute path and a relative path?

- Are you sure that you are adding the setting into the correct structapps file? Newer versions of FM maintain two copies... one in the FM installation area and one in the Users/AppData area. Upon startup, FM "merges" settings from the two. If there is an application in both with the same name, I think the one in the Users area takes precedence and the other definition is simply discarded.

- Are you sure the XSLT works? That is, you have run it on one of your source files manually?

I know that this works because I use the feature regularly, as do many others. There must be something simple going wrong here.

Russ

1 reply

Russ WardCorrect answer
Legend
January 15, 2015

Mikhail,

This should work, because according to your description, it seems that you are doing everything correctly. So, let me ask the obvious questions, without intending to insult you:

- Are you absolutely sure the path in structapps is correct? Did you try both an absolute path and a relative path?

- Are you sure that you are adding the setting into the correct structapps file? Newer versions of FM maintain two copies... one in the FM installation area and one in the Users/AppData area. Upon startup, FM "merges" settings from the two. If there is an application in both with the same name, I think the one in the Users area takes precedence and the other definition is simply discarded.

- Are you sure the XSLT works? That is, you have run it on one of your source files manually?

I know that this works because I use the feature regularly, as do many others. There must be something simple going wrong here.

Russ

Participant
February 28, 2015

Thanks, Russ,

I was told that if there is the most helpful  member in FrameMaker forums it was you You're right, it was my mistake; the XSLT started to work once I restarted FrameMaker. I guess I was confused that it seemingly applied the changes (saved application definitions), but didn't activate them in that session.

Kind regards and thanks again,

Mikhail

Legend
March 3, 2015

Mikhail, that is a nice compliment, thank you. Yes indeed, when you make a change to the definitions, you have to manually initiate a re-read (or restart FM). I didn't think of that, so I'll have to add that to my list of "simple things to check."

Russ