[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

duplicates result from xslt


Subject: duplicates result from xslt
From: "Norma Yeazell" <Nyeazell@xxxxxxxxx>
Date: Fri, 4 Jun 2004 13:01:37 -0400

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.



Current Thread
Keywords
xml