Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

One xml file with multiple xslt

 
David Sundo
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, it's possible.
 
David Sundo
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 13058
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic