xsl-list
[Top] [All Lists]

Re: [xsl] Cross-compiler between XSLT and java ?

2007-02-04 21:38:56
It depends on what you are trying to accomplish. 

 
You can use JAXB if you are simply trying to map XML documents to Java objects 
and vice versa, JAXB allows you to work with XML without having to know XML 
programming techniques. 
There's a free tutorial on Overview of XML (WJO-1115) [Module 3 XML Processing] 
that goes over the details of JAXB nicely here:
http://developers.sun.com/offers/#freeaccess 


If you are trying to transform and XML file with XSLT and display the results 
inside a JSP file then you can use JSP Tag Libraries XML tags. 
After you successfully install JSTL 1.1 (jstl.jar, standard.jar, Servlet 2.4 
web.xml and xalan.jar) you can import the XML file and the XSLT file with 
the <c:import tag and then  use the <x:transform tag inside a JSP to  perform 
the transformation. 

There are many other tools that work with Java and XML/XSLT but it's hard to 
pinpoint the right tool without knowing what's the code is trying to accomplish.

-Rashmi


----- Original Message ----
From: Kamal Bhatt <kbhatt(_at_)tt(_dot_)com(_dot_)au>
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Sent: Sunday, February 4, 2007 6:27:29 PM
Subject: Re: [xsl] Cross-compiler between XSLT and java ?


Martynas Jusevicius wrote:
Java's XSLT transformer does that by default -- it compiles XSLT into
Java byte-code, called translet. I don't know how to use it
separately, though.
AFAIK Micheal Kay from Saxonica and at least several other projects
are working on that as well.
Never used it, but...
http://xml.apache.org/xalan-j/xsltc_usage.html

Martynas

On 2/4/07, Ben Stover <bxstover(_at_)yahoo(_dot_)co(_dot_)uk> wrote:
A friend asked me if there is something like a cross-compiler which 
converts a XSLT stylesheet into a java (source) programm.

His boss forces him to write java programs to process XML documents.
Of cause - with XSLT this is much more comfortable. So the best way 
for him would be to
write internally XSLT stylesheet which performs the task and convert 
them
officially into a java program.

Is there a way to do this 
n should be necessary to run the java 
program later.

Ben

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: 
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--




-- 
Kamal Bhatt


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--


 
____________________________________________________________________________________
We won't tell. Get more on shows you hate to love 
(and love to hate): Yahoo! TV's Guilty Pleasures list.
http://tv.yahoo.com/collections/265 

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>