| Author |
One xml file with multiple xslt
|
David Sundo
Greenhorn
Joined: Nov 13, 2002
Posts: 6
|
|
My limitation in my project is that "No Server". In this project, I run the file from the CD Disk. I try to use one xml file with multiple xslt. Would it possible? Reason: the content of one xml file will be used in 30 diferrent pages. Otherwise I need to create 30 xml files with 30 xslt which is one xml for one xslt file. Any ideas? Thanks in advanced! Greatly appreciated for any feedbacks. Regards, David Sundo
|
 |
Lasse Koskela
author
Sheriff
Joined: Jan 23, 2002
Posts: 11962
|
|
|
Yes, it's possible.
|
Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
|
 |
David Sundo
Greenhorn
Joined: Nov 13, 2002
Posts: 6
|
|
Yes Lasse. If it is possible, Can you give me a hint or simple example how to do that? I have thought about this for a while, I still have no clues. I am new in this xslt. Thank you. -David Sundo
|
 |
Lasse Koskela
author
Sheriff
Joined: Jan 23, 2002
Posts: 11962
|
|
|
Ok. I just re-read your post and realized that a web container/application server is apparently out of the question for you (because of the run-from-disk requirement). In that case, you're probably forced to perform the transformation no the client (web browser) and you're forced to refer to the XSL file from within the XML, right? In that case, I'm afraid you'll have to have 30 copies of the XML with a different stylesheet reference in each of them.
|
 |
William Brogden
Author and all-around good cowpoke
Rancher
Joined: Mar 22, 2000
Posts: 12266
|
|
Perhaps I don't understand the situation, but since you can specify the xsl file in the command line, why can't you have 30 batch files? See org.apache.xalan.xslt.Process class Bill
|
 |
 |
|
|
subject: One xml file with multiple xslt
|
|
|