8 Replies Latest reply on Feb 1, 2013 6:29 AM by brt

    XML import?

    brt

      Title

      XML import?

      Post

           Hi

           New here. Have FM Pro 12 Advanced, and wish to import a TMX file (which I understand is an XML file essentially) , so I'm wondering is there any relatively easy way of doing this, and hoping someone could point me to the "dummies" area.

            

           Brian

        • 1. Re: XML import?
          Jade

               Brian,

               Well, the good news is that FMP 12 can import XML natively.  The not so good news is that you will need to create an XSLT file to "translate" the TMX grammar to FileMaker's XML grammar (fmpxmlresult).  You can find documentation and examples in the English Extras/Examples folder if installed with your FileMaker Pro Advanced.

               Have a look at those and then post back with your questions.

          • 2. Re: XML import?
            brt

                 Jade?

                 Thank you for making this conceptually understandable for me because as you might have understood I'm just a "basic" but persistent user. I'll check out the examples and post my questions.

                 One thing I think I have understood is that XSLT is not a file format per se, but a script for processing TMX files (XML). Is that correct or maybe it does not make any difference. The input I have is a TMX file, and I'd like FM (I want the world) to create the tables and import all fields. I hope that is not too unrealistic.

                  

                 Best/brian

            • 3. Re: XML import?
              Jade

                   Brian,

                   Yes, XSLT can be thought of as a scripting language that describes the syntax of any XML file (in your case TMX, I presume) and how to translate that syntax and its content (data) into an XML syntax that FileMaker understands (called fmpxmlresult) and can import into FileMaker's table records/fields. It is a structured text file that can be created and edited easily with applications like Text Wrangler (free for Mac OS X) or BBEdit.

                   If you have several XML imports/exports to do now or in the coming months, it's worth digging into XSLT and learning the basics.  It's not difficult to learn but it is time consuming.  Otherwise, you may be able to modify an example XSLT to meet your immediate needs or hire an expert.  (There's a standing joke that an expert can knock out a complex XSLT in half an hour…including a twenty minute coffee break.)

              • 4. Re: XML import?
                brt

                     Jade
                     Thank you. I have learnt so much from our short interchange, it's beginning to make  a lot of good sense. I have the option of exporting my data as a text file and of course can get that into FM. Or as TMX .

                     And as there are some relationships between the fields, I guess FM's performance would be better if tables and relationships were used as opposed to a flat file situation. That points in the direction of TMX.

                     If that reasoning is sound,  and as I don't think I'm capable actually of learning XSLT (could never learn Chinese, like my son) and  I only have one type of TMX to process it would make sense to take up on the standing joke. Do you know anyone who you could point me to? Or better still maybe you work in this area?

                     Best/Brian

                • 5. Re: XML import?
                  Jade

                       Brian,

                       Knowing my limitations, I'll decline for your own benefit ;-)  

                       I'm sure others will chime in if you post the following here or in a new thread:

                       • a short example (copy) of the TMZ file;

                       • the operating system that you're using (Windows 7? WIndows 8?  OS X 10.8?);

                       • the Table Occurences, fields and relationships that you want to import from the TMZ data.

                       If you don't get a quick response here, post the same information on FileMaker's TechNet forum. (See under the "Community" tab above. Registration is free and I know there are several people knowledgeable in XSLT over there.)

                  • 6. Re: XML import?
                    brt

                         Jade

                          

                         Thank you for your response albeit disappointing in part.
                         May I ask another question, do you accept my reasoning that TMX is better with relstionship everything else being equal than a Flat file structure on the grounds of FM performance?

                         The file type is TMX (Export from translation memory programme) , two main fields are source text (Swedish ) and target text (English)
                         http://xml.coverpages.org/tmxSpec971212.html

                          

                         I'm sending two v. short files of 8 utf export, and 16 utf export in the hope (probably forlorn) that you might be able to assist direct or indirectly - as you've helped me so much so far - naturally on a professional basis with coffee breaks!

                          

                         Brian

                    • 7. Re: XML import?
                      Jade

                           Brian,

                           Looking at the TMX definition {http://xml.coverpages.org/tmxSpec971212.html}, it definitely calls for parent-child relationships between the Header and its multiple Notes and Names as well as the multiple Body Translation Units <TU> and their related Notes, Names, etc. within FileMaker.  So, a flat file structure is not the best way to handle this, IMHO.

                           I googled TMX + XSLT and came across several references of interest which may give you a better insight.  Here are two of them:

                           • http://letconex.blogspot.com/2011/01/xslt-transformation-which-creates-html.html

                           • http://www.multilizer.com/dev/tmx/

                           I'm afraid I do not have the time to do this project justice and I'm sure that it would take me far longer than need be since I'm not an expert in xslt.

                      • 8. Re: XML import?
                        brt

                             Jade,

                              

                             Ok, well thank you for raising my awareness on this. In my ignorance I thought it wouldn't be too difficult. But now I know better!

                             Brian