Re: Recognizing new line character in XSL
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
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, or
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 http://msmvps.com/blogs/martin_honnen/
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