Re: Pull request : xsltproc --fileparam
Sam Liddicott <[email protected]> Wed, 17 Jan 2018 19:37:02 +0000
| Newsgroups | gmane.comp.gnome.lib.xslt |
|---|---|
| Message-ID | <CAOj-5WDgTJ91bSBes9rwZJ8q107CCRNwE6Up78cWEo=cCgPdFA@mail.gmail.com> |
--===============6179343166472221934== Content-Type: multipart/alternative; boundary="089e082688381f1cb20562fdfba2" --089e082688381f1cb20562fdfba2 Content-Type: text/plain; charset="UTF-8" On 17 January 2018 at 12:34, Nick Wellnhofer <[email protected]> wrote: > On 15/01/2018 22:50, Edouard Tisserant wrote: > >> I added a --fileparam switch to xsltproc command line to enable loading >> file content as stylesheet parameter string literal. It also enhance >> --stringparam as a side effect. I hope you'll find this useful. >> > > $ xsltproc --param param "2+3" --stringparam stringparam "2+3" >> --fileparam fileparam test.txt test.xsl test.xml >> <?xml version="1.0"?> >> <param>5</param><stringparam>2+3</stringparam><fileparam>Hello World >> </fileparam> >> > > Why don't you simply use something like > > --stringparam fileparam "$(cat test.txt)" > > Maybe it isn't invoked from a shell (perhaps fork, exec rather than system, popen), and maybe it isn't invoked under unix anyway. Sam > Nick > > > _______________________________________________ > xslt mailing list, project page http://xmlsoft.org/XSLT/ > [email protected] > https://mail.gnome.org/mailman/listinfo/xslt > --089e082688381f1cb20562fdfba2 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr"><div class=3D"gmail_extra"><br><div class=3D"gmail_quote">= On 17 January 2018 at 12:34, Nick Wellnhofer <span dir=3D"ltr"><<a href= =3D"mailto:[email protected]" target=3D"_blank">[email protected]</a>&g= t;</span> wrote:<br><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0= .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class=3D"">On 15/0= 1/2018 22:50, Edouard Tisserant wrote:<br> <blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p= x #ccc solid;padding-left:1ex"> I added a --fileparam switch to xsltproc command line to enable loading<br> file content as stylesheet parameter string literal. It also enhance<br> --stringparam as a side effect. I hope you'll find this useful.<br> </blockquote> <br> </span><span class=3D""><blockquote class=3D"gmail_quote" style=3D"margin:0= 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> $ xsltproc --param param "2+3" --stringparam stringparam "2+= 3"<br> --fileparam fileparam test.txt test.xsl test.xml<br> <?xml version=3D"1.0"?><br> <param>5</param><stringparam>2<wbr>+3</stringparam>= <fileparam>Hel<wbr>lo World<br> </fileparam><br> </blockquote> <br></span> Why don't you simply use something like<br> <br> =C2=A0 =C2=A0 --stringparam fileparam "$(cat test.txt)"<span clas= s=3D"HOEnZb"><font color=3D"#888888"><br> <br></font></span></blockquote><div><br></div><div>Maybe it isn't invok= ed from a shell (perhaps fork, exec rather than system, popen), and maybe i= t isn't invoked under unix anyway.</div><div><br></div><div>Sam</div><d= iv>=C2=A0</div><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex= ;border-left:1px #ccc solid;padding-left:1ex"><span class=3D"HOEnZb"><font = color=3D"#888888"> Nick</font></span><div class=3D"HOEnZb"><div class=3D"h5"><br> <br> ______________________________<wbr>_________________<br> xslt mailing list, project page <a href=3D"http://xmlsoft.org/XSLT/" rel=3D= "noreferrer" target=3D"_blank">http://xmlsoft.org/XSLT/</a><br> <a href=3D"mailto:[email protected]" target=3D"_blank">[email protected]</a><br> <a href=3D"https://mail.gnome.org/mailman/listinfo/xslt" rel=3D"noreferrer"= target=3D"_blank">https://mail.gnome.org/mailman<wbr>/listinfo/xslt</a><br= > </div></div></blockquote></div><br></div></div> --089e082688381f1cb20562fdfba2-- --===============6179343166472221934== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ xslt mailing list, project page http://xmlsoft.org/XSLT/ [email protected] https://mail.gnome.org/mailman/listinfo/xslt --===============6179343166472221934==--