XML Editor
Sign up for a WebBoard account Sign Up Keyword Search Search More Options... Options
Chat Rooms Chat Help Help News News Log in to WebBoard Log in Not Logged in
Show tree view Topic
Topic Page 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 Go to previous topicPrev TopicGo to next topicNext Topic
Postnext
Nid LimSubject: Java Functions
Author: Nid Lim
Date: 21 Sep 2007 01:34 AM
Hi,

Whenever I use Java functions, I noticed that in the XSLT code will be produced the functions with the word string in fron of the String parameter passed in. For example, for the IntDate.getDate function:

IntDate:getDate(11,11,11,string(yes))

Can I somehow change/customise the function so that the string parameter value would appear as other value without having the sting shown like that? Can it be like this:

IntDate:getDate(11,11,11,string(yes)) ?

Thanks,
Nid

Postnext
Alberto MassariSubject: Re: Java Functions
Author: Alberto Massari
Date: 21 Sep 2007 02:10 AM
Hi Nid,
the "string" function call is added to ensure that the Java code is
invoked with the right type (e.g. a string instead of a node, or a
double). If you are sure that what you are specifying as value is
already a string, you can safely remove it.

Hope this helps,
Alberto

Postnext
Nid LimSubject: Re: Java Functions
Author: Nid Lim
Date: 21 Sep 2007 02:24 AM
Hello Alberto,

Thank you for your reply!
I know that we can remove this manually from the xslt code. But I am asking whether there is a way to remove that automatically?

Thanks,
Nid

Postnext
Alberto MassariSubject: Re: Java Functions
Author: Alberto Massari
Date: 21 Sep 2007 03:29 AM
Hi Nid,
to be on the safe side, Mapper will always add the cast to the
correct type; could you explain why do you find this incorrect?

Thanks,
Alberto

Posttop
Nid LimSubject: Re: Java Functions
Author: Nid Lim
Date: 21 Sep 2007 03:39 AM
Hello Alberto,

There is nothing wrong with the Mapper at all. I am required to do research on the mapper to find out the best suite product. I have found The Stylus Studio is except this part of having the string cast type added before the string value.

The reason is that we are finding the product that is able to create the xslt of our requirement and so that we can use the xslt file with our Java program to get the output xml we wanted. The xslt file should contain functions that our Java program could understand, which those functions I added in, but should not contain the cast to correct type at all.

Those are the reason I am asking you whether there is funciton somewhere I can disable the casting function?

Thanks,
Nid

 
Topic Page 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 Go to previous topicPrev TopicGo to next topicNext Topic
Download A Free Trial of Stylus Studio 6 XML Professional Edition Today! Powered by Stylus Studio, the world's leading XML IDE for XML, XSLT, XQuery, XML Schema, DTD, XPath, WSDL, XHTML, SQL/XML, and XML Mapping!  
go

Log In Options

Site Map | Privacy Policy | Terms of Use | Trademarks
Stylus Scoop XML Newsletter:
W3C Member
Stylus Studio® and DataDirect XQuery ™are from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2016 All Rights Reserved.