Filemaker XSL Select Column By Name

Posted by Kevin Sylvestre on Stack Overflow See other posts from Stack Overflow or by Kevin Sylvestre
Published on 2010-06-08T04:27:15Z Indexed on 2010/06/08 4:32 UTC
Read the original article Hit count: 246

Filed under:
|
|

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.

© Stack Overflow or respective owner

Related posts about xslt

Related posts about xsl