Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

XSLT and multiple rows per record

Featured Replies

Currently I have a stylesheet that will take exported FMPro data and convert it into an html file with a simple table: one row per record with three columns to match the date. For example:

___________________________________________________

|image source info 1 | image name 1 | description 1|

___________________________________________________

|image source info 2 | image name 2 | description 2|

___________________________________________________

What I would like is for each record to span two rows, like this:

___________________________________________________

|image source -> | image name 1----------> |

|info 1 here ---> |_____________________________|

|[space here] --> | image description 1------> |

___________________________________________________

I don't know enough to make this happen and am wondering if someone can point me in the right direction?

Thanks in advance,

Yvonne

This is just an example:

the xml export :


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

<FMPXMLRESULT xmlns="http://www.filemaker.com/fmpxmlresult">

    <ERRORCODE>0</ERRORCODE>

    <PRODUCT BUILD="24/03/2003" NAME="FileMaker Pro" VERSION="6.0Fv4"/>

    <DATABASE DATEFORMAT="d/M/yyyy" LAYOUT="" NAME="images.fp5" RECORDS="2" TIMEFORMAT="k:mm:ss "/>

    <METADATA>

        <FIELD EMPTYOK="YES" MAXREPEAT="1" NAME="image source info" TYPE="TEXT"/>

        <FIELD EMPTYOK="YES" MAXREPEAT="1" NAME="image name" TYPE="TEXT"/>

        <FIELD EMPTYOK="YES" MAXREPEAT="1" NAME="description" TYPE="TEXT"/>

    </METADATA>

    <RESULTSET FOUND="2">

        <ROW MODID="0" RECORDID="1">

            <COL>

                <DATA>/folder/image1.jpg</DATA>

            </COL>

            <COL>

                <DATA>name of image 1</DATA>

            </COL>

            <COL>

                <DATA> description of image 1</DATA>

            </COL>

        </ROW>

        <ROW MODID="1" RECORDID="2">

            <COL>

                <DATA>/folder/image2.jpg</DATA>

            </COL>

            <COL>

                <DATA>name of image 2</DATA>

            </COL>

            <COL>

                <DATA> description of image 2</DATA>

            </COL>

        </ROW>

    </RESULTSET>

</FMPXMLRESULT>

the xsl file :


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

<xsl:stylesheet exclude-result-prefixes="fmp" version="1.1"

xmlns:fmp="http://www.filemaker.com/fmpxmlresult" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:output doctype-public="xml" encoding="UTF-8" indent="yes" method="xml" version="1.0"/>

<xsl:template match="fmp:FMPXMLRESULT">

<html>

<head/>

<body>

<table>

<xsl:apply-templates select="fmp:RESULTSET/fmp:ROW"/>

</table>

</body>

</html>

</xsl:template>

<xsl:template match="fmp:RESULTSET/fmp:ROW">

<tr>

<td>

<xsl:value-of select="fmp:COL[1]/fmp:DATA"/>

</td>

<td>

<xsl:value-of select="fmp:COL[2]/fmp:DATA"/>

</td>

</tr>

<tr>

<td>

<xsl:text>

  • Author

Thanks, Jean-Marie, that was exactly what I needed!

- Yvonne

Create an account or sign in to comment

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.