I'm sure this isn't the most efficient way but it is giving me results.
XML to XML.
Can someone tell me why I'm getting my result once where I want it and
then again at the end of file.
Snipet:
<xsl:template match="//condition[1]">
<eqpconds>
<eqpconds-setup-item>
<condition><xsl:value-of select="."/></condition>
<itemref><xsl:copy-of select="link"/></itemref>
</eqpconds-setup-item>
<xsl:for-each select="following-sibling::condition">
<eqpconds-setup-item>
<condition><xsl:value-of select="."/></condition>
<itemref><xsl:copy-of select="link"/></itemref>
</eqpconds-setup-item>
</xsl:for-each>
</eqpconds>
Result:
<eqpconds>
<eqpconds-setup-item>
<condition>text is here.</condition>
<itemref>
<link doc="njy" sdoc="M04-01" refdoctype="maintain" refelemtype="root">
<prompt>text is here.</prompt>
</link>
</itemref>
</eqpconds-setup-item>
</eqpconds>
-------
-------
</maintsk>
<eqpconds>
<eqpconds-setup-item>
<condition>text is here.</condition>
<itemref>
<link doc="njy" sdoc="M04-01" refdoctype="maintain" refelemtype="root">
<prompt>text is here.</prompt>
</link>
</itemref>
</eqpconds-setup-item>
</eqpconds>
</maintwp>
Ending should look like:
</maintsk>
</maintwp>
Confidentiality Notice
The information contained in this e-mail is confidential and intended for use
only by the person(s) or organization listed in the address. If you have
received this communication in error, please contact the sender at O'Neil &
Associates, Inc., immediately. Any copying, dissemination, or distribution of
this communication, other than by the intended recipient, is strictly
prohibited.