Developer’s Guide

Table Of Contents
Note If the –lay parameter is not specified in the FileMaker Pro CGI
request, the LAYOUT element is empty and data for every field in
the database is returned. (See
“Generating FileMaker Pro CGI
requests for an XML document” on page 10-8 for information.)
Using the FileMaker Pro Extended
XML grammars
The FileMaker Pro Extended XML grammars contain additional
information about field types, value lists and layouts that is not found
in the FMPDSORESULT grammar. Use the FMPXMLRESULT and
FMPXMLLAYOUT grammars if you require layout information or
want the METADATA information provided by these grammars.
The FMPXMLRESULT and FMPXMLLAYOUT grammars are
available on the FileMaker Developer CD (Developer
Extras\FileMaker, Inc\External FileMaker APIs\XML\Documentation )
Note These grammars are not well suited for cascading style sheets
with positioning. See
“Using the FMPDSORESULT grammar” on
page 10-3 if you want to use CSS with your XML data.
When you specify “–fmp_xml” as the format for a FileMaker Pro
CGI request, the Web Companion will generate XML data using
either the FMPXMLRESULT or FMPXMLLAYOUT grammar,
depending on the request you specify in the CGI command:
The Web Companion will generate the FMPXMLRESULT
grammar when you specify –edit, –delete, –find, –new,
–dbnames, –layoutnames, –scriptnames or –dbopen as the
FileMaker CGI request.
The Web Companion will generate the FMPXMLLAYOUT
grammar when you specify –view as the FileMaker CGI request.
The Web Companion will also generate the document type definition
for the grammar if you specify “–fmp_xml_dtd” as the format. This
is useful if you want an XML parser to validate the XML before your
document goes to production.
Using FileMaker Pro XML to deliver your data on the Web 10-5
For a list of valid FileMaker CGI requests, see “Generating
FileMaker Pro CGI requests for an XML document” on page 10-8.
Note When using XML grammars, you should do a case-insensitive
compare for proper results.
Description of elements in the FMPXMLRESULT grammar
In the generated FMPXMLRESULT grammar, the DATABASE
element contains attributes for the name of the database, the number
of records in the database, the name of the layout that was used to
generate the result set, and the format of dates and times in the XML
document.
The DATEFORMAT attribute of the DATABASE element specifies
the format of dates in the XML document.
Field Full form Short form
Year yyyy (4 digits) yy (2 digits)
Month mm (2 digits) M (1 or 2 digits)
Day dd (2 digits) d (1 or 2 digits)
The TIMEFORMAT attribute of the DATABASE element specifies
the format of times in the XML document.
Field Full form Short form
Hour (1 – 12) hh (2 digits) h (1 or 2 digits)
Hour (1 – 24) kk (2 digits) k (1 or 2 digits)
Minute mm
Second ss
AM/PM a