IF it is this simple, you can create a calculation. If it is not this simple, then post more information.
A stylesheet is used to transform your FileMaker data into some other type of document or file.
Using XML and a stylesheet, you can create HTML, CSV, PDF, WORD, or EXCEL files (and likely others too). You cannot, however, change the XML file itself. (XML+XSLT= some other document).
If you want to see a real-world example of how a stylesheet can be used to convert your FileMaker records into an Excel workbook, take a look at the sample file that I posted earlier today (FMP2XLS).
Yes, you are right.
But all i am looking for here is a technique (transfer FMP xml to another format xml using stylesheet). if that can solve this "simple" question. i should be ok with the more "complex" ones. if i can not , i will come back to ask more.
>>Using XML and a stylesheet, you can create HTML, CSV, PDF, WORD, or EXCEL files (and likely others too). You cannot, however, change the XML file itself. (XML+XSLT= some other document).<<
I only need to "create" a new xml file (using xml and a stylesheet) not "change" the xml file itself.
Yes, you can easily create a new XML document using the FileMaker source XML and your own XSLT file.
In my example, for each COL that exists in the XML file I create a <CELL>pair</CELL> in my output file.
In your example, for each COL that exists in the XML file, you would create a <TASK>pair</TASK> to your output file.
The "formats" that XSLT will output:
(_note_: xml and html are particular formats of TEXT!)
Adding an extension onto a 'text' file may or may not make it ready-to-open with an application, such as Excel. Excel can open: .xml, .htm, .csv, .txt/.tab, .xls, .xlsx, and more. To so see what these formats may be, you can export (save as...) from Excel and open in a text editor. XML for Excel is pretty specific and if you don't get all the format correct, the document will have problems.
Things like end-of-line, BOM, encoding are all important in any XML to be opened by whatever application needs to read it.
The most common usage of XSLT is to transform one XML grammar/schema/format into another XML grammar/schema/format. Excel is just one type of xml:
But this is not the only type of transformation that is possible. It's difficult to have a one-solution-fits-all when dealing with XML/XSLT. The source can vary and the results can vary. Any two people can have the same XML source, for example and an Import into FileMaker can be different as they may have different table(s) and field(s). The XSLT is the 'bridge' between that makes the transition, but must be unique fitting the FM schema.
The Export of XML (from FileMaker) if, not so complex, can certainly be calculated. If more complex then yes an XSLT can be created. But the more complex the source (FMP) and the result (schema/grammar/format), the more complex the XSLT must be.
So, to answer petery009, question: YES, you can xml->xml (via xslt)
here are some links that might help:
(in this page is the link to the example files that used to be in the FMP/FMPA installation):
look for this:
These may give you some ideas on import or export with FMP XML.
hi Peter, the xml you can do with a pair of variables, and a loop. It is the simple way.
Thanks for all the reply above.
There's a very close question asked somewhere else and it seems gonna solve my problem.