Exporting from FileMaker with XML
Even if you don't ever plan to create a single XSLT, XML is a valuable tool when working with FileMaker. It provides a reliable method for transferring data with a minimum of muss and fuss.Here, we show you how to transform contact information in FileMaker into VCF (the vCard format used by many PIMs) and transfer it to an iPod for use with the Contacts feature, which allows you to view (but not edit) name and address information.For this example, you'll need to visit [ www.filemaker.com/technologies/xslt_librar225 ]. You'll find a link there to VCFExport, a zipped folder that holds an XSLT called fmp2vcf.xsl, a .fp5 file with standard contact fields and accompanying documentation.
To export with XML
1 .Open the file containing the names and addresses you'd like to transfer to the iPod.2 .Choose Record > Show All Records (Control+J/Command+J) so you'll export the entire file, then choose File > Export Records.If you only want selected records to be transferred, or want the records sorted a specific way, create your Finds and Sorts before you export the records.3 .When the Export Records to File dialog box appears, type export.vcf for the file name. In the Type pop-up menu, choose XML (Figure 12.58). Click Save.
Figure 12.58. Choosing XML for the export format will create a file that can be transformed with an XSLT.

Figure 12.59. If you are running an XSLT from a computer, you choose the File radio button.

Figure 12.60. The settings you choose are saved in the dialog box.

You can change the field export order by dragging the field name up or down in the Field export order window. You can also keep fields together by selecting those fields at the same time and clicking Move.8 .When finished, click the Export button (Figure 12.61).
First Name
Last Name
Title
Company
Phone 2 (or home)
Phone 1 (or office)
Phone 3 (or mobile)
URL
Address 1 (work address)
City 1
State 1
Zip Code1
Address 2 (home address)
City 2
State 2
Zip Code2
Notes
Figure 12.61. To import properly, the fields must be exported in the proper order.
[View full size image]

Figure 12.62. Once the export.vcf file is copied to the Contacts folder its contents can be displayed in the Contacts feature of the iPod.

This is but one of many tasks that can be accomplished using XSLTs with your FileMaker data. Check the XML section of the FileMaker Web site for many more.
Writing Your Own XSLTs
If you're going to be using XML with FileMaker, at some point you may need an XSLT that doesn't already exist. There are a number of resources available to help you learn how to create your own XSLT. FileMaker Developer's Edition has extensive documentation and sample files. The FileMaker Web site has an entire section devoted to XML ([ www.filemaker.com/technologies ]).As with any programming language, the best way to get started learning is to look at code that others have created. You can open a style sheet in a text editor to see how it works and even adapt it for your own purposes.