xsl-list
[Top] [All Lists]

Re: pre-processing of child elements

2005-07-07 07:45:37
<xsl:template match="child-element">
  <xsl:if test="parent::element">
    <xsl:text>&lt;/i&gt;</xsl:text>
  </xsl:if>

That just writes some character in to the current element content it
does not do anything with an i element node.

If I understand you couurect;y you want to wrap all text node children
of element with i and not wrap eleemnt children so:




<xsl:template match="element">
  <xsl:apply-templates/>
</xsl:template>

<xsl:template match="element/text()">
  <i><xsl:apply-templates/></i>
</xsl:template>

is probably all you need.

David

________________________________________________________________________
This e-mail has been scanned for all viruses by Star. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



<Prev in Thread] Current Thread [Next in Thread>