Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

XML to WordML (almost a template) 90% complete... need help


This topic is 5496 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted (edited)

So, let me start from the beginning... I have had this ongoing project to get a report out of filemaker into Word format. Well, I have been able to slowly wrap my brain around this thing (atleast 90% of it, anyway).

First, I created XML. This that is generated by a proof of concept DB. This code is created on the fly by calculation field and is fully qualified XML code (AFAIK).

Next, I created the XSL Stylesheet that transforms the XML to WordML.

The stylesheet does successfully transform the XML to WordML and it does it well, without errors. That is to say that it is error free on my system running the transform from the command line as well as from Filemaker using Scriptmaster. While it transforms the XML and takes advantage of BOLD, ITALIC AND UNDERLINE, it does not utilitize the color attribute that I have in the XML. Thus, my problem. The stylesheet does not transform the color attributes to the WordML.

The code that handles the BOLD, ITALIC and UNDERLINE can be found in the loop that starts on line 66 of the XSL file. If it helps, the WordML for color would be . I have been unable to get the color value to go in the quotes. I am, of course, open to doing it another way if it needs to be done. I am kinda at a stand still here.

Does anyone have any ideas about adding the code necessary to process the color to the stylesheet?

I am hoping to get this thing wrapped up and start on an article to show how to generate WordML docs from filemaker.

Thanks for your time,

Jamie Forbes

CDrecordset.xml.txt

CDxmltowordml.xsl.txt

Edited by Guest
Posted

OK... It figures that I would find a solution the same stinkin' day that I post the problem.

Anyway, I have attached the modified stylesheet. See line 69, that is where all the magic happens.

I will now begin creating the howto article. This article will be for me as much as anyone else. I find that I forget how to accomplish these complex tasks and the next time I need to do it I have to re-learn.

CDxmltowordml.xsl.txt

  • 5 weeks later...
Posted

Jamie you didn't post the "answer", but I do know for Excel ML, you need to use the "#" for colors.

instead of "000000":

use: "#000000"

Posted

The solution is actually in the attached file on line 69. My problem was not with WordML code that I needed to generate. It was the XSLT code that is to generate the WordML. But, as I said, the solution is in the attached file.

Thanks for the response. :)

This topic is 5496 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.