SQL Function

Topics: General, XSLT
Sep 27, 2011 at 8:24 PM

I am trying to use my sql function values in my xslt function.

I created the sql connection to pull a record to tell me if the system is up or down.  The sql function works and give me the following output:

How can I get the value of Payment_Online in my xslt?
This is what I see in my preview (OUTPUT) in my xlst function after I added the SQL function in my Function Calls Tab:
<in:inputs xmlns:in="http://www.composite.net/ns/transformation/input/1.0">
    <!-- Function Call Result (3 ms), XPath /in:inputs/in:result[@name='CheckSystem']/root -->
     <in:result name="CheckSystem">
         <root xmlns="">

I just need to check if the Payment_Online value is "Yes" or "No" and then I can Display a offline page or the normal page.



Sep 28, 2011 at 7:28 AM

Hi, c2w

You can get the value like this:

<xsl:value-of select="/in:inputs/in:result[@name='CheckSystem']/root/NewDataSet/Table/Payment_Online"/>

You can create a variable and use it in your template, e.g.

<xsl:variable name="isOnline" select="/in:inputs/in:result[@name='CheckSystem']/root/NewDataSet/Table/Payment_Online"/>

<xsl:when test="$isOnline = 'Yes'">

<!-- show the normal page -->


<!-- show the offline page -->





Sep 28, 2011 at 7:30 AM

We have a quick guide about creating and using SQL Functions here.