Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries >Thread Prev - Text output twice. Once in HTML tags and immediately following html tags >Thread Next - Re: Text output twice. Once in HTML tags and immediately following html tags Re: Text output twice. Once in HTML tags and immediately following html tagsTo: NULL Date: 3/3/2008 4:58:00 PM koshin.mariano@g... wrote: > <!-- This generates the Content section --> > <xsl:template match="Info_Log/*" mode="content" > > <xsl:element name ="h2"> > <xsl:element name="a"> > <xsl:attribute name="id"> > <xsl:value-of select="name()"/> > </xsl:attribute> > <xsl:choose> > <xsl:when test="contains(name(),'_')"> > <xsl:value-of select="substring-before(name(),'_')"/> > <xsl:text> </xsl:text> > <xsl:value-of select="substring-after(name(),'_')"/> > </xsl:when> > <xsl:otherwise> > <xsl:value-of select="name()"/> > </xsl:otherwise> > </xsl:choose> > </xsl:element> > </xsl:element> I haven't looked at all that code in detail but this could be the culprit, you first output text here, then > <xsl:if test="string-length(normalize-space(text()[1])) > 0"> > <pre> > <xsl:value-of select ="text()"/> > </pre> > </xsl:if> here you process child nodes: > <xsl:apply-templates mode="content"/> That way it is possible that you output the text contained in a parent element, then later in a child element you output the same text or part of that text again. -- Martin Honnen --- MVP XML http://JavaScript.FAQTs.com/ | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
