samedi 14 mars 2015

firefox dose not display the result xml when converting it to another xml using xslt


Vote count:

0




I have this xml code



<?xml version="1.0"?>
<products>
<product id="p1" name="Delta" price="3250" stock="4" country="Denmark"/>
<product id="p2" name="Golf" price="1000" stock="5" country="Germany"/>
<product id="p3" name="Alpha" price="1200" stock="19" country="Germany"/>
<product id="p4" name="Foxtrot" price="1500" stock="5" country="Australia"/>
<product id="p5" name="Tango" price="1225" stock="3" country="Japan"/>
</products>


I want to grouped it depend on "country", by using xslt stylesheet



<?xml version="1.0"?>
<xsl:stylesheet version="2.0" xmlns:xsl="http://ift.tt/tCZ8VR">
<xsl:output indent="yes"/>
<xsl:template match="/">
<products>
<xsl:for-each-group select="products/product" group-by="@country">
<xsl:comment>
<xsl:value-of select="current-grouping-key()"/>
</xsl:comment>
<xsl:for-each select="current-group()">
<xsl:copy-of select="."/>
</xsl:for-each>
</xsl:for-each-group>
</products>
</xsl:template>
</xsl:stylesheet>


I want to see the resulte on Firefox, the result is


Error during XSLT transformation: XSLT transformation failed.


instead of the deserve result, my question is why firefox does not display the result?



asked 1 min ago







firefox dose not display the result xml when converting it to another xml using xslt

Aucun commentaire:

Enregistrer un commentaire