XML : Filemaker xml export of related items (part II: now in a table)

michael.hor257k helped me tremendously with this:

  <subitems>      <xsl:for-each select="fm:item_number/fm:DATA">          <xsl:variable name="i" select="position()" />          <subitem>          <item_number>              <xsl:value-of select="."/>          </item_number>          <item_name>              <xsl:value-of select="../../fm:item_name/fm:DATA[$i]"/>          </item_name>          </subitem>      </xsl:for-each>  </subitems>    

For a lay-out reason I need the related data to flow into Indesign table cells:

  <table_related xmlns:aid="http://ns.adobe.com/AdobeInDesign/4.0/" aid:table="table" aid:trows="" aid:tcols="1">  <xsl:variable name="i" select="position()" />  <xsl:for-each select="fm:item_number/fm:DATA">        <cell_related aid:table="cell" aid:crows="??" aid:ccols="1" aid:ccolwidth="250">        <item_number><xsl:value-of select="."/></item_number>        <item_name><xsl:value-of select="../../fm:item_name/fm:DATA[$i]"/</item_name>     </cell_related>  </xsl:for-each>  </table_related>    

To get the correct formatting the table need the input of the number of rows (aid:crows="??") The number of related records varies, ergo the number of table rows varies. How to get the number of related records on the postion of the question marks?

No comments:

Post a Comment