Filemaker XSL Select Column By Name
- by Kevin Sylvestre
I am looking to export from Filemaker using column names (instead of positions). Currently I export the following XSL stylesheet that exports by position with:
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:fm="http://www.filemaker.com/fmpxmlresult" exclude-result-prefixes="fm" >
<xsl:output method="xml" version="1.0" encoding="utf-8" indent="yes"/>
<xsl:template match="/">
<people>
<xsl:for-each select="fm:FMPXMLRESULT/fm:RESULTSET/fm:ROW">
<person>
<name>
<xsl:value-of select="fm:COL[01]/fm:DATA"/>
</name>
<location>
<xsl:value-of select="fm:COL[02]/fm:DATA"/>
</location>
</person>
</xsl:for-each>
</people>
</xsl:template>
</xsl:stylesheet>
Any ideas? Thanks.