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

Formatting elements with pgfFmt

New Here ,
Apr 18, 2013 Apr 18, 2013

Copy link to clipboard

Copied

Hi all,

I'm a complete beginner at FrameMaker and scripting of the same, and I've been tasked with converting S1000D documents in XML format into FrameMaker files using an unstructured template.

I've managed to import some XML files into FrameMaker and saved them as .fm files. Now I need to set different paragraph formats on different elements in those files. The paragraph formats are taken from an unstructured document and imported into the files. How can I assign them to the different elements?

I'm currently walking through the elements in the document from mainFlow.HighestLevelElement using the FirstChildElement and NextSiblingElement methods and checking the ElementDef.Name for the tag name, which works, but I've so far been unable  to find a way to set a format on the Element. Is it possible? Is there a better way? Any suggestions welcome.

Best,

Lisbeth

TOPICS
Scripting

Views

1.3K

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

Advocate , Apr 18, 2013 Apr 18, 2013

Hello Lisbeth,

You will need the Structure Application Development Guide. Part 3 of that document explains all the EDD rules. The guide can be downloaded from the Adobe site. It does not matter which version of FrameMaker - I am using the guide for version 8 and do not even know if there is a newer one.

The structure applications can be found via StructureTools > Edit Application Definitions. That opens the structapp file in FM. Look for the S1000D application and check the name of the template th

...

Votes

Translate

Translate
Advocate ,
Apr 18, 2013 Apr 18, 2013

Copy link to clipboard

Copied

Hello Lisbeth,

I am sorry but you are taking a completely wrong approach to the problem. Opening an XML file in FM and saving it as an FM file does not make it unstructured and it never will, or should. I understand your problem as follows: you have the XML documents and need to apply the formats from an unstructured FM template to the various elements.

There are two different options I can see for you:

1. Change the EDD for the structured application that is used to import the S100D documents into FM. This is not the easiest job in the world but it can certainly be done. Instead of assigning the formats that happen to be in the template that FrameMaker uses for importing S1000D documents, the EDD would then assign the formats from your unstructured document to the elements. There are various developers on this forum - including myself - who would gladly do this work for a reasonable fee.

2. Open the template that FrameMaker uses to import S1000D documents and adapt the styles in that document to the ones you have in the unstructured template. In this case, the names of the formats in all the paragraphs of the imported document will not change to the names used in your unstructured template but the end result will look the same. This work is tedious and may take quite some time, but it does not require a lot of in-depth knowledge of structured applications and EDDs.

If the formats have to have the names of the styles defined in the unstructured template, option 1 is the only one for you.

Kind regards

Jang

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
New Here ,
Apr 18, 2013 Apr 18, 2013

Copy link to clipboard

Copied

Thanks for your quick reply, that's pretty much what I expected to hear. I'll look into option 1 and see if I can make heads or tails of it. Do you have any recommended reading for me if I want to tackle it myself?

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 ,
Apr 18, 2013 Apr 18, 2013

Copy link to clipboard

Copied

If you can, give me a call so I can ask some specific questions about what you are doing. Thanks.

Rick Quatro

585-283-5045

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
Advocate ,
Apr 18, 2013 Apr 18, 2013

Copy link to clipboard

Copied

Hello Lisbeth,

You will need the Structure Application Development Guide. Part 3 of that document explains all the EDD rules. The guide can be downloaded from the Adobe site. It does not matter which version of FrameMaker - I am using the guide for version 8 and do not even know if there is a newer one.

The structure applications can be found via StructureTools > Edit Application Definitions. That opens the structapp file in FM. Look for the S1000D application and check the name of the template that is mentioned there, as well as the EDD that is defined.

Find the directory that holds these files, create a copy of it and relink the S1000D app to the new EDD and template. Then open the EDD in FM and edit the assignment of paragraph formats to match your unstructured template styles. Import the EDD into the template and save the template. Test it by importing (opening) an S1000D file. Make changes, import de EDD into the template, import the S1000 file again. Keep doing that until you are satisfied with the result.

That is basically it. If you get stuck or completely overwhelmed, send me a couple of files (s1000D format and the unstructured template) and I will make you a reasonable quote.

Kind regards

Jang

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
New Here ,
Apr 19, 2013 Apr 19, 2013

Copy link to clipboard

Copied

LATEST

Thanks very much Jang! The easy stuff was easy enough, now for the difficult parts...:)

I'll keep your offer in mind if I and my colleagues can't figure things out on our own.

Best,

Lisbeth

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
LEGEND ,
Apr 18, 2013 Apr 18, 2013

Copy link to clipboard

Copied

Lisbeth,

Another alternative to consider is using a database publishing tool like Datazone's Miramo to convert the S1000D XML content to the unstructured FM files. It requires a bit of XSLT to map the elements to the Miramo mark-up. This is a technique used by a major manufacturer of the world's fastest trains to publish their S1000D content.

Depending upon your timing and volume requirements, there is a Personal Edition of Miramo available (currently, you'll have to ask, as the MiramoPE site is down) that can be used to prototype and develop solutions, as well as doing production in a desktop (non-server) environment.

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
New Here ,
Apr 19, 2013 Apr 19, 2013

Copy link to clipboard

Copied

Thanks for the information! Our current client would prefer to not have to buy or implement any new tools, but I'll keep it in mind for our own future needs.

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