ユーザー データベースを XML ファイルに保存するアプリケーションがあり、選択したフィールドを Filemaker にエクスポートして、クライアントと Filemaker でデータをマイニングする必要があります。XML 要素をインポートする XSLT ファイルを作成することはできましたが、要素をインポートする方法が見つからないようです。この問題を解決するための指針が大いに期待されています。
XML ファイルの例:
<?xml version="1.0" encoding="utf-8"?>
<APPLICATION_NAME>
<USERS>
<USER>
<ID>15001</ID>
<USERNAME>Administrator</USERNAME>
<!-- other elements -->
<PROPERTYBAG>
<ITEM NAME="LastModifiedDate" VALUE="Fri, 05 Sep 2008 13:13:16 GMT"/>
<ITEM NAME="Registered" VALUE="5.9.2008 16:13:16"/>
<!-- other elements -->
</PROPERTYBAG>
</USER>
<!-- more users -->
</USERS>
</APPLICATION_NAME>
これまでのところ、このサイトの指示に従って要素をインポートできました: http://edoshin.skeletonkey.com/2005/10/use_modular_xsl.html
そして、これらの要素をインポートするが属性をインポートしない XSLT は次のとおりです。
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns="http://www.filemaker.com/fmpxmlresult">
<xsl:include href="FileMaker.xslt"/>
<xsl:template match="/">
<xsl:call-template name="TABLE">
<xsl:with-param name="METADATA-FIELDS">
<xsl:call-template name="FIELD">
<xsl:with-param name="NAME" select="'ID'"/>
</xsl:call-template>
<xsl:call-template name="FIELD">
<xsl:with-param name="NAME" select="'USERNAME'"/>
</xsl:call-template>
<xsl:call-template name="FIELD">
<xsl:with-param name="NAME" select="'ISADMINISTRATOR'"/>
</xsl:call-template>
<xsl:call-template name="FIELD">
<xsl:with-param name="NAME" select="'LastModifiedDate'"/>
</xsl:call-template>
<xsl:call-template name="FIELD">
<xsl:with-param name="NAME" select="'Registered'"/>
</xsl:call-template>
</xsl:with-param>
<xsl:with-param name="RESULTSET-RECORDS">
<xsl:for-each select="//USER">
<xsl:call-template name="ROW">
<xsl:with-param name="COLS">
<xsl:call-template name="COL">
<xsl:with-param name="DATA" select="ID"/>
</xsl:call-template>
<xsl:call-template name="COL">
<xsl:with-param name="DATA" select="USERNAME"/>
</xsl:call-template>
<xsl:call-template name="COL">
<xsl:with-param name="DATA" select="ACCOUNT/ISADMINISTRATOR"/>
</xsl:call-template>
<xsl:call-template name="COL">
<xsl:with-param name="DATA" select="@Registered"/>
</xsl:call-template>
</xsl:with-param>
</xsl:call-template>
</xsl:for-each>
</xsl:with-param>
</xsl:call-template>
</xsl:template>
</xsl:stylesheet>