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..

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s