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 Display Modes
  #1 (permalink)  
Old June 13th, 2008, 03:26 PM
Authorized User
 
Join Date: May 2008
Location: , , .
Posts: 47
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to anboss
Default writing into a file in linux file system

I have to populate results of my transaction in a file and write this file into linux file system using XSL. Every time i have to open the file, update the file with transaction results and save it in linux file system. Please help me with this.
Reply With Quote
  #2 (permalink)  
Old June 13th, 2008, 03:52 PM
mhkay's Avatar
Wrox Author
Points: 17,773, Level: 58
Points: 17,773, Level: 58 Points: 17,773, Level: 58 Points: 17,773, Level: 58
Activity: 8%
Activity: 8% Activity: 8% Activity: 8%
 
Join Date: Apr 2004
Location: Reading, Berks, United Kingdom.
Posts: 4,839
Thanks: 0
Thanked 267 Times in 262 Posts
Default

Which XSLT processor are you using and how are you invoking it? Consult the documentation for your selected product to find out how to write the output to a chosen file. It will typically vary depending on whether you are invoking the processor from a development environment, from an API (e.g. Java or Javascript) or from the Unix command line.

Michael Kay
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference
Reply With Quote
  #3 (permalink)  
Old June 13th, 2008, 04:06 PM
Authorized User
 
Join Date: May 2008
Location: , , .
Posts: 47
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to anboss
Default

I am currently working in XML Spy 2007. am not sure with the saxon version in this tool. The targetted place where i will be putting this XSL to run is a SOA appliance which knows just a subset of xsl tags. I will develop xsl in XML spy and run the xsl in this appliance.

Out of extreme curiosity i just wanted to know if file processing is possible in xsl? just as we do in C or Java.

Reply With Quote
  #4 (permalink)  
Old June 13th, 2008, 04:31 PM
mhkay's Avatar
Wrox Author
Points: 17,773, Level: 58
Points: 17,773, Level: 58 Points: 17,773, Level: 58 Points: 17,773, Level: 58
Activity: 8%
Activity: 8% Activity: 8% Activity: 8%
 
Join Date: Apr 2004
Location: Reading, Berks, United Kingdom.
Posts: 4,839
Thanks: 0
Thanked 267 Times in 262 Posts
Default

You can read documents using the document() function and in XSLT you can write them using the xsl:result-document instruction. But generally you will invoke an XSLT transformation from a host application, and the host application will be responsible for obtaining the input and disposing of the output. As I said before, consult the API documentation for your chosen product.

Michael Kay
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference
Reply With Quote
  #5 (permalink)  
Old June 13th, 2008, 06:02 PM
Authorized User
 
Join Date: May 2008
Location: , , .
Posts: 47
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to anboss
Default

Good to know that there is a way.

Our aim is to log transaction status in a file present in linux file system. the input to the xsl that we are going to consume is a soap response message sent by an application which tells if transaction is success or is a failure. we have to use the soap response and keep appending to a file the status of each transaction. So can we use the result-document to write to a file present remotely.

The appliance we use is a pure and pure xsl based one. No java or any other runtime.

Reply With Quote
  #6 (permalink)  
Old June 13th, 2008, 07:01 PM
mhkay's Avatar
Wrox Author
Points: 17,773, Level: 58
Points: 17,773, Level: 58 Points: 17,773, Level: 58 Points: 17,773, Level: 58
Activity: 8%
Activity: 8% Activity: 8% Activity: 8%
 
Join Date: Apr 2004
Location: Reading, Berks, United Kingdom.
Posts: 4,839
Thanks: 0
Thanked 267 Times in 262 Posts
Default

I think you need to ask these questions in a forum that is specific to your chosen product.

Michael Kay
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference
Reply With Quote
  #7 (permalink)  
Old June 19th, 2008, 01:56 PM
Authorized User
 
Join Date: May 2008
Location: , , .
Posts: 47
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to anboss
Default

i perfectly understood your point. i got the solution too. Thanks Kay

Reply With Quote
Reply


Thread Tools
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
writing an object to a file ironchef Java GUI 0 November 8th, 2006 05:35 PM
Writing to Text File striker9 ASP.NET 2.0 Basics 1 May 12th, 2006 05:17 AM
writing to am xml file MOU Classic ASP XML 0 July 6th, 2005 07:38 AM
writing to a new file on the server Toran Classic ASP XML 1 April 3rd, 2005 11:01 AM
File Writing Performance hugh@kmcnetwork.com Classic ASP Professional 2 May 21st, 2004 05:32 PM



All times are GMT -4. The time now is 07:19 AM.


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