This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Create text file



Håkan Pettersson asks:
>Given following element:
><image name="abc" extension="txt">
>          This text should be outputted!
></image>
>Is it possible to create a text file
>called "abc.txt" write the text and the close
>the file.

In general, XSLT processors don't know that much about
the destination of their output. Others have already
pointed out that several popular processors have an
extension that could do this, and have reminded you to
use method="text" output.

For the real purist, I think that you could generate an
elaborate bundle of shell scripts (batch files, or
whatever they are in your environment) that would do the
work, but the combination would be quite inefficient.
The more of those <image> elements you had, the worse
it would be.

Note that either the pure or impure approach could run
into a problem if more than one image has the same
values for both attributes, since it would be creating
a file name.ext more than once.
.................David Marston


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]