Introduction

Introduction

XML (Extensible Markup Language) is a standardized way of formatting text to facilitate data exchange for machines and humans. Documents are composed of tags, or markup, surrounding the data content. The markup can describe the content or be a generic text or binary data holder:

<descriptor>data content</descriptor>
<COL><DATA>field content</DATA></COL>

That is all you really need to know about XML and FileMaker Pro 6, unless, of course, you also need some hints as to what to do with that knowledge! This book will help you understand what XML is and how to create XML documents with Filemaker Pro 6 export and web publishing. You will learn how FileMaker Pro XML can be transformed with Extensible Stylesheet Language (XSL) into text, Hypertext Markup Language (HTML), or other XML formats. Other XML formats can be transformed for importing data into FileMaker Pro 6 databases, so you will appreciate why XML is useful to you as a means of data exchanges.

The Design of This Book

Throughout the book, you will find examples of XML and XSL and corresponding FileMaker Pro 6 scripts and functions, if relevant.

Chapter 1 contains a brief history of XML, including samples of markup formatting and how SGML (Standard Generalized Markup Language), HTML, and XML are related. You will learn about the advantages of XML with some examples and definitions of XML terms. Character encoding, Unicode, and how it is used in XML and FileMaker Pro 6 is presented here. XPath, the process for determining the location of data within a XML documents, is also introduced.

Chapter 2 is about exporting and importing XML with FileMaker Pro 6. The first examples of the XML grammars, FMPXMLRESULT and FMPDSORESULT, are discussed here. You will learn how to create manual, calculated, and scripted exports of XML documents. How FileMaker Pro produces related fields, repeating fields, and other field formats in XML exports, imports, and web publishing is discussed. An introduction to XSL is also presented here, along with calculated and scripted imports of XML data into FileMaker Pro 6.

Chapter 3 teaches you about the Document Type Definition (DTD) and how it relates to XML. Many XML formats use a DTD to describe how the document should be formatted. Understanding DTDs is most useful if you are importing and exporting data between FileMaker Pro 6 and other systems. An exercise for creating Document Type Definitions uses FileMaker Pro 6 layout theme files and is included in this chapter.

Chapter 4 explores the DTD further by drilling down into the FileMaker Pro 6 grammars for XML import, export, and web publishing. The FMPXMLLAYOUT grammar is introduced along with more details about the FMPXMLRESULT and the FMPDSORESULT grammars. The Database Design Report found in FileMaker Developer 6 has its own grammar and the discussion of how XML and XSL is used for the report may help you understand these two technologies.

Chapter 5 explains how FileMaker Pro web publishes XML. You will be given suggestions and hints for designing your databases for optimum web publishing. How to make a Hypertext Transfer Protocol (HTTP) request to FileMaker Pro 6 is discussed. You will learn about the use of scripts with web-published databases. Some security hints and tips to add to recommendations by FileMaker, Inc., can be found in this chapter.

Chapter 6 discusses Hypertext Markup Language (HTML) and XHTML. This format for web pages or text pages displayed by browsers is a common method of displaying text, images, and hyperlinks to other documents. XML can be transformed into HTML, thus, detailed information about the HTML elements is presented here. To make HTML documents compliant with XML, XHTML recommendations are also considered. Form requests can be made to web-published FileMaker Pro 6 databases, so the similarities with hyperlink requests can be found in this chapter. The difference for using HTML on smaller browsers, such as mobile telephones, is discussed in this chapter.

Chapters 7 and 8 define the terms for stylesheet transformation of XML with XSL. XPath is explored further here for use with XSL. How browsers handle XSL and how FileMaker Pro uses XSL are also discussed here.