Wrox Programmer Forums
Go Back   Wrox Programmer Forums > XML > XSLT
XSLT General questions and answers about XSLT. For issues strictly specific to the book XSLT 1.1 Programmers Reference, please post to that forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XSLT section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old February 24th, 2009, 09:27 PM
Authorized User
Join Date: Jun 2008
Posts: 35
Thanks: 0
Thanked 0 Times in 0 Posts
Default newbie: question on break tag

I am trying to get my xslt to identify break tags. Not sure how to parse through this in xslt. Thanks for any help.

<content ID="note-1">Note-1 content<br/></content>
<content ID="note-2">Note-2 content<br/></content>
<content ID="note-3">Note-3 content<br/></content>
Old February 25th, 2009, 12:11 AM
Friend of Wrox
Join Date: Jun 2008
Posts: 291
Thanks: 9
Thanked 29 Times in 29 Posts

You can use <xsl:template match="br">. If I'm wrong, then post your xslt code and the required output for the input you posted.
Old February 25th, 2009, 04:28 AM
mhkay's Avatar
Wrox Author
Join Date: Apr 2004
Posts: 4,962
Thanks: 0
Thanked 292 Times in 287 Posts

It would be easier to answer if you said what output you want. But you just use the standard XSLT technique of using xsl:apply-templates to recurse down the tree:

<xsl:template match="content">
... do something...

<xsl:template match="br">
... do something...
Michael Kay
Author, XSLT 2.0 and XPath 2.0 Programmer\'s Reference

Similar Threads
Thread Thread Starter Forum Replies Last Post
"The server tag is not well formed" Newbie... daveyboy ASP.NET 1.0 and 1.1 Basics 5 June 6th, 2008 10:54 AM
Newbie question peterh Classic ASP Databases 3 January 17th, 2008 12:25 PM
Newbie Question sionfx VS.NET 2002/2003 0 November 16th, 2006 03:32 PM
Newbie Question - Sorry! KP Crystal Reports 1 June 13th, 2006 02:45 AM
Newbie experiencing probs with tag libs and frames rudi_doku JSP Basics 0 October 14th, 2003 10:17 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.