Skip to Content
author's profile photo Former Member
Former Member

XSL Transformation Action Parameters

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?

Add a comment
10|10000 characters needed characters exceeded

Related questions

4 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Sep 14, 2007 at 04:47 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      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

  • author's profile photo Former Member
    Former Member
    Posted on Sep 14, 2007 at 04:12 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 19, 2007 at 04:20 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

    • 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

  • author's profile photo Former Member
    Former Member
    Posted on Sep 20, 2007 at 10:51 PM

    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

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.