Custom Web Publishing with XML and XSLT

Table Of Contents
Chapter 4
|
Accessing XML data with the Web Publishing Engine 35
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" encoding="UTF-8" standalone="no"?>
<!DOCTYPE FMPXMLRESULT PUBLIC "-//FMI//DTD FMPXMLRESULT//EN" ""http://localhost:16014/fmi/xml/
FMPXMLRESULT.dtd">
<FMPXMLRESULT xmlns="http://www.filemaker.com/fmpxmlresult">
<ERRORCODE>0</ERRORCODE>
<PRODUCT BUILD="02/07/2007" NAME="FileMaker Web Publishing Engine" VERSION="9.0.1.36" />
<DATABASE DATEFORMAT="MM/dd/yyyy" LAYOUT="web" NAME="art" RECORDS="12" TIMEFORMAT="HH:mm:ss" />
<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" />
</METADATA>
<RESULTSET FOUND="1">
<ROW MODID="6" RECORDID="15">
<COL>
<DATA>Spring in Giverny 4</DATA>
</COL>
<COL>
<DATA>Claude Monet</DATA>
</COL>
<COL>
<DATA>/fmi/xml/cnt/data.jpg?-db=art&-lay=web&-recid=15&-field=Image(1)</DATA>
</COL>
</ROW>
</RESULTSET>
</FMPXMLRESULT>
The order of the <COL> elements corresponds with the order of the <FIELD> elements in the <METADATA>
element—for example, where the “Title” and “Artist” fields are listed in the <METADATA> element, “Village
Market” and then “Camille Pissarro” are listed in the same order in the <RESULTSET> and <ROW> elements.
Description of elements in the FMPXMLLAYOUT grammar
In the FMPXMLLAYOUT grammar, the <LAYOUT> element contains the name of the layout, the name of the
database, and <FIELD> elements for each field found in the corresponding layout in the database. Each
<FIELD> element describes the style type of the field, and contains the VALUELIST attribute for any
associated value list of the field.
The <VALUELISTS> element contains one or more <VALUELIST> elements for each value list found in the
layout—each including the name of the value list and a <VALUE> element for each value in the list.