Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > XML > XSLT
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
XSLT General questions and answers about XSLT. For issues strictly specific to the book XSLT 1.1 Programmers Reference, please post to that forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XSLT section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old April 4th, 2007, 12:45 PM
Authorized User
 
Join Date: Nov 2006
Location: , , .
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
Default Using XSLT and JAVA

I have generated XSLT script that takes various xml file as input and generates a new xml file. It is basically mapping between the xml files.
Now, I want to embed some JAVA code to this xslt so that I can deploy it to execute on any machine as well I am able to provide the input files at run time.
Can any one suggest me as to how can I so this and whether is this actually possible.
I will appreciate your help
Thanks!!
Aditi

Reply With Quote
  #2 (permalink)  
Old April 4th, 2007, 02:00 PM
Registered User
 
Join Date: Apr 2007
Location: , , .
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I'm not sure I understand the question. Do you want to call a java function from within your XSLT? or do you want to run your XSLT through Java using org.apache.xalan.xslt.Process?


Reply With Quote
  #3 (permalink)  
Old April 4th, 2007, 02:08 PM
mhkay's Avatar
Wrox Author
Points: 18,438, Level: 59
Points: 18,438, Level: 59 Points: 18,438, Level: 59 Points: 18,438, Level: 59
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Apr 2004
Location: Reading, Berks, United Kingdom.
Posts: 4,954
Thanks: 0
Thanked 290 Times in 285 Posts
Default

Take a look at the JAXP API (package javax.xml.transform). This provides methods that allow you to run an XSLT transformation from a Java application. It works with all the main Java XSLT processors including Saxon, Xalan, Oracle.



Michael Kay
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference
Reply With Quote
  #4 (permalink)  
Old April 4th, 2007, 02:09 PM
Authorized User
 
Join Date: Nov 2006
Location: , , .
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanx for responding !!

I want to run XSLT through JAVA and want to supply the input file names during runtime. I have no idea how to do this.
I will really appreciate if you could help me with this.
Thanx
Aditi

Reply With Quote
  #5 (permalink)  
Old April 4th, 2007, 02:13 PM
Authorized User
 
Join Date: Nov 2006
Location: , , .
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks for your reply!!
I will try package javax.xml.transform !!

Thanks!

Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
XSLT and JAVA bonekrusher XSLT 3 August 9th, 2006 07:38 PM
XSLT 2.0 Transformation and JAVA markus2000 XML 2 June 22nd, 2006 04:34 AM
XSLT with Java Hind XSLT 1 May 24th, 2006 04:18 AM
Java & XSLT safin XSLT 0 September 8th, 2005 01:11 PM
binding java from xslt mountainbiker XSLT 2 February 19th, 2004 11:53 AM



All times are GMT -4. The time now is 06:12 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.