| Author |
A better way to insert newlines?
|
John Wetherbie
Rancher
Joined: Apr 05, 2000
Posts: 1441
|
|
Hi, I've been using the following in a stylesheet to insert newlines in my output document: I'm hoping someone can tell me a better way! Thanks, John
|
The only reason for time is so that everything doesn't happen all at once.
- Buckaroo Banzai
|
 |
Karthik Guru
Ranch Hand
Joined: Mar 06, 2001
Posts: 1209
|
|
Originally posted by John Wetherbie: Hi, I've been using the following in a stylesheet to insert newlines in my output document:
Probably you can declare a variable newLine and initialies it to the new line and use it. am not sure if this is what you were expecting
|
 |
John Wetherbie
Rancher
Joined: Apr 05, 2000
Posts: 1441
|
|
Well, I hadn't thought of that, so that makes it interesting. I'll certainly try it and see if it helps clean things up. Any other proposals out there? Thanks, John
|
 |
Mapraputa Is
Leverager of our synergies
Sheriff
Joined: Aug 26, 2000
Posts: 10065
|
|
This is a quote from Michael Kay answering this question in Wrox's XSLT forum: " Use <xsl utput method="text">, and use <xsl:text>
</xsl:text> where you want the newline to appear. Some people find it useful to declare this as an entity: <!ENTITY nl "<xsl:text>
</xsl:text>"> so you can then simply write "&nl;" where you want the newline." [ March 20, 2002: Message edited by: Mapraputa Is ]
|
Uncontrolled vocabularies
"I try my best to make *all* my posts nice, even when I feel upset" -- Philippe Maquet
|
 |
John Wetherbie
Rancher
Joined: Apr 05, 2000
Posts: 1441
|
|
OK. That looks good, too. Is there a reason or reasons to use an entity vs. a variable or vice-versa? John
|
 |
John Wetherbie
Rancher
Joined: Apr 05, 2000
Posts: 1441
|
|
Here's what I ended up doing. It seems to work pretty well. John
|
 |
 |
|
|
subject: A better way to insert newlines?
|
|
|