Re: [xml] Attribute indenting
- From: "Nicolas Mailhot" <nicolas mailhot laposte net>
- To: veillard redhat com
- Cc: xml gnome org
- Subject: Re: [xml] Attribute indenting
- Date: Thu, 28 Apr 2005 14:41:31 +0200 (CEST)
On Jeu 28 avril 2005 14:27, Daniel Veillard a écrit :
On Thu, Apr 28, 2005 at 02:11:10PM +0200, Nicolas Mailhot wrote:
There is so many axis to the "formatting" of markup, than trying to
provide customization for each an every axis would just be insanely
complex
and confusing APIs. The in-memory format is public, write your own
serializer
if you really need something very custom.
It's not about doing something very custom. Since --format is useful
only
when a human reads the output (tools do not need the pretty indenting) I
assumed its aim was to produce code as human-readable as possible, ie
use
the same tricks as in XML reference books.
I don't see the point of indenting a document at all if a large part of
its contents (attributes) is still lumped together. It does not take a
lot
of attributes to get line wrapping mess - it's a general case.
user 1 wants
<doc><a foo="1" bar="2"/></doc>
...
now do man indent, and count the options.
Well, I doubt any user wants
<foo xmlns:first="long uri sqlrvnLZ NQLZTJQLTJBLERLZJEL
VJZELJZLRBLZREVLZERVLajzlrjalzrvjlazekjlaz" xmlns:second="long uri 2
q;sfdv kghb elrh lerhylzreyjnlerylerjlertlz" xmlns:third="long uri 3 ljsdg
hlberjynlsry ejnlrt kjnmdrgnmfd,hnmr"/>
(unfortunately it's real difficult to type inline in anything except an
xml parser)
And you'll note your argument is somehow unfair - one of your example
shows no indenting at the element level though it didn't stop xmllint
(like most other tools) indenting them
Regards,
--
Nicolas Mailhot
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]