That's exactly what it was.  As soon as you said it it was very clear.

Thanks much,
Noel


|--------+----------------------->
|        |                       |
|        |          garyp@firstec|
|        |          h.com        |
|        |                       |
|        |          07/06/2001   |
|        |          07:25 PM     |
|        |          Please       |
|        |          respond to   |
|        |          xalan-dev    |
|        |                       |
|--------+----------------------->
  >----------------------------------------------------------------------------|
  |                                                                            |
  |       To:     [EMAIL PROTECTED]                                     |
  |       cc:     (bcc: Noel L Yap)                                            |
  |       Subject:     Re: java extension function not found                   |
  >----------------------------------------------------------------------------|






Hi, Noel --

The quoting looks fine.  The message in the traceback was a little
confusing.  I'm not sure what the problem is for sure since I'm pretty
wrapped up in hot project.  However, the following two things come to
mind:

1.  The java.text.SimpleDateFormat.new call does not have a namespace
prefix so XalanJ may be thinking that it is a XalanJ function and thus
unable to find it.  Try changing things to:

       <xsl:value-of
 select="java:format(java:java.text.SimpleDateFormat.new('MM/dd/yyyy
hh:mm
                     -----

a'),parse(com.jpmorgan.tk.utils.core.iso8601.IsoDateTimeParser.getInstance(),.))"/>


and see if things come out better.  You'll probably need to do this for
your IsoDateTimeParser methods as well.

2.  Try breaking things down into multiple steps to try to localize the
problem:

  <xsl:variable name="sdf"
select="java:java.text.SimpleDateFormat.new('MM/dd/yyyy hh:mm a')"/>
  SDF has the value:  <xsl:value-of select="$sdf"/>
  <xsl:variable name=idtp"
select="java:com.jpmorgan.tk.utils.core.iso8601.IsoDateTimeParser.getInstance()
"/>
  IDTP has the value:  <xsl:value-of select="$idtp"/>
  <xsl:variable name="ir1" select="java:parse($idtp, .)" />
  IR1 has the value:  <xsl:value-of select="$ir1"/>
  Final value:
  <xsl:value-of select="java:format($sdf, $ir1)" />

HTH,
Gary


Noel L Yap wrote:
>
> The line in question is:
>       <xsl:value-of
> select="java:format(java.text.SimpleDateFormat.new('MM/dd/yyyy hh:mm
>
a'),parse(com.jpmorgan.tk.utils.core.iso8601.IsoDateTimeParser.getInstance(),.))"/>

>
> AFAICT, there's no problems with quoting.  Am I misunderstanding your post?
>
> I've wanted to upgrade, but I haven't had time to be able to test 2.x and push
> it out to production.
>
> Noel
>
> |--------+----------------------->
> |        |                       |
> |        |          garyp@firstec|
> |        |          h.com        |
> |        |                       |
> |        |          07/06/01     |
> |        |          06:57 PM     |
> |        |          Please       |
> |        |          respond to   |
> |        |          xalan-dev    |
> |        |                       |
> |--------+----------------------->
>
>----------------------------------------------------------------------------|
>   |
|
>   |       To:     [EMAIL PROTECTED]
|
>   |       cc:     (bcc: Noel L Yap)
|
>   |       Subject:     Re: java extension function not found
|
>
>----------------------------------------------------------------------------|
>
> It looks like you've used the apostrophe (') delimiter to start your
> pattern and start the literal MM/dd/yyyy which ends the pattern.  this
> is why the error message is so strange.  Try using quotes where the
> nested apostrophes are now.
>
> Also, it would be best to upgrade to a current release of XalanJ.  The
> 1.2.2 stuff is pretty old and no longer supported.
>
> Gary
>
> Noel L Yap wrote:
> >
> > I think others have reported this recently, so please point me to the
archives
> > if this is a repeat.
> >
> > First off, I'm using xalan-j version 1.2.2 on a command line.
> >
> > I've been able to get this to work before so I don't know what's wrong.
> >
> > I've attached my xsl.
> >
> > Here's the output:
> > nyap.jpmpsdev@jpmpsdev2:/vobs/ds/tig/web/xsl/tig|nyap-tig-du> xslt
> > ~/tmp/Meetings.xml events.xsl events.html -PARAM view "'aoeu'"
> > ========= Parsing file:/vobs/ds/tig/web/xsl/tig/events.xsl ==========
> > XSL Error: pattern = 'java:format(java.text.SimpleDateFormat.new('MM/dd/yyyy
> > hh:mm
> >
>
a'),parse(com.jpmorgan.tk.utils.core.iso8601.IsoDateTimeParser.getInstance(),.))'

>
> > Could not find function: java.text.SimpleDateFormat.new
> >  Remaining tokens: ( '(' ''MM/dd/yyyy hh:mm a'' ')' ',' 'parse' '('
> > 'com.jpmorgan.tk.utils.core.iso8601.IsoDateTimeParser.getInstance' '(' ')'
','
> > '.' ')' ')'), style tree node: org.apache.xalan.xslt.ElemValueOf@4ea91
> > XSL Error: Could not parse file:/vobs/ds/tig/web/xsl/tig/events.xsl
document!
> > XSL Error: processStylesheet not successful!
> > XSLT: pattern = 'java:format(java.text.SimpleDateFormat.new('MM/dd/yyyy
hh:mm
> >
>
a'),parse(com.jpmorgan.tk.utils.core.iso8601.IsoDateTimeParser.getInstance(),.))'

>
> > Could not find function: java.text.SimpleDateFormat.new
> >  Remaining tokens: ( '(' ''MM/dd/yyyy hh:mm a'' ')' ',' 'parse' '('
> > 'com.jpmorgan.tk.utils.core.iso8601.IsoDateTimeParser.getInstance' '(' ')'
','
> > '.' ')' ')')
> > Xalan: was not successful.
> > XSLProcessor: done
> >
> > I've been able to get java.lang.String.new to work, but I haven't had any
luck
> > with anything else.
> >
> > Any help would be greatly appreciated.
> >
> > Thanks,
> > Noel
> >
> > Enc
> > (See attached file: events.xsl)
> >
> >   ------------------------------------------------------------------------
> >                  Name: events.xsl
> >    events.xsl    Type: BizTalk Schema (text/xml)
> >              Encoding: base64
>
> This communication is for informational purposes only.  It is not intended as
> an offer or solicitation for the purchase or sale of any financial instrument
> or as an official confirmation of any transaction. All market prices, data
> and other information are not warranted as to completeness or accuracy and
> are subject to change without notice. Any comments or statements made herein
> do not necessarily reflect those of J.P. Morgan Chase & Co., its
> subsidiaries and affiliates.




This communication is for informational purposes only.  It is not intended as
an offer or solicitation for the purchase or sale of any financial instrument
or as an official confirmation of any transaction. All market prices, data
and other information are not warranted as to completeness or accuracy and
are subject to change without notice. Any comments or statements made herein
do not necessarily reflect those of J.P. Morgan Chase & Co., its
subsidiaries and affiliates.

Reply via email to