View stylesheet

XML schema http://dd.eionet.europa.eu/schemas/ods/ODSReport.xsd
Output type XML
Description Convert ODS submission 2021 to 2022 format
XSL file ODS_2021-2022.xsl (Last modified: 01 Feb 2022 09:33 )
<xsl:stylesheet
  version="1.0"
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  >

  <xsl:output method="xml" indent="yes" encoding="UTF-8"/>
  <xsl:strip-space elements="*" />


  <xsl:template match="node()|@*" name="identity">
    <xsl:copy>
      <xsl:apply-templates select="node()|@*"/>
    </xsl:copy>
  </xsl:template>
 

  <xsl:template match="@*[name() = 'xsi:noNamespaceSchemaLocation']">
    <xsl:attribute name="{name()}">http://dd.eionet.europa.eu/schemas/ods-2021/ODSReport.xsd</xsl:attribute>
  </xsl:template>

  
  
   <xsl:template match="ODSReporting/ODSQuantities/TotalProduction">
    <xsl:copy>
      <xsl:copy-of select="@*"/>
      <xsl:copy-of select="node()"/>
      <Comments/>
    </xsl:copy>
  </xsl:template>
  
  
  
    <xsl:template match="ODSReporting/ODSQuantities/Destruction">
    <xsl:copy>
      <xsl:copy-of select="@*"/>
      <xsl:copy-of select="node()"/>
      <Comments/>
    </xsl:copy>
  </xsl:template>
  
  
<xsl:template match="ODSReporting/ODSQuantities/ExportFromEU/ExportQuantity">
  <xsl:if test="(./CustomsProcedure) and (./CustomsProcedure) != ''">      
    <xsl:copy>
      <xsl:apply-templates select="node()|@*"/>
    </xsl:copy>
  </xsl:if>
</xsl:template>

 

</xsl:stylesheet>