Custom Web Publishing Guide

Table Of Contents
Chapter 5
|
Developing FileMaker XSLT stylesheets 53
About the URL syntax for FileMaker container objects in XSLT solutions
In a generated XML document for an XSLT 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 URL syntax to refer to the object:
<data>/fmi/xsl/cnt/data.<extension>?<query string></data>
where <extension> is the filename extension identifying the type of object, such as .jpg or .mov. For
information on
<query string>, see the previous section, “About the URL syntax for FileMaker XSLT
stylesheets.”
For example:
<data>/fmi/xsl/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/xsl/cnt/data.<extension>?<query string>
For information about <scheme>, <host>, or <port>, see the previous section, “About the URL syntax for
FileMaker XSLT stylesheets.”
For example:
http://www.company.com/fmi/xsl/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, if
logo.jpg was in the Web folder
inside the
FileMaker Pro folder, the container field’s <data> element is:
<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.