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
Conferences Close Tree View
+ Stylus Studio Feature Requests (1192)
- Stylus Studio Technical Forum (14621)
-> + SS says my trial has expired -... (2)
-> + XSD input; SQL Table Output Ne... (2)
-> + Building Schema from XML (2)
-> + conditions on tag values expre... (3)
-> + XML converter "omit fields whe... (3)
-> + Marklogic XQuery support in St... (2)
-> + XSL switching stylesheet from ... (10)
-> + Maximum recursion depth exceed... (3)
-> + How do I develop the server si... (2)
-> + XSD Reuse (2)
-> + what happened to my preview re... (3)
-> + How do I use the Custom XML Co... (4)
-> + WYSIWYG missing in release 2 o... (2)
-> + space between elements (3)
-> + Oracle XML Gateway output CONV... (6)
-> + Someone please help me install... (5)
-> + XML Schema (XSD) to COBOL Data... (2)
-> + Can't compile Java (9)
-> + Trouble using the UDDI Browser (5)
-> + JVM Problem when installing Ar... (2)
-- Previous [1381-1400] [1401-1420] [1421-1440] Next
+ Website Feedback (249)
+ XSLT Help and Discussion (7625)
+ XQuery Help and Discussion (2016)
+ Stylus Studio FAQs (159)
+ Stylus Studio Code Samples & Utilities (364)
+ Stylus Studio Announcements (113)
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
(Deleted User) Subject: Re: Java Functions
Author: (Deleted User)
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
(Deleted User) Subject: Re: Java Functions
Author: (Deleted User)
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

   
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.