Piping curl and xsltproc
Hi,
I'm trying to feed a downloaded XML to an XSLT transform via the command line. When I do it like this: curl -s http://www.cbr.ru/scripts/XML_daily.asp >rate.xml xsltproc rate.xslt rate.xml it works. When I try to pipeline the two together: curl -s http://www.cbr.ru/scripts/XML_daily.asp | xsltproc rate.xslt /dev/stdin I get an error message from xsltproc: /dev/stdin:1: parser error : Document is empty ^ /dev/stdin:1: parser error : Start tag expected, '<' not found ^ I thought the two commands should be equivalent. Please, what's going on here? Not that I cannot solve the problem - I can, it works with an intermediate file. But there's apparently an aspect of pipelining that I don't yet understand. |
xsltproc(1) says "It will use the standard input if a filename provided is -".
Try replacing "/dev/stdin" with a dash. |
All times are GMT -5. The time now is 07:21 AM. |