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)
-> + XPath documentation confusion (2)
-> + Extra block/CR generated (6)
-> + Apache FOP (2)
-> + Inserting Java Script (2)
-> + Convert EDIFACT to X12 or vice... (6)
-> + XSD: Restricting an attribute ... (2)
-> + Creating dynamically named ele... (2)
-> + Report reverts back to XHTML-C... (2)
-> + Certificate error (7)
-> + Opening DITA files and associa... (4)
-> + Cannot see links from source d... (10)
-> + SS 2007 vs. SS 2008 calling a ... (3)
-> + Unable to compile java file (8)
-> + Unable to use xsi:type attribu... (2)
-> + Unable to save xslt file after... (5)
-> + .NET XslTransform Compiled out... (3)
-> + Reporting Comparison (2)
-> + problems setting up the fonts ... (3)
-> + XML conversion (5)
-> + XQUERY: Application Crash (3)
-- Previous [1321-1340] [1341-1360] [1361-1380] Next
+ Website Feedback (249)
+ XSLT Help and Discussion (7625)
+ XQuery Help and Discussion (2017)
+ 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.