cancel
Showing results for 
Search instead for 
Did you mean: 

javax.xml.transform.TransformerException

Former Member
0 Kudos

Hello

I am having XSLT to transform from my source format to target format. I tested the XSLT with the source XML file using XSLT Tester utility of SAP-GUI and it runs fine.

But when it is imported it gives the error

************************Start Message****************

javax.xml.transform.TransformerException: com.sap.engine.lib.xml.util.NestedException: Variable '$t_status' has not been bound to a value

************************End Message*****************

the variable t_status gets the value conditionally and hence sometimes it may be empty.

Does anyone know how to define a variable in XSLT without binding a value to that?

Thanks in advance.

Regards

Rajeev

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Rajeev,

Can you post the XSLT code or atleast the portion where u define/use this variable.

Regards

Vishnu

Former Member
0 Kudos

Hello Vishnu,

thanks for the reply.here is the code

************************Code start******************

<xsl:if test="$c_to != $Trial_Name">

<xsl:variable name="t_status"><xsl:value-of select="../../status/@code"/></xsl:variable>

</xsl:if>

***********************Code End********************

this code works fine in XSLT tester and it assigns appropriate value if it is present.

regards

rajeev

Former Member
0 Kudos

HI Rajeev,

Hereis my observation,

1) The scope of this variable is limted to the "IF" do you really think that this variable is going to help you?

2) You can have a variable (say t_status), which captures the "../../status/@code" globally.

3) You can use the variable only if a condition is met

(say <xsl:if test="$c_to != $Trial_Name">)

Not sure if this fixes your problem, directly. But many parser's give such scope resolution error.

If it does nt fix your issue, let me have the complete code. so I can think of some alternative.

Also, hope u know that you cant change the value of the vaiable in XSLT.

Regards

Vishnu

Former Member
0 Kudos

Hi Vishnu,

Looks like its working fine.Thanks a lot for that.But one question remains 'why its working fine in XSLT Tester?'..

I guess its because SAP uses different parsers in ABAP and Java (since XSLT Tester is available in SAP-GUI and integration builder is the java based apps) :).

Regards

Rajeev

Answers (0)