1 2 Previous Next 21 Replies Latest reply on Jan 16, 2017 2:57 AM by PeterDoern

    XSLT Stylesheet and XML Exporting


      I have been exporting data in various formats for other systems to import for sometime now. (Example comma delimited file then FTP'ed to a site).


      I now have data that needs to be sent to more sophisticated user that require the data to be in an XML format.

      My limited understand is you need a XSLT style sheet as a framework to export the data too. I don’t know where to even start with this and know something is being degrade in future FM editions (using FM12A now).


      In search the web I have not found any easy to follow or understand ways to create the style sheet then export to it. Has anyone done this starting knowing very little that could suggest some good sources for me to learn from?


      Thanks in advance!


        • 1. Re: XSLT Stylesheet and XML Exporting
          Mike Duncan

          The role of XSLT is to transform the XML that is exported into another format. You don't necessarily need to involve XSLT to export as XML, filemaker will export in a couple different xml grammars (basically, conventions on how the xml is exported)...FMPXMLRESULT and FMPDSORESULT.


          Will one of those suit the needs of the user you're working with, or are there specific requirements to the xml format they need?

          • 2. Re: XSLT Stylesheet and XML Exporting

            Hi Mike

            Thank you for taking the time to reply.


            The end user has a very strict format the data must be in which I have not seen yet.  With my limited understanding, it sounds like I would have to build a stylesheet that produces the format.  The fields and names will be differnt than the data I have in my table as well.




            • 3. Re: XSLT Stylesheet and XML Exporting

              Tom_Droz wrote:


              My limited understand is you need a XSLT style sheet as a framework to export the data too.


              You need a XSLT stylesheet to transform Filemaker's XML grammar to the grammar (schema) of the target application. Filemaker will perform the transformation during the export, if you specify a stylesheet to use.


              Creating the stylesheet requires knowing the required target schema; IOW, it's a custom job. You also need to be familiar with Filemaker's own XML grammar, as this will be your starting point. I'd suggest looking at the XML examples included with the application, and getting some basic XSLT skills, say:


              1 of 1 people found this helpful
              • 4. Re: XSLT Stylesheet and XML Exporting

                Hi Tom,


                Like you, I started a couple of years ago from scratch knowing nothing about XSLT.  I'm no expert by any means but have managed to both import and export numerous XML formats using the following:

                • fmpxmlresult grammer (FileMaker's default xml structure: see FMP's Help for definition and examples).

                • XSLT 2nd edition eBook by Doug Tidwell from O'Reilly

                • XSLT Cookbook eBook by Sal Mangano from O'Reilly

                • TextWrangler (free text editor on OS X) used to create and edit the XSLT files


                The XSLT translates the native fmpxmlresult xml output into the xml format required by your user during the export process within FileMaker Pro.


                FileMaker also has some sample XSLT files that helped a lot.


                Hope this gets you going.

                • 5. Re: XSLT Stylesheet and XML Exporting
                  Mike Duncan

                  It sounds like you would need to get the XML into the correct format. There was recently discussion about this topic on this thread:




                  There's different approaches discussed, there are several options... if you have web enabled your database, it could even be possible to set up direct access, if that meets your needs.

                  1 of 1 people found this helpful
                  • 6. Re: XSLT Stylesheet and XML Exporting

                    It may say "FileMaker 6", but the Import and Export of XML with FileMaker and XSLT is exactly the same (maybe some slight dialog changes) for FileMaker  v. 6-12. Amazon has it for a reasonable price and it's available elsewhere, too.


                    "FileMaker Pro 6 Developer's Guide to XML/XSL"



                    If you want the example files, send me a private message.


                    Beverly (author)

                    • 7. Re: XSLT Stylesheet and XML Exporting

                      I think XML import/export is the worst/best thing to happen to data exchange, ever! It's construct is very simple, but what end users do with it, and require from others to participate with them, is totally mesionic and belabored. Having vented that, I will say that when it comes to XML and Filemaker, I live and die by "FileMaker Pro 6 Developer's Guide to XML/XSL" by Beverly Voth, for EVERY version of FMP since 6 (I'm developing in 12 currently)... I just used it night before last to copy the simple name change template (my favorite part of the whole book) since the people I'm developing for need to import/export JDF style XML. I'd adopt Bev because she is so versed in FMP and related technologies, but that's just too creepy... so I read her books and learn instead. In this circumstance, consider her you best ally in achieving your goal.

                      • 8. Re: XSLT Stylesheet and XML Exporting

                        About a year ago I had to create a bunch of XSLT stylesheets for a somewhat unknown system to receive the data from FileMaker. I had to be up and running with this system in a very short period of time.


                        Now this is a Windows-only solution (hello Parallels). I used a program called Stylus Studio. I could take a basic XML export out of FileMaker without any stylesheet appled. Exported an XML example from the receiving application and then use Stylus Studio to build the stylesheet.


                        The nice part about Stylus Studio is that the interface is semi-graphical - you get a 3-paned window, source on the left, destination on the right and then you start drawing links between the matching fields. Semi-instant XSLT file.


                        That stylesheet can then be used in the FileMaker export to get the data in the right format.


                        This was a very quick way to get up and running with XSLT. If I had the time I would have gone through Beverly's very well regarded book on the subject. SS saved me the time needed to learn XSLT creation and countless hours of debugging.



                        • 9. Re: XSLT Stylesheet and XML Exporting

                          Thanks David, Acsadmin, Beverly, Jml, Michael & Mike


                          All helpful ideas. I was hoping for a one stop tutorial specifically for Filemaker but apparently that isn’t out there. I have started with some of the articles referenced above and the sample templates in Filemaker.



                          • 10. Re: XSLT Stylesheet and XML Exporting

                            LOL! thanks, acsadmin.


                            • 11. Re: XSLT Stylesheet and XML Exporting

                              Well, "the book" is specifically for FileMaker...:)



                              • 12. Re: XSLT Stylesheet and XML Exporting

                                Hmm. Could you explain to a poor non-native English speaker what "mesionic" means? Haven't found the term in a dictionary. I don't think you are speaking here about particle physics nor about ionic solvents ...

                                • 13. Re: XSLT Stylesheet and XML Exporting

                                  Please excuse the misspelling, 'messianic' was the intended word. I would now like to redefine XML as 'needlessly messianic.'

                                  • 14. Re: XSLT Stylesheet and XML Exporting

                                    Since my last post I have been working on the sample stylesheet in FM


                                    I was able to export data in to an XML file  using made up column names.  This is great but...  All the example show how to convert the data to an HTML when what I want is a XML that might look like this.....


                                    <?xml version="1.0"?>

                                    -<Listings xml:lang="en-us" listingsKey="2012-09-18T07:39:59-0500" versionTimestamp="2008-09-30T15:22:00.0Z" version="0.92" xmlns:schemaLocation="http://rets.org/xsd/Syndication/2008-03/Syndication.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://rets.org/xsd/Syndication/2008-03" xmlns:commons="http://rets.org/xsd/RETSCommons/2007-08">



                                              <commons:FullStreetAddress>1426 Lenox Ave</commons:FullStreetAddress>








                                    Can someone push me in the right direction from here?





                                    1 2 Previous Next