Wrox Programmer Forums
Go Back   Wrox Programmer Forums > XML > XSLT
|
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 software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 13th, 2008, 03:26 PM
Authorized User
 
Join Date: May 2008
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.
 
Old June 13th, 2008, 03:52 PM
mhkay's Avatar
Wrox Author
 
Join Date: Apr 2004
Posts: 4,962
Thanks: 0
Thanked 292 Times in 287 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
 
Old June 13th, 2008, 04:06 PM
Authorized User
 
Join Date: May 2008
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.

 
Old June 13th, 2008, 04:31 PM
mhkay's Avatar
Wrox Author
 
Join Date: Apr 2004
Posts: 4,962
Thanks: 0
Thanked 292 Times in 287 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
 
Old June 13th, 2008, 06:02 PM
Authorized User
 
Join Date: May 2008
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.

 
Old June 13th, 2008, 07:01 PM
mhkay's Avatar
Wrox Author
 
Join Date: Apr 2004
Posts: 4,962
Thanks: 0
Thanked 292 Times in 287 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
 
Old June 19th, 2008, 01:56 PM
Authorized User
 
Join Date: May 2008
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






Similar Threads
Thread Thread Starter Forum Replies Last Post
writing an object to a file ironchef Java GUI 0 November 8th, 2006 06: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 [email protected] Classic ASP Professional 2 May 21st, 2004 05:32 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.