Custom Web Publishing Guide

Table Of Contents
Chapter 3
|
Accessing XML data with the Web Publishing Engine 27
About the URL syntax for FileMaker container objects in XML solutions
In a generated XML document for an XML solution, the syntax used to refer to a container object is different
for container fields that store the actual object in the database, as opposed to container fields that store a
reference to the object.
1 If a container field stores the actual object in the database, then the container field’s <data> element uses
the following relative URL syntax to refer to the object:
<data>/fmi/xml/cnt/data.<extension>?<query string></data>
where <extension> is the filename extension identifying the type of object, such as .jpg. The filename
extension sets the MIME type to allow the web browser to properly identify the container data. For
information on
<query string>, see the previous section, “About the URL syntax for XML data.”
For example:
<data>/fmi/xml/cnt/data.jpg?–db=products&–lay=sales&–field=product_image(1)&–recid=2</data>
Note In the generated XML for a container field, the value for the –field query parameter is a fully
qualified field name. The number in the parentheses indicates the repetition number for the container
field, and is generated for both repeating and non-repeating fields. See
“About the syntax for a fully
qualified field name” on page 87.
To retrieve the container data from the database, use the following syntax:
<scheme>://<host>[:<port>]/fmi/xml/cnt/data.<extension>?<query string>
For information about <scheme>, <host>, or <port>, see the previous section, “About the URL syntax for
XML data.”
For example:
http://www.company.com/fmi/xml/cnt/data.jpg?–db=products&–lay=sales&–field=product_image(1)&–recid=2
1 If a container field stores a file reference instead of an actual object, then the container field’s <data>
element contains a relative path that refers to the object. For example:
<data>/images/logo.jpg</data>
Note The referenced container object must be stored in the FileMaker Pro Web folder when the record is
created or edited, and then copied or moved to a folder with the same relative location in the root folder
of the web server software. See
“About publishing the contents of container fields on the web” on
page 21.
1 If a container field is empty, then the container field’s <data> element is empty.
Note The syntax for container objects using XML is different from the syntax for container objects using
XSLT. See
“About the URL syntax for FileMaker container objects in XSLT solutions” on page 53.