Re: Running Saxon-JS in Powershell

John Lumley <john-JkSD5nQpfvpWk0Htik3J/[email protected]>
Newsgroups gmane.text.xml.saxon.help
Message-ID <[email protected]>
Apparently when Powershell sees ‘-something’ it parses an argument of the given name which is passed to the command... see https://stackoverflow.com/questions/5527261/how-to-pass-arugments-to-saxon-xquery-in-windows-powershell for some old stuff on this. xslt3 does its own argument processing, based on the white space-separated array args Node.js process uses.

Sent from my iPad

> On 20 Jun 2020, at 15:02, Willem Van Lishout <[email protected]> wrote:
> 
> 
> Hi,
> 
> Not sure if a bug or not, but running Saxon-JS 2 from Powershell 7.0 on Windows only seems to work when the arguments (including their keys) are wrapped inside double quotes. 
> 
> So this doesn't work:
> xslt3 -s:c:\temp\temp.xml -xsl:c:\temp\Untitled1.xsl 
> 
> (Missing '=' in parameter 'c:\temp\temp.xml'
> Internal error: bad input to string constructor #undefined)
> 
> While this does work (and it took me quite a while to figure it out):
> xslt3 "-s:c:\temp\temp.xml" "-xsl:c:\temp\Untitled1.xsl"
> 
> This only happens in Powershell, not in cmd.exe.
> 
> Cheers,
> 
> Willem Van Lishout  
> [email protected]
> 
> _______________________________________________
> saxon-help mailing list archived at http://saxon.markmail.org/
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/saxon-help

_______________________________________________
saxon-help mailing list archived at http://saxon.markmail.org/
[email protected]
https://lists.sourceforge.net/lists/listinfo/saxon-help
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.