xsl-list
[Top] [All Lists]

Re: [xsl] redirect output of transformation

2009-06-17 11:31:57
Mike,

I am aware that you are also using eXist. I am not sure if you are
aware, but you can upgrade eXist to use Saxon as its XSLT processor -
details are on the eXist wiki. With that done you could then call
transform:stream-transform() from a very simple driver XQuery in
eXist. This will perform the XSLT transformation and stream the
results directly to the http response.

Thanks Adam.

2009/6/17 Mike Sokolov <sokolov(_at_)ifactory(_dot_)com>:
Thanks - I'll follow up, if need be, on saxon-help

-Mike Sokolov


Michael Kay wrote:

It's a processor-specific question, so you should really ask on the Saxon
list (saxon-help list or forum at sourceforge).

You can supply a JAXP StreamResult that encapsulates an OutputStream, and
if
you can construct an OutputStream that writes to your HTTP destination
then
the problem is solved.

You can't do this from the command line though. The -o option is always
treated as a filename.

Incidentally, Saxon 8.7 is getting a bit elderly.

Regards,

Michael Kay
http://www.saxonica.com/
http://twitter.com/michaelhkay


-----Original Message-----
From: Mike Sokolov [mailto:sokolov(_at_)ifactory(_dot_)com] Sent: 17 June 
2009 14:35
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: [xsl] redirect output of transformation

(not sure if this is the right list for this; please redirect me if not):

I am trying to convince my transformer to write its output to a service
running on HTTP, but when I set the output base-uri to my http service, it
continues to try to write to the filesystem.

I tried:

java -jar saxon-8.7.jar -o http://charlestown/rest-service test.xml
test.xsl

and get:

java.io.FileNotFoundException:
 /proj/test/http:/charlestown/rest-service (No such file or directory)

... reading an old e-mail thread I came across something called
OutputURIResolver in Saxon, and I was looking at trying to make use of that
by handing it a resolver and implementing my own version of the JAXP Result
interface, but that interface has only a couple of methods, neither of which
seems to accept a stream or a string or anything that looks like the result
of a transformation.

can someone tell me if this is possible, and if so, what I'm doing wrong?

Thanks

Mike Sokolov


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: 
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--




--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: 
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: 
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--





-- 
Adam Retter

sip:adam(_dot_)retter(_at_)ekiga(_dot_)net
http://www.adamretter.org.uk

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--