4.1 FMPXMLLAYOUT SchemaGrammar

Overview

FileMaker Pro uses three different Document Type Definitions to return the XML results from an HTTP action request. The definitions are called schema, or grammar formats, by FileMaker Pro, and they follow the World Wide Web Consortium recommendation for creating DTDs. The first schema, FMPXMLLAYOUT, defines what layout information will be returned when the -format is -fmp_xml and the action is -view. The other two definitions, FMPXMLRESULT and FMPDSORESULT, are the schemata for field level information to be returned in distinct formats. The DTD or schema that you choose to use in any XML request to FileMaker Pro may depend upon what information you are extracting from the database. We will explore these data formats and the DTD for the Document Design Report XML documents.

The grammar formats for FMPXMLLAYOUT, FMPXMLRESULT, and FMPDSORESULT are normally installed with FileMaker Developer or FileMaker Unlimited as the HTML files fmpxmllayout_dtd.htm, fmpxmlresult_dtd.htm, and fmpdsoresult_dtd.htm, respectively. With FMP 6 the fmpxmlresult_dtd.htm and fmpdsoresult_dtd.htm files are installed with a normal install. You can view these files in a text editor, but they are formatted for viewing in a web browser. This chapter continues to explain the standards for writing DTDs by reviewing the FileMaker Pro Document Type Definitions. As demonstrated in Chapter 2, FileMaker Pro 6 uses the FMPXMLRESULT grammar for the export and import of XML. The FMPDOSRESULT grammar can be used to export XML from FileMaker Pro 6. The FMPXMLLAYOUT grammar is only available from an HTTP request to Web Companion when web publishing FileMaker Pro. See Chapter 5, "XML and FileMaker Pro Web Publishing", for information about setting up FileMaker Pro for web publishing and about making HTTP requests.

The examples in this chapter use the sample files available in the FileMaker Templates folder. The templates are installed in the FileMaker Pro 6 folder and may be used as the basis for your own FileMaker Pro solutions. They may be used to recreate the code listings found here. The steps necessary to create the results will be presented with the path to the template file.

Note 

The Internet Explorer browser will apply a default stylesheet to an XML document. This will make it "pretty-print" with indentations for each level of the XML tree. It also has convenient handles (-/+) to collapse or expand these levels. It is an easy way to see the structure of an XML document. The Netscape browser does not have this default stylesheet for XML, and you may only see the contents of the data without any element tags. Common text editors and word processors may also display the XML document in different ways.



Filemaker Pro 6 Developer's Guide to XML(s)XSL
FileMaker Pro 6 Developers Guide to XML/XSL (Wordware Library for FileMaker)
ISBN: 155622043X
EAN: 2147483647
Year: 2003
Pages: 100
Authors: Beverly Voth

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net