Custom Web Publishing Guide

Table Of Contents
30 Custom Web Publishing Guide
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 27.
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 85), 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.
Example of XML data in the FMPXMLRESULT grammar
The following is an example of XML data generated with the FMPXMLRESULT grammar.
<?xml version="1.0" standalone="no"?>
<!DOCTYPE FMPXMLRESULT PUBLIC "-//FMI//DTD FMPXMLRESULT//EN" "/fmi/xml/FMPXMLRESULT.dtd">
<FMPXMLRESULT xmlns="http://www.filemaker.com/fmpxmlresult">
<ERRORCODE>0</ERRORCODE>
<PRODUCT BUILD="01/10/2004" NAME="FileMaker Web Publishing Engine" VERSION="7.0v1" />
<DATABASE DATEFORMAT="M/d/yyyy" LAYOUT="web" NAME="art" RECORDS="3" TIMEFORMAT="h:mm:ss a" />
<METADATA>
<FIELD EMPTYOK="YES" MAXREPEAT="1" NAME="Title" TYPE="TEXT" />
<FIELD EMPTYOK="YES" MAXREPEAT="1" NAME="Artist" TYPE="TEXT" />
<FIELD EMPTYOK="YES" MAXREPEAT="1" NAME="Image" TYPE="CONTAINER" />
<FIELD EMPTYOK="YES" MAXREPEAT="2" NAME="Description" TYPE="TEXT" />
<FIELD EMPTYOK="YES" MAXREPEAT="1" NAME="artlocations::Location" TYPE="TEXT" />