|
Subject: Re: [xsl] Applying Templates Up To The Node That Contains The nth Descendant Character From: Evan Lenz <evan@xxxxxxxxxxxx> Date: Tue, 23 Dec 2008 00:03:28 -0800 |
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="body"> <!-- Process just the first child element --> <xsl:apply-templates mode="up-to-1000" select="*[1]"/> </xsl:template>
<!-- Copy this element -->
<xsl:copy-of select="."/>Hi,
I have a book structure mark-up and I'm trying to get an extract of the book contents to represent a preview. However, I only want to get the contents upto the node that contains the nth descendant character of the book body. How can I do this?
I have: <book> <body> <p>some text</p> <p>some text</p> ... <p>some text, here is the 1,000th character, some more text</p> <p>some text</p> </body> </book>
I want my output to be all the descendant::p of body but only upto the p that contains the 1000th character.
Thanks in advance,
-- Jeff
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| [xsl] Re: Applying Templates Up To , Vladimir Nesterovsky | Thread | Re: [xsl] Applying Templates Up To , Mukul Gandhi |
| [xsl] Re: Applying Templates Up To , Vladimir Nesterovsky | Date | Re: [xsl] Applying Templates Up To , Mukul Gandhi |
| Month |