xslt - Filemaker XSL Importing blank fields -


in learning import xml items filemaker 13 i've run problem using "xsl:for-each" obtain multiple rows of data import. xml i've been using w3 schools music example.

the xsl i'm using convert xml follows:

<?xml version='1.0' encoding='utf-8'?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/xsl/transform"> <xsl:template match="/">  <fmpxmlresult xmlns="http://www.filemaker.com/fmpxmlresult">    <metadata>       <field name="title" type="text"/>       <field name="artist" type="text"/>       <field name="country" type="text"/>       <field name="company" type="text"/>       <field name="price" type="number"/>       <field name="year" type="number"/>   </metadata>    <resultset>       <xsl:for-each select="catalog/cd">              <row>         <col>           <data><xsl:value-of select="catalog/cd/title"/></data>         </col>         <col>           <data><xsl:value-of select="catalog/cd/artist"/></data>         </col>         <col>           <data><xsl:value-of select="catalog/cd/country"/></data>         </col>         <col>           <data><xsl:value-of select="catalog/cd/company"/></data>         </col>         <col>           <data><xsl:value-of select="catalog/cd/price"/></data>         </col>         <col>           <data><xsl:value-of select="catalog/cd/year"/></data>         </col>              </row>       </xsl:for-each>        </resultset> </fmpxmlresult>  </xsl:template> </xsl:stylesheet> 

if remove "xsl:for-each" lines, reliably first record xml imported filemaker. "xsl:for-each" lines in place shown, 26 blank records. there 26 items in xml, good, i'm not getting data.

as aside, if xsl select string modified read "catalog/cd/title[4]", believe should return fourth record in xml, again blank record.

what missing here?

inside of for-each context node cd element paths need relative e.g. <xsl:value-of select="title"/>


Comments

Popular posts from this blog

python - No exponential form of the z-axis in matplotlib-3D-plots -

php - Best Light server (Linux + Web server + Database) for Raspberry Pi -

c# - "Newtonsoft.Json.JsonSerializationException unable to find constructor to use for types" error when deserializing class -