dbTalk Databases Forums  

Export to XML, non flat, using xslt

comp.databases.filemaker comp.databases.filemaker


Discuss Export to XML, non flat, using xslt in the comp.databases.filemaker forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Christoph Kaufmann
 
Posts: n/a

Default Export to XML, non flat, using xslt - 07-24-2011 , 02:35 AM






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

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.