This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: nested p elements in output (was: no subject)


> 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]