jeudi 29 octobre 2015

xslt performance issue with large if conditions

In my xslt i have code like

 <xsl:param name="acceptType"/>
 <xsl:template match="element-1|element-2............|element-n>
   <xsl:if test=".!=''">           
         <xsl:if test="not(contains($acceptType, 'xml'))">
            <xsl:element name="{local-name()}">
               <xsl:value-of select="$pARRAY"/>
            </xsl:element>
         </xsl:if>
      </xsl:if>
   </xsl:template>

Here i have nearly 1000 elements .Because of this condition checking we are having the performance issue.Is there any alternative way for doing this?.I am thinking to put a global boolean variable and want to check that variable.Is it the right way to increase performance.

Thanks in advance..

Aucun commentaire:

Enregistrer un commentaire