Re: LibXML2 Indentation

On Mon, Apr 28, 2003 at 08:18:00PM -0400, Daniel Veillard wrote:
> On Tue, Apr 29, 2003 at 01:29:23AM +0200, Ali Akcaagac wrote:
> > Hi,
> > 
> > Short question, is there an environment flag or something that allows
> > LibXML2 to indent it's created files instead putting everything into one
> > line ?
> In a nutshell:
>    - white spaces *are significant* in XML content !
>    - I you need spaces you should *generate* them
>    - libxml2 offers way to indent XML output but will not
>      do it by default and will not do it if it detect a possible
>      case where changing text nodes may induce a semantic change

  Just to put a final point on this: first I got the following delicious
mail from that person:

> From: Ali Akcaagac <aliakc web de>
> Date: 29 Apr 2003 12:10:24 +0200
> [...]
> I only defend my position about all you stupid
> evil people. The entire GNOME community is full of fucking retarded
> pricks like you. Even your reply to Vadim Plesky on the List some weeks
> ago was everything else than a correct humanworthy reply. And knowing
> from the past it seem to be the only way you reply to people. In a rude
> evil and jackass way.
> [...]

  As much as I hate making private mails public, I see no reason to allow
being abused by mail nor with any other communication channel. I will then
make his answer public, archived, and expose to whoever want to enquire
about his behaviour what it can lead to deal or work with him !

  Second, technically, an environment variable forcing to indent output
is a really really stupid idea, since it would effect all programs and
all XML instance generated by libxml2 (not only on files but on pipeline,
HTTP transactions, etc ...) breaking the compliance to the XML standard
which again insists on the significance of white spaces in content, and
basically making XML processing simply unreliable on the whole set of
application launched from the desktop. Indenting files has some associated
cost too, and should only be done on a case by case basic by using the
right libxml2 API like xmlSaveFormatFile() as pointed in the libxml FAQ.


Daniel Veillard      | Red Hat Network
veillard redhat com  | libxml GNOME XML XSLT toolkit | Rpmfind RPM search engine

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