Calling USCSXSL from the command line as a Blend script processor

Previous Next

You can call the USCSXSL internal component as a Blend script processor from a USoft context. You do this by running the ublendit.exe executable found in the \BIN subdirectory of the USoft installation directory.

If you execute a USoft Blend script that executes one or more Rules Engine operations, the script itself must make an instance of a Rules Service available. This is because, when running from the command line, you do not have a USoft context that already has access to a Rules Service.

Calling USCSXSL as a Blend script processor causes an identity transformation to be applied to your input XML.

You can also call USCSXSL as a Blend script processor from a USoft context.

 

Syntax 1

usoft-bindir\ublendit.exe xml-filepath variable-name=variable-value ... ]

Syntax 2

> usoft-bindir\ublendit.exe xml-filepath xsl-filepath variable-name=variable-value ... ]

Usoft-bindir is the \BIN subfolder of your USoft installation directory. You can find the value of usoft-bindir by executing in SQL Command:

select rulesengine.getproperty( 'bindir' )

Xml-filepath is the filepath leading to the XML input file that you want USCSXSL to process. This file must be a valid XML document. It may contain calls to USCSXSL extension functions, in which case it is called a USoft Blend script.

Syntax 1 applies the following XSLT transformation to the Blend script:

usoft-install-dir\xsl\Util\Batch.1.0.xsl

Use Syntax 2 only if, for some reason, you want to specify (as xsl-filepath) a different XSL transformation. The following Syntax 1:

usoft-bindir\ublendit.exe xml-filepath

is equivalent to the following Syntax 2:

> usoft-bindir\ublendit.exe xml-filepath usoft-install-dir\xsl\Util\Batch.1.0.xsl

 

Optionally, you can pass any number of Blend input parameters as variable-name=variable-value pairs.

 

Example

C:\USoft91\bin64\ublendit.exe MyBlendScript.xml

If your clipboard currently contains "Hello World", and MyBlendScript.xml has the following contents:

<Example xmlns:pc="Processing.Command">
  <pc:value-of select="clipboard:GetText()"/>
</</Example>

then the result value is:

<Example>Hello World</Example>

While this example illustrates how you call a Blend script from the command line, it is untypical in that the script does nothing except returning a result value. More typically, you run a Blend script because in the course of processing the XML, it performs interesting additional actions, such as starting Rules Services, processing data, generating USoft application flatfiles, or managing files on a file system.

 

See also

Calling USCSXSL from a USoft context to apply a named transformation

Calling USCSXSL from a USoft context as a Blend script processor

Blend input parameters