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 June 23rd, 2004, 06:15 AM
Registered User
 
Join Date: Jun 2004
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default ASCII formatting

Hi,

I have an XML file with some fairly large textual paragraphs typed in by a user - so it has formatting in it like indentation via tabs and spaces.

For example :-

"This procedure has two parts :-

                 1. Start
                 2. End"

Comes out as a single concatenated string post transformation :-

"This procedure has two parts :- 1. Start 2. End"

I have developed the xml to the point where if I open it up and view the source I can see the paragraphs have all their formatting intact.
I'm sure my document tree structure is fine. But when transforming via the XSLT stylesheet the formatting is lost.

The data originates from an access database Memo field and the XML document is generated via MSXML and VBA.

Following a suggestion from another forum I put the data in a CDATA section - XSLT completed ignored this. I have "preserve space" and "output" elements in the xslt stylesheet.

So can anyone help ?

I am getting quite frustrated with this as it is my first foray into XML and XSLT and it was going along so well. Deadline is now approaching fast and it appears I've reached some sort of impasse.

Cheers.
 
Old July 1st, 2004, 08:13 AM
Authorized User
 
Join Date: Jul 2004
Posts: 53
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Presumably you are viewing the output in a browser?
If so, it's the browser removing the formatting...

Try outputting between <pre> tags,

eg.
<html>
  ...
  <pre>
     <xsl:value-of select="mynode/text()" />
  </pre>
  ..
</html>
 
Old October 22nd, 2006, 03:31 PM
Registered User
 
Join Date: Oct 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi,

Great help dude.
I was really looking for this code

Thanks a Million






Similar Threads
Thread Thread Starter Forum Replies Last Post
ascii umeshtheone Beginning VB 6 2 June 12th, 2007 03:56 AM
Get UNICODE or ASCII Value of a character Eyob_the_pro C# 0 January 10th, 2007 03:42 AM
ASCII rajuru Beginning PHP 2 February 19th, 2005 11:22 AM
utf-8 and ascii mail2atulmehta Classic ASP Databases 0 January 26th, 2005 11:22 PM
About the Ascii code LTGarrisonUSA C# 3 September 7th, 2004 09:39 PM





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