XML schema | |
---|---|
Output type | HTML |
Description | FGases stocks conversion |
XSL file | fgases-stocks.xsl (Last modified: 31 Mar 2016 09:47 ) |
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="xml" indent="yes" encoding="UTF-8"/> <xsl:param name="companyId"/> <xsl:param name="transactionYear"/> <xsl:template match="/"> <stocks> <xsl:choose> <xsl:when test="count(/child::*/child::*[portal_code = $companyId and transaction_year = $transactionYear]) = 0"> <stock /> </xsl:when> <xsl:otherwise> <xsl:for-each select="/child::*/child::*[portal_code = $companyId and transaction_year = $transactionYear]"> <stock> <xsl:element name="transactionCode"><xsl:value-of select="transaction_code"/></xsl:element> <xsl:element name="gasId"><xsl:value-of select="gas_id"/></xsl:element> <xsl:element name="gasName"><xsl:value-of select="gas_name_IA"/></xsl:element> <xsl:element name="amount"><xsl:value-of select="amount_mix"/></xsl:element> </stock> </xsl:for-each> </xsl:otherwise> </xsl:choose> </stocks> </xsl:template> </xsl:stylesheet>
European Environment Agency
Kgs. Nytorv 6, DK-1050 Copenhagen K, Denmark