Named Template Override with Multiple Stylesheets

DimaFtoit

New Member
I am trying to override an attribute value in one named template defined in one xslt stylesheet by another named template of the same name in another stylesheet where the first stylesheet is imported into the second stylesheetStylesheet 1\[code\]<xsl:template name="template1"> <xsl:element name="event-element"> <xsl:attribute name="val1">Value1</xsl:attribute> </xsl:element></xsl:template>\[/code\]Stylesheet 2\[code\]<xsl:import href="http://stackoverflow.com/questions/12493749/Stylesheet1.xsl"/><xsl:template name="template1"> <xsl:element name="event-element"> <xsl:attribute name="val1">VALUE1_MODIFIED</xsl:attribute> </xsl:element></xsl:template>\[/code\]What I am expecting is that the value from stylesheet 2 (VALUE1_MODIFIED) overrides the value in stylesheet 1 (Value1) and it is VALUE1_MODIFIED that is outputted but that doesn't seem to be happening. I've look at a number of examples from several sources and it seems like the above should work but I probably have a fundamental misunderstanding of what is going on :). Any help is greatly appreciated.Thanks.
 
Back
Top