Displaying 3 paragraphs?
This is an open discussion with 7 replies, filed under XSLT.
Search
This is the third one. You need:
<xsl:copy-of select="content/p[position() < 3]"/>
But this is not very bullet-proof. What about lists or code blocks, whatever? So I would go with:
<xsl:copy-of select="content/*[position() < 3]"/>
But if you want 3, then I think it would be:
<xsl:copy-of select="content/p[position() <= 3]"/>
Grrrrr, czheng is right, of course!
cheers michael.
and Czheng. :)
Yes, it was a lot of work to add that =
;)
You are a funny guy, Craig. :-)
Create an account or sign in to comment.
Does this look right?
I would have thought that would display 3 paragraphs, or is that just displaying the 3rd paragraph?