Custom Web Publishing with XML and XSLT

Table Of Contents
34 FileMaker Server Custom Web Publishing with XML and XSLT
Using other FileMaker XML grammars
The other FileMaker XML grammars contain information about field types, value lists, and layouts.
FMPXMLRESULT is functionally equivalent to fmresultset. To access value lists and field display information
in layouts, you must use the FMPXMLLAYOUT grammar. The FMPXMLRESULT and FMPXMLLAYOUT
grammars are more compact for data interchange.
To use the FMPXMLRESULT grammar, specify the following grammar name in the URL requesting the XML
document from the Web Publishing Engine:
FMPXMLRESULT.xml
For example:
http://192.168.123.101/fmi/xml/FMPXMLRESULT.xml?–db=employees&–lay=family&–findall
To use the FMPXMLLAYOUT grammar, specify the following grammar name with the –view query command
in the URL requesting the XML document from the Web Publishing Engine:
FMPXMLLAYOUT.xml
For example:
http://192.168.123.101/fmi/xml/FMPXMLLAYOUT.xml?–db=employees&–lay=family&–view
Note When specifying the FMPXMLRESULT and FMPXMLLAYOUT grammars, be sure to enter the grammar
name in uppercase.
In the generated XML document, the Web Publishing Engine will reference the document type definition
for the grammar in the <!DOCTYPE> instruction in the second line of the document, immediately after the
<?xml...?> instruction. The <!DOCTYPE> instruction specifies the URL for downloading the DTD for the
grammar.
Description of elements in the FMPXMLRESULT grammar
In the FMPXMLRESULT grammar, the <DATABASE> element contains the NAME, RECORDS,
DATEFORMAT, LAYOUT, and TIMEFORMAT attributes.
The DATEFORMAT attribute of the <DATABASE> element specifies the format of dates in the XML
document. The TIMEFORMAT attribute of the <DATABASE> element specifies the format of times in the
XML document. The date and time formats for the FMPXMLRESULT and the fmresultset grammars are the
same. See the tables in
“Description of elements in the fmresultset grammar” on page 31.
The <METADATA> element of the FMPXMLRESULT grammar 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, TIMESTAMP, and CONTAINER.
The <RESULTSET> element contains all of the <ROW> elements returned as the result of a query and an
attribute for the total number of records found. Each <ROW> element contains the field/column data for one
row in the result set. This data includes the RECORDID and MODID for the row (see
“–modid
(Modification ID) query parameter” on page 98), and the <COL> element. The <COL> element contains the
data for one field/column in the row where multiple <DATA> elements represent one of the values in a
repeating or portal field.