Bits and Pieces

Mikhail Edoshin's FileMaker® weblog

Modular XSLT, part 2: Simple export

As you know you can export or request data from FileMaker in XML and then transform the XML using a XSLT stylesheet into some other format. The question is: how do you approach writing such a stylesheet? Are there some universal techniques? Can you save some effort?

Here's a general tutorial, covering a basic export to simple XML format. As you'll see it isn't just a look-ma-it's-XML sample, but more like a foundation for any many well, at least some XSL-transformation problems.

The tutorial assumes you know XSLT basics and maybe have even tried to export something from FileMaker using the built-in XSLT processor. For example, you must understand what <xsl:temlplate> or <xsl:param> are for. If you don't know XLST, you might want to start from some XSLT Tutorial, like this quick one by W3Schools or that more detailed one by Zvon; this is where I started.

Technorati Tags: FileMaker

Continue reading "Modular XSLT, part 2: Simple export" »

May 17, 2006 in XML/XSLT | Permalink | Comments (10) | TrackBack (0)

Use modular XSLT to simplify importing XML data into FileMaker

A simple XSLT file encapsulates the target FileMaker grammar into easy-to-use parameterized templates; once written, the file can power any import task with no changes.

To import XML data into FileMaker you have to write:

  • Elements of the source grammar;
  • Elements of the target grammar, FMPXMLRESULT;
  • A list of instructions to transform the former into the latter.

You can put all of this into a single file and it will work; almost all XSLT samples are written this way. But as you face more and more complex import task, you start seeing the drawbacks of this approach:

  • You'll have to repeat all the verbose syntax of the target grammar for every XSLT file you write;
  • A mix of source and target elements and XSLT instructions can become hardly readable, that is error-prone and difficult to manage.

The universal way to manage complexity is to break something complex into modules that hide all the complexity beneath a simple interface. Let see how it can be done with XSLT.

Continue reading "Use modular XSLT to simplify importing XML data into FileMaker" »

October 14, 2005 in Coding, XML/XSLT | Permalink | Comments (8) | TrackBack (0)

My Photo
Subscribe to this blog's feed

Categories

  • Calculating
  • Coding
  • Custom Functions
  • Formatting
  • Interface
  • IWP
  • News
  • Printing
  • XML/XSLT

Archives

  • March 2009
  • July 2008
  • December 2006
  • June 2006
  • May 2006
  • February 2006
  • January 2006
  • December 2005
  • November 2005
  • October 2005

About

Recent Posts

  • My new site
  • Hierarchies in FileMaker
  • Miscellaneous tips
  • How to bypass the IWP login page
  • Cross-tab reports made easy
  • Soundex sample
  • Linked fields
  • Modular XSLT, part 2: Simple export
  • Options
  • Fraction(): approximate a number as a common fraction
Blog powered by TypePad
Member since 09/2005

Technical

  • Technorati