sputnick-dev / saxon-lint

XPath3/XQuery 3.0/XSLT 2.0 cross-platform command line tool
38 stars 2 forks source link

XSLT output not working #7

Closed terijaki closed 1 year ago

terijaki commented 2 years ago

Problem

I have tried a few way to have the XSLT processor output to a file I specify via command but I can't get -o to output the result to a specified file.

Context

I would like to use saxon over xsltproc to benefit from XSLT V2.0. What I am trying to replace is an existing process that is using xsltproc mytemplate.xslt mysource.xml.xml > mytarget.html I do not have any file output specified in .xslt file because I need to handle this dynamically by calling the XSLT processor.

Steps to reproduce

This works fine 👍 saxon-lint.pl --xslt "mytemplate.xslt" "mysource.xml"

This should output the results into a file but instead prints it to the console 😕 saxon-lint.pl --xslt "mytemplate.xslt" "mysource.xml" -o "target.html"

Using -xslor -s to specify template and source don't seem to have any affect.

sputnick-dev commented 1 year ago

There's no -o switch.

Please, use :

saxon-lint.pl --xslt "mytemplate.xslt" "mysource.xml" | tee "target.html"

or

saxon-lint.pl --xslt "mytemplate.xslt" "mysource.xml"  > "target.html"
terijaki commented 1 year ago

Oh boi.. thank you! 🤗