|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Carriage returns in attribute values (poss libxslt
At 2004-04-20 19:19 -0700, Ramon M. Felciano @ Yahoo wrote:
Are there any special rules around XSLT processing of string values from attributes vs text() nodes? In XSLT no, but there are in XML and since XSLT is an XML application you see it happening in XSLT. I've noticed the libxslt seems to strip out carriage returns. XML 1.0 Section 3.3.3 talks about attribute value normalization. The XML processor in libxslt is doing what it is supposed to be doing. CRs are probably pretty rare in attribute values, but MSXML seems to handle them ok Then I guess MSXML isn't handling them properly. so I'm wondering if there any special rules I don't know about. I took a quick look through the XSLT spec and didn't seen anything. XSLT assumes it is working with a conforming XML processor. Here's how to reproduce it. Given this XML: I wouldn't expect that from what is prescribed in XML 1.0. whereas libxslt produces: Looks fine to me. BTW, if you want your attribute to have a carriage return, you can use an entity to express the carriage return, then it doesn't get normalized. I hope this helps. .......................... Ken -- Public courses: Spring 2004 world tour of hands-on XSL instruction Each week: Monday-Wednesday: XSLT/XPath; Thursday-Friday: XSL-FO Hong Kong May 17-21; Bremen Germany May 24-28; Helsinki June 14-18 World-wide on-site corporate, govt. & user group XML/XSL training. G. Ken Holman mailto:gkholman@xxxxxxxxxxxxxxxxxxxx Crane Softwrights Ltd. http://www.CraneSoftwrights.com/s/ Box 266, Kars, Ontario CANADA K0A-2E0 +1(613)489-0999 (F:-0995) Male Breast Cancer Awareness http://www.CraneSoftwrights.com/s/bc
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








