This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: nested p elements in output (was: no subject)
- From: "Michael Kay" <michael dot h dot kay at ntlworld dot com>
- To: <xsl-list at lists dot mulberrytech dot com>
- Date: Fri, 9 Aug 2002 09:42:15 +0100
- Subject: [xsl] RE: nested p elements in output (was: no subject)
- Reply-to: xsl-list at lists dot mulberrytech dot com
> What is occurring is that the first p of each section is
> being matched, but
> instead of replacing the matched p, it will make that matched
> "p" a child
> of a new element "p".
That's because you asked it to.
>
> <xsl:template match="section/p[position()=1]">
> <p class="firstsentence">
> <xsl:copy>
> <xsl:copy-of select="@*"/>
The outer <p> element is created by your <p> literal result element. The
inner one is created by your <xsl:copy>. Just get rid of the <xsl:copy>.
Michael Kay
Software AG
home: Michael.H.Kay@ntlworld.com
work: Michael.Kay@softwareag.com
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list