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

Re: white space prob

Subject: Re: white space prob
From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx>
Date: Wed, 17 Oct 2001 17:15:24 -0400
space prob
Yan,

You're in trouble. An XML parser will normalize space in attributes; this will prevent you from getting what you want. Check out the XML Rec, section 3.3.3. The bottom line is, that your carriage returns will be replaced with spaces (&#32;). The XSL Processor never even gets to see the line feed character, much less preserve it.

It's the first time I've ever seen this requirement of attribute values, though ... this is why there's xml:space for text content of elements.

Tortuous workarounds are possible, but they involve pre- and post-processing your data with a non-XML-aware processor such as a Perl script or such like.

Sorry,
Wendell

At 03:15 PM 10/17/01, you wrote:
I have a tag with an attribute like this:
<tagX
col1="a.  Here are some additional info:

        (i)   some info X.
        (ii)  some info Y.
        (iii) some info Z.

b. Here is the second part info.">

I want to transform this into:
<col1>
a.  Here are some additional info:

        (i)   some info X.
        (ii)  some info Y.
        (iii) some info Z.

 b.  Here is the second part info.
</col1>

I want to keep all white space just like before.  Or
do I need escaping for white space and new line?

Thanks in advance.

Yan


======================================================================
Wendell Piez                            mailto:wapiez@xxxxxxxxxxxxxxxx
Mulberry Technologies, Inc.                http://www.mulberrytech.com
17 West Jefferson Street                    Direct Phone: 301/315-9635
Suite 207                                          Phone: 301/315-9631
Rockville, MD  20850                                 Fax: 301/315-8285
----------------------------------------------------------------------
  Mulberry Technologies: A Consultancy Specializing in SGML and XML
======================================================================


XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list



Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

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.
Email
First Name
Last Name
Company
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.