LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices

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

Rep: Reputation: 0
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.
 
Old 07-28-2009, 03:50 PM   #2
jonesr
Member
 
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.
 
  


Reply

Tags
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
Trackbacks are Off
Pingbacks are On
Refbacks are 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


All times are GMT -5. The time now is 09:07 PM.

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