Groups | Search | Server Info | Login | Register


Groups > comp.databases.filemaker > #319

Export to XML, non flat, using xslt

Newsgroups comp.databases.filemaker
Subject Export to XML, non flat, using xslt
From clk@tele2.ch (Christoph Kaufmann)
Date 2011-07-24 09:35 +0200
Message-ID <1k4wjz9.v0rob3nih2m6N%clk@tele2.ch> (permalink)
Organization CLK.ch

Show all headers | View raw


Can someone point me to a tutorial how to phrase an XSLT file that
translates my FMPXMLRESULT export into a non-flat XML file? The desired
XML file (ISO 200200) contains
- one element "A"
- which contains one or more elements "B"
- which contain one or more elements "C"

In the Filemaker solution, B is a child of A and C is a child of B.

Following a hint in "Filemaker 10 in Depth", I found Jesse Feiler's
introduction on
<http://www.northcountryconsulting.com/content/filemaker-and-xml>

Feiler's example turns a flat Filemaker table into a flat table in xml
format. He uses
<xsl:for-each select="fmp:RESULTSET/fmp:ROW">
to loop through the records

and 
<xsl:for-each select="fmp:COL">
<xsl:choose>
<xsl:when test="position()='1'">

to loop through the fields (where "position" refers to Filemaker's the
export field order.

Since I can export from one table only, my guess is a export C records
and add the B and A data with calc fields. Now how do I tell the XSLT
file to open and close A and B elements in the proper place?

After sorting the records in FMP, I could get the record's position in
the found set and the previous records data to tell whether a record is
the first one of a new B element, and what's that B element's data.

Can I use xsl commands to search for field data? Or, more general, are
there more xsl tutorials like Feiler's out there, i.e. something I can
understand although I'm not into web publishing?

-- 
http://clk.ch

Back to comp.databases.filemaker | Previous | Next | Find similar


Thread

Export to XML, non flat, using xslt clk@tele2.ch (Christoph Kaufmann) - 2011-07-24 09:35 +0200

csiph-web