Developer’s Guide

Table Of Contents
Using FileMaker Pro XML to deliver your data
7-5
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.
Note These grammars are not well suited for cascading style sheets
with positioning. See “Using the FMPDSORESULT grammar” on
page 7-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:
1 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.
1 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.
For a list of valid FileMaker CGI requests, see “Generating
FileMaker Pro CGI requests for an XML document” on page 7-8.
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 specifies the format of dates in the
XML document.
The TIMEFORMAT attribute specifies the format of times in the
XML document.
The METADATA element contains one or more FIELD elements,
each containing information for one of the fields/columns of the
result set—including the name of the field as defined in the database,
the field type, the Yes or No allowance for empty fields (EMPTYOK
attribute) and the maximum number of repeating values
(MAXREPEAT attribute). Valid values for field types are TEXT,
NUMBER, DATE, TIME, and CONTAINER.
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)
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