mardi 23 octobre 2018

XSL Test error at least one contains instead of only the one

With several xml documents containing topic elements and only one file containing a topic element with attribute product="OPTION".

I'd like to write OPTION if the attribute is set for the topic and TOTO if no attribute exists for the topic.

The problem is that actally if at least one file contains the attribute product="OPTION" OPTION is written on every generated pdf page.

<xsl:choose>
                    <xsl:when test="topic/@product='OPTION2'">
                        <fo:inline xsl:use-attribute-sets="title__option">
                            <xsl:text>OPTION</xsl:text>
                        </fo:inline>
                    </xsl:when>
                    <xsl:otherwise>
                        TOTO
                    </xsl:otherwise>
                </xsl:choose>

WOuld you be so kind to help me dealing with that test? thansks, best regards

Aucun commentaire:

Enregistrer un commentaire