Re: [xml] Attribute indenting




On Jeu 28 avril 2005 15:29, Daniel Veillard a écrit :
On Thu, Apr 28, 2005 at 02:41:31PM +0200, Nicolas Mailhot wrote:
  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"/>

  I may take a patch, check include/libxml/xmlsave.h xmlSaveOption enums
which would have to be augmented. The problem is that you need to keep
track of the column number which is not fun, and probably very
inefficient.

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

  I'm not unfair. I expose that writing that code is very special case,
not fun, probably hard to make efficient, and so far just got something
which looks like a rant.

I'm sorry if it came out like this. I know writing software is hard, and
"there is no time to do this right now" is a perfectly fine answer with
me.  Especially since doing this stuff requires column tracking, which I
was perfectly aware of (but I'd have loved to be wrong here)

"I don't see there is a problem, you must be mistaken" OTOH just asks for
more arguments, which I dutifully provided ;).

I fear the need will become more evident as namespaces are generalized -
they make the case for indenting attributes awfully clear ;(.

Regards,

-- 
Nicolas Mailhot




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