next
|
Subject: RE: Urgent Help needed : Java functions Author: Ivan Pedruzzi Date: 25 Apr 2003 10:24 AM
|
In this trivial case there is no benefit to use a Java function, but
there are situations where you need to perform specific task like CPU
intensive calculations or database lookups where java extensions are a
great help.
Sometimes people that are not familiar with XSLT find java extensions
more intuitive. They can quickly assemble their mappings graphically and
leverage their expertise.
Java Extension functions are not part of XSLT 1.0, so implementations
could result incompatible across XSLT processors.
We try to warn our customers about portability risks they could
encounter but I forgot to do it this time.
XSLT 2.0 is supposed to shed some light on this topic.
Thanks Rob to point this out.
Ivan Pedruzzi
Progress Software
http://www.stylusstudio.com
> -----Original Message-----
> From: stylus-studio-xslt Listmanager
> [mailto:listmanager@edn.exln.com]
> Sent: Friday, April 25, 2003 10:03 AM
> To: Recipients of 'stylus-studio-xslt' suppressed
> Subject: RE: Urgent Help needed : Java functions
>
>
> From: "Rob Sutherland"
>
>
> Ivan,
>
> can you explain to me the benefits of using a Java function
> to transform XML to XML rather than using an XSL template to
> do the various transforms?
>
> thanks.
>
> Rob
>
>
> -----Original Message-----
> From: stylus-studio-xslt Listmanager [mailto:listmanager@edn.exln.com]
> Sent: Friday, April 25, 2003 6:52 AM
> To: Recipients of 'stylus-studio-xslt' suppressed
> Subject: RE: Urgent Help needed : Java functions
>
>
> From: Ivan Pedruzzi
>
>
>
> Change the return type to Object
>
> public Object convertForm(String oldData)
>
>
>
> Ivan Pedruzzi
> Progress Software
> http://www.stylusstudio.com
>
>
> > -----Original Message-----
> > From: stylus-studio-xslt Listmanager
> [mailto:listmanager@edn.exln.com]
> > Sent: Friday, April 25, 2003 6:22 AM
> > To: Recipients of 'stylus-studio-xslt' suppressed
> > Subject: Urgent Help needed : Java functions
> >
> >
> > From: "Ramya N"
> >
> > Hi,
> >
> > I recently installed Stylus 4.6. Finding it very useful. But
> > I have run into a problem. I have to map 2 XMLs. The process
> > involves using complex java functions. So , for a trial i
> > created a Java class with a simple function given below :
> >
> > public class Functions
> > {
> > private String newData;
> > public String convertForm(String oldData)
> > {
> > if(oldData == "SW")
> > newData = "Software";
> > else if(oldData == "HW")
> > newData = "Hardware";
> > else if(oldData == "DV")
> > newData = "Developer Guide";
> > else if(oldData == "QA")
> > newData = "Testing";
> > else
> > newData = "Others";
> > return newData;
> > }
> > }
> >
> > I want to use this function in an XML to XML mapping XSL. I
> > registered this class Functions following the steps given in
> > the Help Documentation (Help Menu). But when i click on the
> > XSLT Functions in the popup, the function convertForm does
> > not appear in the list of functions. Any ideas??
> >
> > Would appreciate a quick reply please.
> >
> > Thanks in advance
> >
> > Ramya.
> >
> >
> >
> > To reply: mailto:stylus-studio-xslt.6628@edn.exln.com
> > To start a new topic: mailto:stylus-studio-xslt@edn.exln.com
> > To login: http://edn.exln.com/~SSDN
> >
>
>
>
> To reply: mailto:stylus-studio-xslt.6630@edn.exln.com
> To start a new topic: mailto:stylus-studio-xslt@edn.exln.com
> To login: http://edn.exln.com/~SSDN
>
>
>
>
> To reply: mailto:stylus-studio-xslt.6633@edn.exln.com
> To start a new topic: mailto:stylus-studio-xslt@edn.exln.com
> To login: http://edn.exln.com/~SSDN
>
|
|