Page 1 of 1

[solved] How to add custom table to xsl?

Posted: Thu Aug 20, 2020 12:00 pm
by AlexK
I've got a problem adding data from custom table to xsl. Any help would be appreciated ;)

So, I use table field Custom 19 like this:
2020-08-20_14-55-29.png (56.96 KiB) Viewed 72 times
I'd like to list all the entries from this table for the given book in right or bottom panel.
How do I count entries?
I tried different variations, but none worked:
<xsl:if test="count(custom19/custom19)>0">
<xsl:if test="count(custom19/publishercustom)>0">
<xsl:if test="count(publishercustom/publishercustom)>0">
How to get data field name?
Same here, I tried combining all the strings I have, none worked:
<xsl:value-of select="/data/fld/book/custom19/@name"/>
<xsl:value-of select="/data/fld/book/publishercustom/@name"/>
<xsl:value-of select="/data/fld/publishercustom/@name"/>

Re: How to add custom table to xsl?

Posted: Wed Sep 09, 2020 5:43 pm
by AlexK
I found a solution.
Table Cutom 19 should be addressed as custom19list in xsd.
So layout for book can be something like that:
<xsl:if test="count(custom19list/custom19)>0">
<td><xsl:value-of select="/data/fld/book/custom19/@name"/></td>
<xsl:for-each select="custom19list/custom19">
<xsl:value-of select="."/><xsl:text>, </xsl:text>
Still I can't understand why value-of for @name have suddenly started to work.