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

RE: AW: Detecting carriage return and newline feed in

Subject: RE: AW: Detecting carriage return and newline feed in XML Data
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Mon, 1 Nov 2004 10:19:19 -0000
newline carriage return
XML input is processed by the XML parser before it gets anywhere near the
XSLT processor. The only way to prevent XML's normalization of whitespace
characters (whether in element or attribute content) is to write the
characters as character references, e.g. &#x0D; You can of course do that by
preprocessing the file in some non-XML-aware tool before submitting it to
the XML parser.

Are you really sure you need to do this? Somehow, you're not using XML the
way it was intended to be used and that's always bad news. I've forgotten
what your original problem was, if you ever explained it.

Michael Kay
http://www.saxonica.com/ 

> -----Original Message-----
> From: michella@xxxxxxx [mailto:michella@xxxxxxx] 
> Sent: 01 November 2004 10:00
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject: AW: AW:  Detecting carriage return and newline 
> feed in XML Data
> 
> 
> 
> 
> 
> > The carriage return appears in the XML source data. Aren't there any
> > technics to treat them in a custom way while parsing?(eg. 
> by passing a
> > parameter to the parser)?
> 
> yes, place the string in element content not an attribute value.
> Then they will be normalised to a single #10 character.
> 
> David
> 
> ----> Is it possible to convert the selected attribut field 
> into element
> while processing the stylesheet ? E.g. using the xsl:element or
> something like that?
> 
> Regards
> 
> Lawrence

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.