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

RE: Hidden implementation-defined behaviour

Subject: RE: Hidden implementation-defined behaviour
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Thu, 5 Jul 2007 10:11:23 +0100
RE:  Hidden implementation-defined behaviour
Actually the WG discussed whether unparsed-text() should normalize line
endings and decided that it should not (IIRC my view was that it should, but
others felt that "unparsed" should mean what it says.)

It's true that a wise application writer will allow for variations in line
endings, because it's hard to predict how the file will have been written;
but there's no license in the spec, in my view, for the XSLT processor to
modify the contents of the resource other than by decoding the octets into
characters.

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

> -----Original Message-----
> From: Colin Adams [mailto:colinpauladams@xxxxxxxxxxx] 
> Sent: 05 July 2007 08:23
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject:  Hidden implementation-defined behaviour
> 
> I have just discovered an interesting difference in behaviour 
> between saxon and gexslt with respect to unparsed-text() that 
> appears to be undefined by the spec.
> 
> Gexslt is ready the file as a text file (which seems 
> reasonable given the name of the function, but not mandated 
> by the spec, which just talks about the contents of the 
> resource), and accordingly CRLF combinations (this is a 
> windows file on windows) are being read as a single newline, 
> so now CRs are present in resulting string.
> 
> On the otherhand Saxon retains the CRs in the resulting 
> string (I noticed the difference as I was calling string-length).
> 
> As far as I can see, both behaviours are legitimate, so it is 
> something to beware of (calling translate(unparsed-text($uri, 
> "&#13;", "")) gives portable behaviour).
> 
> _________________________________________________________________
> The next generation of Hotmail is here! http://www.newhotmail.co.uk

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-2011 All Rights Reserved.