On Mon, Apr 25, 2005 at 05:54:55PM +0200, Nicolas Mailhot wrote: > Hi, > > Is there any good reason not to indent properly attributes when xmllint is > invoked with --format ? When I say indenting I think about constructions > like: > > <foo bar1="..." > bar2="..." > bar3="..."> > > which you see in all XML textbooks but can not achieve with most current > XML formaters.
because for document with a lot of deep, lots of attributes and little CDATA you could end up with document serialization many multiplied by a factor or 2 or 3 easilly for no practical gain. > I ask this because someone told me last week that using more than one > attribute per element should be avoided because the way tools indent them > (inline) a human can not parse them easily (SIC) so one can not write > readable XML with attributes. And indeed I see that any XML file that uses I see no valid argument there. > namespace declarations (big fat attributes) is very difficult to read once > reformated by xmllint - the output is fine for elements but not much else. 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. Daniel -- Daniel Veillard | Red Hat Desktop team http://redhat.com/ [EMAIL PROTECTED] | 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/ [email protected] http://mail.gnome.org/mailman/listinfo/xml
