Loading ...
Sorry, an error occurred while loading the content.

1086Re: Loading govtrack data into Filemaker

Expand Messages
  • cb299y
    Nov 13, 2012
    • 0 Attachment
      So here is the text of the XSLT file I created (I can see that others have posted file attachments, but I can't see a button to do it here. But who cares, it's just text.) So here ya go:


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

      <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

      <xsl:output indent="yes" method="xml"/>

      <xsl:template match="people">

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

      <ERRORCODE>0</ERRORCODE>

      <PRODUCT BUILD="10-09-2012" NAME="FileMaker" VERSION="Pro 12.0v3"/>

      <DATABASE DATEFORMAT="M/d/yyyy" LAYOUT="" NAME="people.112" RECORDS="{@count}" TIMEFORMAT="h:mm:ss a"/>

      <METADATA>

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

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

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

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

      <FIELD EMPTYOK="YES" MAXREPEAT="1" NAME="birthday" TYPE="DATE"/>

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      </METADATA>

      <RESULTSET FOUND="{@count}">

      <xsl:for-each select="person">

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

      <COL><DATA><xsl:value-of select="@id"/></DATA></COL>

      <COL><DATA><xsl:value-of select="@lastname"/></DATA></COL>

      <COL><DATA><xsl:value-of select="@firstname"/></DATA></COL>

      <COL><DATA><xsl:value-of select="@middlename"/></DATA></COL>

      <COL><DATA><xsl:value-of select="@birthday"/></DATA></COL>

      <COL><DATA><xsl:value-of select="@gender"/></DATA></COL>

      <COL><DATA><xsl:value-of select="@religion"/></DATA></COL>

      <COL><DATA><xsl:value-of select="@pvsid"/></DATA></COL>

      <COL><DATA><xsl:value-of select="@osid"/></DATA></COL>

      <COL><DATA><xsl:value-of select="@bioguideid"/></DATA></COL>

      <COL><DATA><xsl:value-of select="@metavidid"/></DATA></COL>

      <COL><DATA><xsl:value-of select="@youtubeid"/></DATA></COL>

      <COL><DATA><xsl:value-of select="@twitterid"/></DATA></COL>

      <COL><DATA><xsl:value-of select="@icpsrid"/></DATA></COL>

      <COL><DATA><xsl:value-of select="@facebookgraphid"/></DATA></COL>

      <COL><DATA><xsl:value-of select="@thomasid"/></DATA></COL>

      <COL><DATA><xsl:value-of select="@name"/></DATA></COL>

      <COL><DATA><xsl:value-of select="@title"/></DATA></COL>

      <xsl:for-each select="role">

      <COL><DATA><xsl:value-of select="@type"/></DATA></COL>

      <COL><DATA><xsl:value-of select="@startdate"/></DATA></COL>

      <COL><DATA><xsl:value-of select="@enddate"/></DATA></COL>

      <COL><DATA><xsl:value-of select="@party"/></DATA></COL>

      <COL><DATA><xsl:value-of select="@state"/></DATA></COL>

      <COL><DATA><xsl:value-of select="@district"/></DATA></COL>

      <COL><DATA><xsl:value-of select="@url"/></DATA></COL>

      <COL><DATA><xsl:value-of select="@address"/></DATA></COL>

      <COL><DATA><xsl:value-of select="@current"/></DATA></COL>

      </xsl:for-each>

      </ROW>

      </xsl:for-each>

      </RESULTSET>

      </FMPXMLRESULT>

      </xsl:template>

      </xsl:stylesheet>
    • Show all 3 messages in this topic