xml - XLM.transforming HTML with XLS -


i need help.

i have xml file :

<conferences>   <conference>     <edition>       <titre>titre 1</titre>       <date>2005</date>     </edition> </conference> <conference>     <edition>       <titre>titre 2</titre>       <date>2004</date>     </edition> </conference> <conference>     <edition>       <titre>titre 1</titre>       <date>2001</date>     </edition> </conference> <conference>     <edition>       <titre>titre 2</titre>       <date>2001</date>     </edition> </conference> <conference>     <edition>       <titre>titre 3</titre>       <date>2002</date>     </edition> </conference> </conferences> 

i wants :

titre 1 : 2005 2001

titre 2 : 2004 2001

titre 3 : 2002

i have xsl file. arrive don't have title duplicates :

 <xsl:key name="product" match="conferences/conference/edition/titre" use="." /> <xsl:template match="conferences">  <h1> sommaire des conférences </h1> <xsl:for-each select="conference/edition/titre[generate-id() = generate-id(key('product',.)[1])]">     <p>       <xsl:value-of select="."/>     </p> </xsl:for-each> </xsl:template> 

but don't see how view dates, can me ?

thanks

try:

<xsl:key name="product" match="conferences/conference/edition/titre" use="." />  <xsl:template match="/conferences">     <h1> sommaire des conférences </h1>     <xsl:for-each select="conference/edition/titre[generate-id() = generate-id(key('product',.)[1])]">         <p>             <xsl:value-of select="."/>             <xsl:for-each select="key('product', .)">                 <xsl:text> </xsl:text>                 <xsl:value-of select="../date"/>             </xsl:for-each>         </p>     </xsl:for-each> </xsl:template> 

Comments

Popular posts from this blog

python - mat is not a numerical tuple : openCV error -

c# - MSAA finds controls UI Automation doesn't -

wordpress - .htaccess: RewriteRule: bad flag delimiters -