@@ -150,15 +150,15 @@ export class SaxonTaskProvider implements vscode.TaskProvider {
150
150
let xsltParameters : XSLTParameter [ ] = xsltTask . parameters ? xsltTask . parameters : [ ] ;
151
151
let xsltParametersCommand : string [ ] = [ ]
152
152
for ( const param of xsltParameters ) {
153
- xsltParametersCommand . push ( '"' + param . name + '=' + param . value + '"' ) ;
153
+ xsltParametersCommand . push ( param . name + '=' + param . value ) ;
154
154
}
155
155
let classPaths : string [ ] = [ xsltTask . saxonJar ] ;
156
156
if ( xsltTask . classPathEntries ) {
157
157
classPaths = classPaths . concat ( xsltTask . classPathEntries ) ;
158
158
}
159
159
160
160
for ( const propName in xsltTask ) {
161
- let propValue = SaxonTaskProvider . escapeString ( this . getProp ( xsltTask , propName ) ) ;
161
+ let propValue = this . getProp ( xsltTask , propName ) ;
162
162
switch ( propName ) {
163
163
case 'xsltFile' :
164
164
commandLineArgs . push ( '-xsl:' + propValue ) ;
@@ -205,17 +205,13 @@ export class SaxonTaskProvider implements vscode.TaskProvider {
205
205
}
206
206
}
207
207
208
- if ( xsltParametersCommand . length > 0 ) {
209
- commandLineArgs . push ( xsltParametersCommand . join ( ' ' ) ) ;
210
- }
211
208
212
209
let rawClassPathString = classPaths . join ( pathSeparator ( ) ) ;
213
- const classPathString = SaxonTaskProvider . escapeString ( rawClassPathString ) ;
214
- let resolvedCommandLine = commandLineArgs . join ( ' ' ) ;
215
210
// this is overriden if problemMatcher is set in the tasks.json file
216
211
let problemMatcher = "$saxon-xslt" ;
217
- let commandline = `java -cp ${ classPathString } net.sf.saxon.Transform ${ resolvedCommandLine } ` ;
218
- let newTask = new vscode . Task ( xsltTask , xsltTask . label , source , new vscode . ShellExecution ( commandline ) , problemMatcher ) ;
212
+ const javaArgs = [ '-cp' , rawClassPathString , 'net.sf.saxon.Transform' ] ;
213
+ const processExecution = new vscode . ProcessExecution ( 'java' , javaArgs . concat ( commandLineArgs ) . concat ( xsltParametersCommand ) ) ;
214
+ let newTask = new vscode . Task ( xsltTask , xsltTask . label , source , processExecution , problemMatcher ) ;
219
215
return newTask ;
220
216
} else {
221
217
return undefined ;
0 commit comments