cancel
Showing results for 
Search instead for 
Did you mean: 

XSL Transformation Action Parameters

Former Member
0 Kudos

Does anyone know how, or even if it's possible, to pass parameters to an XSLT stylesheet using the XSL Transformation action in a Business Logic Transaction?

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Jeremy, Jeremy,

Thanks for the advice, but if you read my answer to Som (all the sentences this time), you'll see that's exactly what I ended up doing. Great minds think alike.

Bill

Former Member
0 Kudos

Som,

I thought as much, but I thought I'd throw the question out there anyway, in case I had missed something. In the end I just used XML Loader to load the XSLT into a local, changed the column name with xpath in an assign action, and linked this into the InputXSL parameter of the transform action. It gives the same result pretty simply.

Thanks for your answer,

Bill

jcgood25
Active Contributor
0 Kudos

Bill,

Oh...ye of little BLS faith Don't put all your eggs in the Som basket either...

First load the raw xslt in a sequence using the XMLLoader http://xxxx, then use assignment links as necessary to adjust the properties in your transform just like you would when changing values in any xml object.

By doing this your transform, even though initially static, will now be dynamic.

Since the XSL Transform action block simply applies the xslt to the xml document, now assign the updated XMLLoader's XmlContent to the XSLTranformation's InputXSL, along with the obvious Input xml source object.

Trace out the XSLT action's results and see what you get.

Regards,

Jeremy

Former Member
0 Kudos

Som,

The parameter I was referring to is not an action parameter, but a parameter in the XSLT itself. E.G. the following extracts a column from an xMII document and creates a new doc with that one column. But I want to name the column at run time, so I can use the same XSLT in various places.

[code]

<xsl:stylesheet version="1.0"

xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:param name="ColumnToExtract" select="ProductAshDry"></xsl:param> <xsl:template match="/">

<Rowsets DateCreated="2007-05-31T10:58:25" EndDate="2007-05-31T10:58:25" StartDate="2007-05-31T10:58:25" Version="11.5.2">

<Rowset>

<Columns>

<Column Description="Item" MaxRange="0" MinRange="0" Name="Data" SQLDataType="1" SourceColumn="Data"/>

</Columns>

<xsl:for-each select="/Rowsets/Rowset/Row">

<Row>

<Data>

<xsl:value-of select="$ColumnToExtract"/>

</Data>

</Row>

</xsl:for-each>

</Rowset>

</Rowsets>

</xsl:template>

</xsl:stylesheet>

[/code]

ColumnToExtract is a parameter for the XSLT, which can be set at runtime with various other transform engines. I just can't see a way to set it using the xMII XSL Transformation action.

Regards,

Bill

Former Member
0 Kudos

Northup

sorry for misunderstaning ur point.

But with XSL Tranformation action parameter in an XSLT can't be set at runtime. This action is used only to modify an original XML doc to the desired output defined by that XSL.

Regards

Som

Former Member
0 Kudos

Northup

In Business Logic Editor, the XSL Transformation action is used to apply an XSL Transform to an XML document. The net result of this action is that the original XML document is modified to the desired output defined by the XSL.

So only possible parameter to be passed to that action is an input with datatype of XML. This specifies the XML content that is to be modified by the XSL. The output of this action also specifies the XML that is generated after the XSL has been applied.

Regards

Som