cancel
Showing results for 
Search instead for 
Did you mean: 

XSLT mapping error

Former Member
0 Kudos

Hi ,

i am working on XSLT mapping. i have a requirment, in which i have to convert the date from ddMMyyyy to yyyyMMdd format. i have written a java function to do this.

when i test the scenario in interface mapping, i am getting the following error

Call XSLT processor with stylsheet Stock_Map1.xsl.

Unable to find resource XSLT/com/date/dateTransform.class

i have specified the namespace in xslt mapping.

can any one help me in resolving htis issue

points if useful

Thanks

Deepika

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi

You do not need a Java function in XSLT.

These statement should achieve the same, just pass 3 continuos value-of select statement as below.

<FINALDATE>
<xsl:value-of select="substring(INPUTDATE,5,4)"/>
<xsl:value-of select="substring(INPUTDATE,3,2)"/>
<xsl:value-of select="substring(INPUTDATE,1,2)"/>
</FINALDATE>

BR

Answers (5)

Answers (5)

Former Member
0 Kudos

Hi Deepika,

to ease your mapping: Why don't you use

xsl:format-number

http://www.w3schools.com/xsl/func_formatnumber.asp

Or:

See:

http://geekswithblogs.net/workdog/archive/2007/02/08/105858.aspx

Regards Mario

Edited by: Mario Müller on Aug 1, 2008 9:08 AM

Former Member
0 Kudos

Hi Deepika,

You can also do this without Java function. See http://geekswithblogs.net/workdog/archive/2007/02/08/105858.aspx for some examples on how to format dates in XSLT.

Kind regards,

Koen

Former Member
0 Kudos

Hi Deepika,

open the zip-file you uploaded.

WinZip for e.g. shows you on the right side the path:

SAP XI searches the XSL in Path

XSLT/com/date

Make sure that the path in WinZip is the same.

If it is not the same you have to zip on a different hierachie-level in your windows explorer.

Regards Mario

Former Member
0 Kudos

Dear Deepika,

I hope you can easily do this by Message Mapping.

But if some thing is included apart from data formatting, and ur requirement is to use only xslt then u can go for it.

Or if u want to just test XSLT mapping

Make sure you give proper path in your .XSL file which are input and output fields.

Plz use the correct XSD files of Data Types for XSLT Mapping

Plz check the name spaces in the XSL file.

Best Regards

Praveen

Former Member
0 Kudos

Hi Praveen,

what do u mean by "Make sure you give proper path in your .XSL file which are input and output fields".. can u plz elobrate a little more.

Thanks

Deepika

prateek
Active Contributor
0 Kudos

Why ain't u using the graphical mapping DateTrans fucntion?

Regards,

Prateek