tags:

views:

80

answers:

1

I have a problem in FileMaker; I wish to link the METADATA element/FIELD element “NAME” attribute to its corresponding data in the RESULTSET element/COL element.

However, I also wish to map the METADATA element/FIELD element “NAME” to "Content Standard for Digital Geospatial Metadata (CSDGM)" metadata elements

Sample XML Metadata Record with CSDGM Essential Elements

<?xml version="1.0" encoding="ISO-8859-1" ?>
  <metadata>
   <idinfo>
      <citation>
       <citeinfo>
          <origin>Louisiana State University Coastal Studies Institute</origin>
          <pubdate>20010907</pubdate>
          <title>Geomorphology and Processes of Land Loss in Coastal Louisiana, 1932 –
          1990</title>
       </citeinfo>
     </citation>
     <descript>
      <abstract>A raster GIS file that identifies the land loss process and
       geomorphology associated with each 12.5 meter pixel of land loss between
       1932 and 1990. Land loss processes are organized into a hierarchical
       classification system that includes subclasses for erosion, submergence,
       direct removal, and undetermined. Land loss geomorphology is organized
       into a hierarchical classification system that includes subclasses for both
       shoreline and interior loss.</abstract>
     <purpose>The objective of the study was to determine the land loss
      geomorphologies associated with specific processes of land loss in coastal
      Louisiana.</purpose>
    </descript>
A: 

I see it's a rather old post; do you still need an answer? If yes, then please clarify what you mean by ‘link element to element’ and whether you need to import this file, export it, or both.

Update: here's a basic XSLT that transforms FileMaker XML grammar into CSDGM. It assumes all data reside in a single table and are exported in the specified order. It also assumes that the GSDGM grammar has a single metadata as the root element and then repeats idinfo and children for every record.

Note that it won't convert FileMaker dates like 5/17/2010 to 20100517; it's possible to write this in XSLT, but it will be much faster to add a calculated field in the table that produces such a string and export this field instead of Date.

<?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">

  <!-- This transformation converts FileMaker FMPXMLRESULT into CSDGM. 
       The assumed source data structure is that:

    Origin
    Date
    Title
    Abstract
    Purpose -->

  <xsl:variable name="ORIG" select="1" />
  <xsl:variable name="DATE" select="2" />
  <xsl:variable name="TITL" select="3" />
  <xsl:variable name="ABST" select="4" />
  <xsl:variable name="PURP" select="5" />

  <!-- The resulting format is XML, ISO-8859-1 -->
  <xsl:output method="xml" encoding="ISO-8859-1" />

  <!-- Main -->
  <xsl:template match="/">
    <metadata>
      <xsl:for-each select="//fm:ROW">
        <idinfo>
          <citation>
            <citeinfo>
              <origin>
                <xsl:value-of select="fm:COL[$ORIG]" />
              </origin>
              <pubdate>
                <xsl:value-of select="fm:COL[$DATE]" />
              </pubdate>
              <title>
                <xsl:value-of select="fm:COL[$TITL]" />
              </title>
            </citeinfo>
          </citation>
          <descript>
            <abstract>
              <xsl:value-of select="fm:COL[$ABST]" />
            </abstract>
            <purpose>
              <xsl:value-of select="fm:COL[$PURP]" />
            </purpose>
          </descript>
        </idinfo>
      </xsl:for-each>
    </metadata>
  </xsl:template>

</xsl:stylesheet>
Mikhail Edoshin
Hi Mikhail,Thanks for your response; yes, I still need help with this problem. All of the solutions I’ve tried use the FileMaker FIELD element “NAME” in the output, but this is not what I want. I don’t want FileMaker FIELD names to appear in the output. Instead, I want the output to use the "Content Standard for Digital Geospatial Metadata (CSDGM)" metadata element names.I want ONLY to export the fileLet me know if you need additional information/clarificationBy the way, I’ve obtained a lot of help, useful tips and advice from your “Bits and Pieces” Weblog…thanks
Igboamerican
From what I understand you need an XSLT file to transform FileMaker grammar into this CSDGM. Can you explain the structure of your FileMaker file? Do all data reside in a single table, or there's more than one table to include in export?
Mikhail Edoshin
Yes, all the data reside in a single table
Igboamerican
Mikhail,That’s awesome! The output is exactly what I want; thanks a million
Igboamerican