This week's book giveaway is in the OCAJP forum.
We're giving away four copies of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) and have Khalid A Mughal & Rolf W Rasmussen on-line!
See this thread for details.
Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Error while using xs:dateTime in an XSL and transforming it using a Java program

 
Ram Korutla
Ranch Hand
Posts: 80
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

I have put the below schema defintion and

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:rm="OTC_RM_Rates_4-0"
xmlns:mtc="OTC_Matching_Rates_4-0"
xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:fpml="http://www.fpml.org/2007/FpML-4-3"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xs="http://www.w3.org/2004/XMLSchema"
xsi:schemaLocation=" OTC_RM_Rates_4-0 /xmls/OTC/OTC_RM_Rates_4-0.xsd OTC_Matching_Rates_4-0 /xmls/OTC/OTC_Matching_Rates_4-0.xsd http://schemas.xmlsoap.org/soap/envelope/
/xmls/OTC/soap-envelope.xsd http://www.fpml.org/2007/FpML-4-3 /xmls/OTC/fpml-main-4-3.xsd">

and I am trying to get "Year" from a variable $field that stores the date in some other format as in below

<xsl:value-of select="year-from-dateTime(xs:dateTime($field))"/>


While running the Java program that transforms this xsl, I am getting the below error.

"The first argument to the non-static Java function 'dateTime' is not a valid object reference"

I am very novice to the schema etc and as luck would have it I have to work this some how.

Any help would be greatly appreciated.



Thanks
Phani
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic