From: Noam P. <npo...@us...> - 2010-11-29 19:09:49
|
André Kaplan <ak...@la...> writes: >> >> Is it worth adding all these options? Your example shell commands look >> like XSL with shorter tags (<tagname></tagname> becomes --tagname or >> -t). > > Well that's what I wanted to discuss about! > I think some switches are definitely worth adding: var, key, choose/ > when/otherwise, import, include. > Some are less worth it and as you say could be added with extra > switches or extended --elem and --attr (say --xelem and --xattr) which > would write xslt elements. > > Some switches could be shortcuts to longer xslt constructs (like > currently --template, --match): function and/or function call switches. > > In the end the command line will look like an XSLT stylesheet but less > verbose and hopefully human-readable. > But I also see xmlstarlet as a command-line xslt stylesheet designer. > Hmm, well I see it more as a little tool for when you have just a small XML manipulation task that isn't worth the bother of writing a stylesheet: little one-liners. It would be interesting to hear others people's opinion on this. 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. > I think that my mail client breaks lines longer than 70 characters. > I added the contrib/xml_struct.sh script in the enhanced_select branch. > Hopefully you'll be able to use it. Yup that fixed it. Noam |