xslt - Override the element mapped in the main.xsl file to NULL in import.xsl -


we trying override element mapped in main.xsl file null in import.xsl file using call template. getting target mapped twice instead of overriding. kindly help.

main.xsl

<db:long_description xml:id="id_102"> <xsl:value-of select="corecomebo:reviseditem/corecomebo:description" xml:id="id_103"/> </db:long_description>  <xsl:call-template name="long_description_custom"/> 

import.xsl

<xsl:template name="long_description_custom"> <db:long_description      xmlns:db="http://xmlns.oracle.com/pcbpel/adapter/db/apps/inv_ebi_change_order_pub/process_change_order_list/" xml:id="id_102" > <xsl:value-of select="''"/> </db:long_description> </xsl:template> 

output

<db:long_description xml:id="id_102">xxx</db:long_description> <db:long_description xmlns:db="http://xmlns.oracle.com/pcbpel/adapter/db/apps/inv_ebi_change_order_pub/process_change_order_list/" xml:id="id_102" /> 

expected output

<db:long_description xmlns:db="http://xmlns.oracle.com/pcbpel/adapter/db/apps/inv_ebi_change_order_pub/process_change_order_list/" xml:id="id_102" /> 

once element has been instantiated transform there no way change it. have found, template can add has been created.

if unable modify main.xsl best can apply second transform alter data produced first.

an alternative add priority identical template in imported transform provides wanted output. can't unless see entirety of main.xsl.


Comments

Popular posts from this blog

python - How to create a legend for 3D bar in matplotlib? -

java - Multi-Label Document Classification -

php - Dynamic url re-writing using htaccess -