Developer’s Guide

Table Of Contents
Using FileMaker Pro XML to deliver your data 7-3
Note XML data generated by the Web Companion is encoded using
UTF-8 format (Unicode Transformation Format 8). For information,
see “About UTF-8 encoded data” on page 7-7.
About XML namespaces
To avoid name collisions, unique XML namespaces help distinguish
XML tags by the application they were designed for. For example, if
your XML document contains two DATABASE elements, one for
FileMaker Pro XML data and another for Oracle XML data, the
namespaces will identify the DATABASE element for each.
The FileMaker Pro Web Companion generates a default namespace
for each grammar. For example, for the FMPDSORESULT
grammar, the following namespace is generated:
xmlns=“http://www.filemaker.com/fmpdsoresult”
About FileMaker Pro database error codes
The FileMaker Pro Web Companion generates an error code at the
beginning of each grammar based on the current error status of the
database. A value of zero (0) is returned for no error.
<ERRORCODE>0</ERRORCODE>
See appendix C, “FileMaker Pro values for error codes.”
Using the FMPDSORESULT grammar
When you specify “–dso_xml” as the format for a FileMaker Pro
CGI request, the Web Companion will generate XML data based on
a database-specific grammar that uses field names as element names.
The FMPDSORESULT grammar is useful for publishing databases
on web pages that are formatted with cascading style sheets or
XSLT. (See “Comparing CSS, XSLT, and JavaScript” on page 7-11
for information.) The FMPDSORESULT grammar is compatible
with the Microsoft XML Data Source Object used by Internet
Explorer.
The Web Companion will also generate the document type definition
for the grammar if you specify “–dso_xml_dtd” as the format. This
is useful if you want an XML parser to validate the XML before your
document goes to production.
Note Internet Explorer directly supports XML with no additional
software required. The XML can be displayed using dynamic data
binding features available in the browser. This is accomplished with
a Java applet that ships with Internet Explorer 4.0, which presents the
XML as a Data Source Object (DSO) to the browser. With the DSO,
the The Internet Explorer 4.0 browser exposes XML data to scripting
languages such as JavaScript or VBScript via the Microsoft
Document Object Model (DOM). Keep in mind that the Microsoft
XML DSO applet does not provide a mechanism for updating the
data, nor does it know anything about FileMaker Pro database
layouts or value lists.
The following is an example of a Microsoft XML DSO applet tag
that you might use in your web page to query FileMaker Pro for
XML data using the FMPDSORESULT grammar—where the “url”
parameter can be any valid FileMaker Pro CGI request containing a
–format parameter equal to “–dso_xml” or “–dso_xml_dtd.” (See
“Generating FileMaker Pro CGI requests for an XML document” on
page 7-8 for a list of valid FileMaker CGI requests.)
<applet code=com.ms.xml.dso.XMLDSO.class width=0 height=0
id=xmldso MAYSCRIPT=true>
<PARAM NAME="url" VALUE=fmpro?–db=PhoneList.fp5&
–format=–dso_xml&–find=>
</applet>
Description of elements in the FMPDSORESULT grammar
Each ROW element in the generated FMPDSORESULT grammar
contains a number of FIELD elements that correspond to the field
names in the specified layout.