For example this works because IO redirection is done within xmlsh
cat < http://test.xlmsh.org/data/books.xml
This works because xcat is an xmlsh command
xcat http://test.xlmsh.org/data/books.xml
But this does not work (because cat is not an xmlsh program)
cat http://test.xlmsh.org/data/books.xml
I added this both to support easy access to web data, as well as to be able to track the base URI mainly for xproc support. Base URI support is useful not only for xproc but for expanded entities, such as in the following case
xcat <> and xml oriented commands (xquery, xed, xslt) can work correctly with a default namespace. But what about a default base URI ?
So I could do something like
declare base-uri http://test.xmlsh.org/data
xcat books.xml
But now there is a conflict between the base-uri and the current directory.
How does the shell know to pull books.xml from the web not from the filesystem ? Once you set a base URI you cant get at files anymore.
This got me thinking more ... what is the base-uri except for the current directory ? What if they were the same. If you could "cd" to a web address, for example
cd http://test.xmlsh.org/data
cat books.xml
ftp could work too
cd ftp://test.xmlsh.org/data
This would actually be prety easy to implement. And maybe useful ?
But the side effects could be weird. Questions arise if I did this :
What would * expand to ? ( echo *)
What do I set for the current directory to external files ?
How would xls work ? ( I experimented with ftp directories and they may be parsable,
but not most http direcotries).
7 comments:
Due to comment spam, moderation is turned on. I will approve all non-spam comments.