Custom Web Publishing with XML and XSLT

Table Of Contents
48 FileMaker Server Custom Web Publishing with XML and XSLT
XSLT Site Assistant also generates the utilities.xsl stylesheet for defining errors and common XSLT
templates that are called by several XSLT Site Assistant stylesheets.
For information about other sections of the XSLT Site Assistant stylesheets, see chapter 6, “Developing
FileMaker XSLT stylesheets.
Using FileMaker XSLT stylesheets in a website or program
Whether you have used XSLT Site Assistant to generate XSLT stylesheets, or you have created your own
stylesheets from scratch, the steps for using them in a website or program with the Web Publishing Engine
are the same.
To use FileMaker XSLT stylesheets in a website or program:
1. Copy or place the XSLT stylesheets in the xslt-template-files folder, which is located inside the Web Publishing
folder inside the FileMaker Server folder on the host where the Web Publishing Engine is installed.
You can also place the stylesheets in an optional folder or folder hierarchy inside the xslt-template-files folder.
2. If your XSLT stylesheets reference static files, such as static images or HTML files, place the static files in
their original folder hierarchy within the root folder on the web server. Make sure the relative path is preserved.
For example, suppose an XSLT stylesheet references an image file called logo.jpg by using the HTML
tag <img
src="logo.jpg">. The logo.jpg file must be located in the following location on the web server:
<root folder>/fmi/xsl/logo.jpg
3. If a database container field stores a file reference instead of an actual file, then 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.
Note If the container fields store the actual files in the FileMaker database, then you don’t need to do
anything with the container field contents if the database file is properly hosted and accessible on
FileMaker Server.
4. To request and process an XSLT stylesheet, use the following URL syntax:
<scheme>://<host>[:<port>]/fmi/xsl/<folder>/<stylesheet>.xsl[?<query string>]
See “About the URL syntax for FileMaker XSLT stylesheets” on page 52.
Note For websites, it is a good practice to include an XSLT stylesheet as a home page that doesn’t require
users to enter a query string to access it. XSLT Site Assistant can create a home.xsl file that doesn’t require
a query string because it uses the <?xslt-cwp-query?> processing instruction. For example, if you copied your
stylesheets (including a home.xsl stylesheet) into the my_templates folder inside the xslt-template-files folder,
web users can use the following URL to request and process the stylesheets:
http://192.168.123.101/fmi/xsl/my_templates/home.xsl
Important The Web Publishing Engine does not allow web users to view the source for XSLT stylesheets
that are installed in the xslt-template-files folder. When web users send a request to process a stylesheet, the
Web Publishing Engine only sends the result of the stylesheet transformation to the web browser or program.