|
Subject: Re: [xsl] copy nodes() of other XML file From: "G. Ken Holman" <gkholman@xxxxxxxxxxxxxxxxxxxx> Date: Sat, 11 Dec 2010 18:06:31 -0500 |
I'm trying to copy the contents of a node that is in one file to another, but must be copied into a document.
XSLT version 1.0
****** My main XML file: ... ****** My Second XML File - which should make the information: ... ****** My XSL File: ... <xsl:template match="pd"> <xsl:copy> <xsl:apply-templates select="@* | node()"/> <xsl:variable name="id" select="frmecc/cab/ccon"/> <xsl:for-each select="$doc1"> <xsl:copy-of select="key('k1', $id)/detctacte"/> </xsl:for-each> </xsl:copy> </xsl:template>
****** My Desired Output: ... Thanks to everyone for the help.
<xsl:template match="frmecc">
<xsl:copy>
<xsl:apply-templates select="@* | node()"/>
<xsl:variable name="id" select="cab/ccon"/>
<xsl:for-each select="$doc1">
<xsl:copy-of select="key('k1', $id)/detctacte"/>
</xsl:for-each>
</xsl:copy>
</xsl:template>-- Contact us for world-wide XML consulting & instructor-led training Crane Softwrights Ltd. http://www.CraneSoftwrights.com/s/ G. Ken Holman mailto:gkholman@xxxxxxxxxxxxxxxxxxxx Legal business disclaimers: http://www.CraneSoftwrights.com/legal
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| [xsl] copy nodes() of other XML fil, Jimenez, Luis | Thread | RE: [xsl] copy nodes() of other XML, Jimenez, Luis |
| [xsl] copy nodes() of other XML fil, Jimenez, Luis | Date | RE: [xsl] copy nodes() of other XML, Jimenez, Luis |
| Month |