Lambda the Ultimate

inactiveTopic XSH - An XML Editing Shell
started 7/12/2002; 8:03:21 AM - last post 7/17/2002; 12:02:02 PM
Ehud Lamm - XSH - An XML Editing Shell  blueArrow
7/12/2002; 8:03:21 AM (reads: 1312, responses: 4)
XSH - An XML Editing Shell
XML::XSH and the xsh executable provide a rich shell environment which makes performing common XML-related tasks as terse and straightforward as using a UNIX shells like bash or csh.

Many people are linking to this article, so I went over and took a look.

It is kind of cool to have an interactive shell where you can play with XML documents, but from our point of view the interesting thing is that you can create shell scripts that perfrom useful XML editing.

Kind of close to my (more specialized) idea of an RSS-AWK.

Posted to xml by Ehud Lamm on 7/12/02; 8:04:25 AM

Frank Atanassow - Re: XSH - An XML Editing Shell  blueArrow
7/13/2002; 7:38:03 AM (reads: 717, responses: 0)
This is neat, and reminded me of the combinator library from HaXml. Some differences are that HaXml takes a stateless, transformative approach based on "filters", and that HaXml uses a non-standard notion of indexing not based on XPath.

Also, HaXml is not a shell in the same sense as XSH, though you can use it from the interpreter command-line. This kind of usage makes it more difficult to keep track of local state (like the current context); perhaps this could be ameliorated in a pure functional way by using Huet's Zipper idea.

Luke Gorrie - Re: XSH - An XML Editing Shell  blueArrow
7/17/2002; 7:35:11 AM (reads: 671, responses: 2)
I did something like this for a heirarchical configuration registry in one of our products. I use a small user-space NFS server to mount the registry as a file system. You can then manipulate the registry with ls, find, grep, awk, emacs, etc. I also have a special directory where you can "mkdir" new transaction directories, which give a transaction-in-process view of the registry, and are ultimately commited by writing to a COMMIT file.

Fun hack. :-)

Dan Shappir - Re: XSH - An XML Editing Shell  blueArrow
7/17/2002; 7:57:38 AM (reads: 706, responses: 0)
You can do similar stuff with Windows shell namespace extensions. Microsoft provides a sample that mounts the registry in this way (read-only as I recall). Could be interesting to do this for XML files. It would allow you to use the Windows explorer to browse into the XML.

Ehud Lamm - Re: XSH - An XML Editing Shell  blueArrow
7/17/2002; 12:02:02 PM (reads: 704, responses: 0)
The power of abstraction...