RE: [xml] Formatting output



For what it's worth, line-breaking XML output is *evil*.  A lot of XML
editors do this, and thus completely break files used by various apps; I
use several of which, just as the XML spec states, _all whitespace is
significant_.  The output from these programs when using XML files with
****'d up XML (from the editors w/ line-breaks) is way weird.  Making
the apps "trim" spaces/new-lines isn't feasible, either, since often the
author of the files *wants* to insert various white-space
indenting/formatting (even for things as simple as the fact that there
are two spaces after punctuation like . and !, and only one space after
a , or ; or whatnot - something HTML/Web fails horrible to take into
account..)

On Wed, 2002-12-11 at 17:41, Brett Robichaud wrote:
Hmm, yes I can see it is an interesting problem.  Dissapointing news but I
guess I'm not surprised.

Thanks for the quick reply.

-Brett-



-----Original Message-----
From: Daniel Veillard [mailto:veillard redhat com] 
Sent: Wednesday, December 11, 2002 2:40 PM
To: Brett Robichaud
Cc: 'xml gnome org'
Subject: Re: [xml] Formatting output


On Wed, Dec 11, 2002 at 02:36:09PM -0800, Brett Robichaud wrote:
I'm using libXML 2.4.28 on Windows and 2.4.25 on Solaris 8.  Can 
anyone tell me how I can add a new tag to an existing document and 
have it indent and linebreak correctly?

  No. Because "indent and linebreak correctly" is not a 
problem which can be solved in the general case. "You know 
what indetation you want so add the proper text nodes needed 
to make that indentation" is the only correct answer.

Daniel

-- 
Daniel Veillard      | Red Hat Network https://rhn.redhat.com/
veillard redhat com  | libxml GNOME XML XSLT toolkit  
http://xmlsoft.org/ http://veillard.com/ | Rpmfind RPM search engine
http://rpmfind.net/
_______________________________________________
xml mailing list, project page  http://xmlsoft.org/
xml gnome org
http://mail.gnome.org/mailman/listinfo/xml
-- 
Sean Middleditch <elanthis awesomeplay com>
AwesomePlay Productions, Inc.





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]