[Home] [By Thread] [By Date] [Recent Entries]
On 17.12.2016 16:19, Mark Wilson mark@xxxxxxxxxxxx wrote:
I want to select elements from the second file to add to the first file when their @pofis-number match (in this instance 2966 has a match, 2967 does not. Well, which XSLT processor do you use, which XSLT version? With XSLT 2.0 you could define a key <xsl:key name="flaws" match="Flaws" use="@pofis-number"/> and then write a template <xsl:template match="Stamp"> <xsl:copy> <xsl:apply-templates select="@*, node(), key('flaws', @pofis-number, doc('file2.xml'))/node()"/> </xsl:copy> </xsl:template> together with identity transformation template (or XSLT 3.0 xsl:node on-no-match="shallow-copy").
|

Cart



