Chad,
I suspect this question is related to your earlier question "InDesign
carriage return in FMP Calculation field" since the solution is
exactly the same, except you omit the tag formatting.
You may test this with a file with 5 fields
- name
- street
- city
- state
- zip
export this data (in that order) as XML while using this XSL style
sheet ('fm2indesign.xsl').
Winfried
www.fmdiff.com
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:fmp="http://www.filemaker.com/fmpxmlresult" version="1.0"
exclude-result-prefixes="fmp">
<xsl:output method="text" encoding="UTF-8" indent="no"/>
<xsl:template match="//fmp:FMPXMLRESULT">
<xsl:text><ASCII-MAC>
</xsl:text>
<xsl:apply-templates select="fmp:RESULTSET"/>
</xsl:template>
<xsl:template match="fmp:ROW">
<!-- name --> <xsl:text><pstyle:><ct:Regular><cs:
14.000000><cf:Arial></xsl:text>
<xsl:value-of select="fmp:COL[1]/fmp:DATA"/>
<xsl:text>
</xsl:text>
<!-- street -->
<xsl:text><pstyle:><ct:Regular><cs:
12.000000><cf:Arial></xsl:text>
<xsl:value-of select="fmp:COL[2]/fmp:DATA"/>
<xsl:text>
</xsl:text>
<!-- city -->
<xsl:text><pstyle:><ct:Regular><cs:
12.000000><cf:Arial></xsl:text>
<xsl:value-of select="fmp:COL[3]/fmp:DATA"/>
<xsl:text> </xsl:text>
<!-- state (if exists) -->
<xsl:if test="fmp:COL[4]/fmp:DATA!=''">
<xsl:text><pstyle:><ct:Regular><cs:
12.000000><cf:Arial></xsl:text>
<xsl:value-of select="fmp:COL[4]/fmp:DATA"/>
<xsl:text>, </xsl:text>
</xsl:if>
<!-- zip -->
<xsl:text><pstyle:><ct:Regular><cs:
12.000000><cf:Arial></xsl:text>
<xsl:value-of select="fmp:COL[5]/fmp:DATA"/>
<xsl:text>
</xsl:text>
</xsl:template>
</xsl:stylesheet>
On 2009-10-14, at 00:34, Chad Chelius wrote:
I'm exporting the contents of a FMP field to create a list of names
and addresses. I need to add a header to the exported file but it
only appears once at the top of the exported file and not before
each exported record. How would I go about achieving that?
Chad Chelius