Re: [xml] Loss of whitespace

Date view Thread view Subject view Author view

From: Paul DuBois (paul@snake.net)
Date: Sat Mar 04 2000 - 10:51:40 EST


>On Sat, Mar 04, 2000 at 08:04:21AM -0600, Paul DuBois wrote:
>>
>> > Following the feedback received I have made version 2.x comply with
>> >the XML specification. All blanks spaces are passed to SAX as characters()
>> >with the only exception of doing validating parsing and the element
>> >is not defined as CDATA nor mixed content. The xml:space="preserve"
>> >is looked for in 2.x code and in that case blanks which can be ignored
>> >accordingly to the Dtd are passed anyway through characters(), and will
>> >generate nodes in the DOM tree.
>>
>>
>> Does this apply to newlines as well? In particular, will a text segment
>> consisting only of a newline generate an XML_TEXT_NODE node? (I ask
>> because of the behavior I posted a note to the list about yesterday.)
>
>Yes, by default in version 2.0 no blank is ever ignored unless one is
>using a DTD and the element are not mixed content nor CDTATA.

Cool! Thanks!

-- 
Paul DuBois, paul@snake.net
----
Message from the list xml@xmlsoft.org
Archived at : http://xmlsoft.org/messages/
to unsubscribe: echo "unsubscribe xml" | mail  majordomo@xmlsoft.org


Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Wed Aug 02 2000 - 12:30:08 EDT