[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

Re: [xsl] Output to a file...


Subject: Re: [xsl] Output to a file...
From: Abel Braaksma <abel.online@xxxxxxxxx>
Date: Mon, 23 Jul 2007 21:23:22 +0200

Naschke, Pete wrote:
OK...the answer is "yes". (This is excellent...)

The code I am using is: "<xsl:output method="text" />"

Now...where does the text file get saved to? Where can it be found?

(Perhaps I am misinterpreting "= text" to mean that a file is being
created. Perhaps it only means that some text is being printed to the
screen...)

One of the basic things to learn about XSLT that it does a transformation for you and that it creates an output tree, but that you have to tell it yourself what to do with it.


Depending on the processor you are using, which you did not specify, you can do that in several ways. Mostly:

1. On the commandline, pipe stdout to your preferred output file
2. On the commandline, using the commandline option of your processor, i.e. -out or -o or whatever
3. From your calling application, i.e., with Java, using any interface that is applicable,i.e., JAXP
4. From your workflow application, that can capture stdout
5. Using a PI inside the XML source file and calling the XML file in a way your processor understands (sometimes this goes automatically)
6. If in a browser, you'll have to use either JavaScript, or a PI to get the output, but the output can, of course, not be saved
etc....


HTH,
Cheers,
Abel


Current Thread
Keywords