Bonjour,

je me permet de vous solliciter pour un problème XSL qui va peut être vous sembler basique. Ceci dit, je débute (3j) en XML/XSL et on me demande au plus vite de faire une modification XSL :
Dans le code suivant, je fais un count et un select pour insertion dans une BDD sur un substring = 'D'. Or, ces compteurs doivent accepter d'autres valeurs : 'A' , 'F', ''X' et je ne sais comment modifier les lignes en rouge.

Aussi, toute aide et/ou piste est la bienvenue.

Merci

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
<xsl:choose>
	<xsl:when test="count(/Equip/Elt[ArticlePtr[
			attribute::PartNum=$PartNum and attribute::MajInd=$MajInd and attribute::MinInd=$MinInd and
			attribute::IndiceQuality=$Quality and attribute::Version=$Version
			]]/ArtElmt/ArtPart/PartPtr[substring(attribute::PartNum,1,1)='D']) > 0 ">
		<xsl:for-each select="/Equip/Elt[ArticlePtr[
			attribute::PartNum=$PartNum and attribute::MajInd=$MajInd and attribute::MinInd=$MinInd and
			attribute::IndiceQuality=$Quality and attribute::Version=$Version
			]]/ArtElmt/ArtPart/PartPtr[substring(attribute::PartNum,1,1)='D']">
			<xsl:if test='position()=1'>				
				<xsl:value-of select="@PartNum"/>	<xsl:text>', '00', '</xsl:text>
			</xsl:if>
		</xsl:for-each>
	</xsl:when>