D'après http://www.zend.com/forums/index.php...49076b1ca2457d
Si c'est libxml le processeur, ceci devrait marcher :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:exslt="http://exslt.org/common" > <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes" /> <xsl:variable name="maselection"><ids><id>2008</id> <id>2004</id> <id>2002</id></ids></xsl:variable> <xsl:template match="/"> <root> <xsl:for-each select="//element[id=exslt:node-set($maselection)//id]"> <xsl:copy-of select="."/> </xsl:for-each> </root> </xsl:template> </xsl:stylesheet>
Partager