[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Recognizing new line character in XSL

Subject: Re: Recognizing new line character in XSL
From: Martin Honnen <Martin.Honnen@xxxxxx>
Date: Tue, 20 Jul 2010 13:21:22 +0200
Re:  Recognizing new line character in XSL
Siddhi Thakkar wrote:

Could you please guide me if there is any way in XSL to recognize new
line character and display each line as a new paragraph? I am not
sure of the Unicode entity of new line char, if we really need it we
can assume it to be &#xa; I am using JDOM as processor and xsl
version 1.0.

You can read in XML data and output XML or HTML or plain text with XSLT
1.0. Any XML input and any stylesheet is parsed by an XML parser first
which normalizes white space and line breaks, see
that is all you need to be aware of.
So you are right, &#10; or &#xA; is a way to put a line break into an XML input document or an XSLT stylesheet.
On the other hand you have not told us what your output format is, if it's HTML and you want to display paragraphs or lines then you need to construct the proper HTML e.g. 'p' elements for paragraphs or 'br' elements to have line breaks.


	Martin Honnen

Current Thread


Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
First Name
Last Name
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.