[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Extracting text between nodes
Wow. Kind of rare when I check this list and find an unanswered question
:-)
There are a couple ways you can do this -- the best way will depend on how your HTML will vary, or will it always be like your example. I would just use a template rule as follows: <xsl:template match="a | b[position() = 1]"/> A stylesheet with only the above template rule in it will output the following: _____________ Some Text and some more italic text maybe even some more _____________ i.e. by default the text will be copied to the output, so I only specified those elements where you did *not* want the text copied to the output to "do nothing". In this case, any a element, and only the first b element, will not get their text copied to the output.... Hope that helps, ...sam
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|