From: André K. <ak...@la...> - 2010-11-30 15:59:50
|
>> Anyway, adding other switches won't prevent you from using xmlstarlet >> for one-liners if that's how you use it. I also use it for one- >> liners. >> I just don't want to be stopped at the first hurdle. > > The more code there is, the greater the chance of screwing it up. What's your point here, I don't get it? It's about as true as saying: no code, no bug. >>> If we do go in the "less verbose stylesheet direction", I think >>> there >>> should be some kind of syntax defined instead of using options for >>> everything. I don't find the dashes very pretty, and single letter >>> options aren't all that human-readable. >> >> Well sure that's a matter of taste. I don't mind too much the dashes, >> but I rarely write long xml commands directly in the terminal, I >> directly integrate them in longer shell scripts. > > I forgot to mention the quoting, that's probably the worst thing. > Shell > evaluation rules are sufficiently icky that I really try to avoid > longer > shell scripts. xmlstarlet isn't responsible for the quoting in scripts. But it surely has a bug since it doesn't properly xml-escape its arguments. Currently xml sel -t -m '//x[@class = "A"]' -c '.' -b -b isn't working, when it should. You have to write: xml sel -t -m '//x[@class = "A"]' -c '.' - b -b Are you referring to that particular issue (I think it's in the Bug tracker)? Regards, André |