Latest LQ Deal: Linux Power User Bundle
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 07-28-2009, 12:27 PM   #1
LQ Newbie
Registered: Oct 2008
Posts: 20

Rep: Reputation: 0
Piping curl and xsltproc


I'm trying to feed a downloaded XML to an XSLT transform via the command line. When I do it like this:

curl -s >rate.xml
xsltproc rate.xslt rate.xml

it works. When I try to pipeline the two together:

curl -s | 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.
Old 07-28-2009, 03:50 PM   #2
Registered: Feb 2008
Location: Sacramento
Distribution: RHEL AS, mostly
Posts: 44

Rep: Reputation: 18
xsltproc(1) says "It will use the standard input if a filename provided is -".

Try replacing "/dev/stdin" with a dash.


bash, curl

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Linux piping vs Windows piping emanabela Linux - Newbie 1 05-10-2009 12:58 PM
cURL: Server has many IPs, how would I make a cURL script use those IPs to send data? guest Programming 0 04-11-2009 11:42 AM
Piping ls Kcghost Linux - General 9 03-05-2008 07:24 PM
Piping... disruptive Programming 3 02-12-2008 01:09 PM
missing xsltproc on fc4 vadiml Fedora 2 01-24-2008 06:50 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:40 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration