Re: LibXML2 Indentation
- From: Sean Middleditch <elanthis awesomeplay com>
- To: gnome-devel-list gnome org
- Subject: Re: LibXML2 Indentation
- Date: Thu, 01 May 2003 12:12:32 -0400
On Thu, 2003-05-01 at 11:31, Ali Akcaagac wrote:
> On Thu, 2003-05-01 at 17:06, Sean Middleditch wrote:
> > If you won't use the proper tools, that's your own fault. If you want
> > to use a hammer to put a screw in a board, well, have fun; don't
> > complain to Craftsman about how hard it is to build a tree house that
> > way, tho. ~,^
>
> Well, A lot of people still use a normal EDITOR to edit HTML pages
> instead of an HTML-editing related TOOL. A lot of people still use VIM
> or EMACS to edit sourcecode rather than using an IDE which is supposed
> to do this job. But that's not the point.
Ya. Vi/Emacs are excellent tools for sourcecode tho, being programmers
editors. ~,^ HTML is also a *lot* better for editing than XML, as it's
more free-form - it isn't nearly as anal about syntax/case/spacing/etc.
as XML. Another reason I think HTML is better in many cases on the web
than XHTML, since both have the same results. ^,^ And if you are
editing HTML spit out by an application, chances are, you're either
going to want to use an HTML editor, or at least run the output thru
htmltidy first. I can attest to this as someone who works with this
stuff professionally. ;-)
XHTML is better than HTML only because it's easier to parse, by an
application - I'll maintain it's a lot harder to read by a human, tho.
>
> > Right. It'll likely take only a one-line patch to gconf to add this.
> > Submitting said patch to gconf in bugzilla with a quick explanation
> > would probably have saved this whole conversation from ever happening,
> > altho at least perhaps some people are now more educated on what XML is,
> > and so on. ;-)
>
> You may have missed some of the comments made from others.
>
> http://mail.gnome.org/archives/gnome-devel-list/2003-May/msg00002.html
> http://mail.gnome.org/archives/gnome-devel-list/2003-April/msg00145.html
> http://mail.gnome.org/archives/gnome-devel-list/2003-April/msg00159.html
> http://mail.gnome.org/archives/gnome-devel-list/2003-April/msg00161.html
> http://mail.gnome.org/archives/desktop-devel-list/2003-April/msg00976.html
> http://mail.gnome.org/archives/desktop-devel-list/2003-April/msg00982.html
The comments made in several of the posts above are quite irrelevant to
what is being discussed here - outputing gconf files w/ indenting.
Gconf _doesn't_ care, last I checked (look at the schema files, for
example), it just doesn't bother to save them w/ indenting. Go ahead
and make the one line change, see if it works, perhaps consult the DTD
to ensure it's working right, submit the patch, call it a day. ~,^
libxml already provides functions that do indenting without corrupting
real content, assuming you don't have a really whacked document type to
output. ;-) I make use of these functions myself rather often.
Any more indepth solutions wrt using DTDs for smart indenting need to be
discussed on the libxml list, not here. Any fundamental problems you or
others have with the XML standard and whitespace/document-types need to
be discussed w/ the W3C, and not here.
It might be good to discuss here a better format than XML for stuff like
gconf tho; I'm guessing the developers are perfectly happy abusing XML
as is tho. ~,^
>
> A general solution would be wonderful so everyone could benefit from it
> and not just some participiants. I share some points from Bill Haneman,
> Allin Cottrell, Jan Van Buggenhout and Rui Miguel Seabra.
>
> They all came up with the question "What purpose does XML have if it's
> not human readable ?" and the AIM of XML is to be human readable.
Perhaps. I don't agree that XML's main purpose is to be human
readable. It's a side advantage. XML exists to provide a structured
markup language that is standardized so multiple _applications_ can
communicate together. The fact that it's human editable is just a plus;
it makes development and debugging a lot easier. I don't think it's
ever been intended that people write this stuff by hand. Using text has
a lot of advantages to inter-application communication; for example, no
need to worry about byte ordering or sizes.
And of course back to the point that half the uses of XML I've seen are
bastardizations of the concept anyways. ;-)
(Something I've been guilty of, falling prey to the "XML is awesome for
_everything_" fad.)
> By the way this wasn't meant to be a flame or something just some
> constructive feedback that I think is worth thinking about. I'm not
> responsible if some people can't compare between comment and flames
> anymore.
Right. Low-flamage is good. ^,^
>
> Friendly regards,
>
> Ali Akcaagac
>
> _______________________________________________
> gnome-devel-list mailing list
> gnome-devel-list gnome org
> http://mail.gnome.org/mailman/listinfo/gnome-devel-list
--
The pain of war cannot exceed the woe of aftermath.
-- Led Zeppelin, "Battle of Evermore"
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]