Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

XSL to output data from multiple tables


This topic is 7100 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • Newbies
Posted

Hi everyone,

I've been beating my head against a wall trying to figure this problem out. I'll try to simplify the problem to explain it better. I have a FMP database that I want export to XML. I have 2 tables that I want to export that have these fields:

Curatorial table

-----------------

curtitle

thumb

Curatorial_detail table

-----------------------

curtitle

body

media

Obviously the "curtitle" field links the 2 tables, and this is a one-to-many relationship with one Curatorial record having many Curatorial_detail records.

I would like to export these tables into an XML file that is in this format:

**********************XML FILE*****************************

<?xml version="1.0" encoding="UTF-8"?>

<curatorial>

____<section title="Section Title">

________<screen>

____________<text>This is the text...it is going to be very long...let's keep going because it's...</text>

____________<media>media/video/test.mpg</media>

________</screen>

________<screen>

____________<text>testestestestestest</text>

____________<media>media/video/test.mpg</media>

________</screen>

________<screen>

____________<text>This is a different World.!</text>

____________<media>media/test.jpg</media>

________</screen>

____</section>

____<section title="Section Title">

________<screen>

____________<text>testestestestestestestesetestestestestestestestestestestestestestestestest</text>

____________<media>media/L1formandbranch.jpg</media>

________</screen>

____</section>

</curatorial>

**********************END FILE*****************************

I've tried Exporting Records from both the Curatorial table and the Curatorial_detail table, and I've been closest when exporting from the Curatorial_detail table, and adding the linked "Curatorial::curtitle" field to the detail fields. But I haven't been able to figure out how to set up the XSL to export in the desired XML format.

I've attached an XSL file that I've been trying to get working.

If anyone has any suggestions on how to get the desired XML format, I'd really appreciate it!

Thanks!

curatorial.zip

This topic is 7100 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.