?
Solved

Saxon Processor --> PHP, XML, XSL output to Excel file

Posted on 2004-10-08
5
Medium Priority
?
1,036 Views
Last Modified: 2013-11-18
Hello,

I have the Saxon processor installed on my machine and on the command line works great for getting an XML file using XSL to output to an Excel file.  Now, I need to get it to work through my PHP script.  If I can somehow get some code that will create the excel file from running the php script, that will be a great step forward.  Below is my latest attempt, but it is not outputting the excel file.  Please help, thanks.

<?php
      $output = exec('java -jar ./saxon/saxon.jar ./saxon/newfile.xml ./saxon/2excel.xsl');
      echo "<pre>$output</pre>";
?>
0
Comment
Question by:jpegvarn
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 15

Expert Comment

by:dualsoul
ID: 12272397
hm...can .... i'm not sure i understood what the problem is?

you can't start Saxon from PHP? or you do that, but no output file is created? Is it all right with access rights?

by the way, why are you using Saxon for Java on PHP? why not Sablotron?
0
 
LVL 6

Expert Comment

by:sathishv
ID: 12274411
Where do you expect the output file to be created? You might have rights problem. If I remember correctly there is an option in Saxon to set the output directory, or it can be passed as a parameter and accessed in XSL.
0
 

Author Comment

by:jpegvarn
ID: 12275576
Hi Guys...and thank you for the replies,

The problem is there is no output.  I expect the excel file to be created within the same folder as where I am executing the test.php file.

If I run the same command at a command prompt, that is what happens.  I did give the 'Internet Guest Account' read/read & execute permissions to cmd.exe.  I am ultimatley trying to get the command to run from the browser, then the user will be prompted to save the excel file to their dekstop.

dualsoul - if you highly recommend Sablotron, could you give me a quick and dirty example of how I can use it?

Thank you.
0
 
LVL 6

Accepted Solution

by:
sathishv earned 2000 total points
ID: 12275737
What about write permissions for the folder in which you expect the file to get created?
0
 

Author Comment

by:jpegvarn
ID: 12275886
I can not believe I didn't think of that!  That was it, thank you.  Points awarded.

Quick question if you don't mind - I am testing this on a Windows machine and will ultimatley be moving everything over to a freebsd machine.  What is the "Internet Guest Account" called for freebsd/unix and what chmod should I be using on the folders?  Thank you!
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Preface In the first article: A Better Website Login System (http://www.experts-exchange.com/A_2902.html) I introduced the EE Collaborative Login System and its intended purpose. In this article I will discuss some of the design consideratio…
Introduction Since I wrote the original article about Handling Date and Time in PHP and MySQL several years ago, it seemed like now was a good time to update it for object-oriented PHP.  This article does that, replacing as much as possible the pr…
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
The viewer will learn how to count occurrences of each item in an array.

719 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question