XSL - choose et test pour balise vide
Bonjour,
Je tente d'afficher uniquement les balises dont j'ai besoin mais le code ne fonctionne pas. Pourtant je me suis aidé de ce topic qui dit tout :
http://www.developpez.net/forums/vie...692255#1692255
Voici mon fichier XML
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
|
<FMPDSORESULT xmlns="http://www.filemaker.com/fmpdsoresult">
<ERRORCODE>0</ERRORCODE>
<DATABASE>allocine_4_1.fp7</DATABASE>
<LAYOUT />
<ROW MODID="43" RECORDID="5">
<ID_Scenario>1</ID_Scenario>
<A_ID_NomTache>Visualiser</A_ID_NomTache>
<A_ID_TypeLot1>lot1</A_ID_TypeLot1>
<A_ID_TypeLot2>lot2</A_ID_TypeLot2>
<A_ID_TypeLot3>lot3</A_ID_TypeLot3>
<A_ID_TypeLot4>lot4</A_ID_TypeLot4>
<A_ID_TypeLot5 />
<A_ID_TypeLot6 />
<A_ID_TypeLot7 />
<A_ID_TypeLot8 />
<A_ID_TypeLot9 />
<A_ID_TypeLot10 />
<A_ID_Segment1_coordX>0</A_ID_Segment1_coordX>
<A_ID_Segment2_coordX>0</A_ID_Segment2_coordX>
<A_ID_Segment3_coordX>0</A_ID_Segment3_coordX>
<A_ID_Segment4_coordX>0</A_ID_Segment4_coordX>
<A_ID_Segment5_coordX />
<A_ID_Segment6_coordX />
<A_ID_Segment7_coordX />
<A_ID_Segment8_coordX />
<A_ID_Segment9_coordX />
<A_ID_Segment10_coordX />
</ROW>
</FMPDSORESULT> |
Mon fichier XSL
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
|
<xsl:choose>
<xsl:when test="//A_ID_Segment1_coordX[not(*)]">
<textbox>
<xsl:attribute name="flex">
<xsl:text>0</xsl:text>
</xsl:attribute>
<xsl:attribute name="multiline">
<xsl:text>true</xsl:text>
</xsl:attribute>
<xsl:attribute name="cols">
<xsl:text>1</xsl:text>
</xsl:attribute>
<xsl:attribute name="rows">
<xsl:text>1</xsl:text>
</xsl:attribute>
<xsl:attribute name="left">
<xsl:value-of select="//fmp:A_ID_Segment1_coordX"/>
</textbox>
</xsl:when>
<xsl:otherwise></xsl:otherwise>
</xsl:choose> |
J'ai essayé 1000 choses .et rien. Si quelqu'un pouvait me débloquer et me dire ce qui ne va pas.
Merci :)