Re: xsl self-documentation on the fly (Perl?)

Subject: Re: xsl self-documentation on the fly (Perl?)
From: David_Marston@xxxxxxxxx
Date: Fri, 23 Jun 2000 17:34:06 -0400
Dr Jeni Tennison wrote:
>I'm also going to assume that you want to create an
>XML log file rather than plain text.

>The first thing I thought of was using saxon:output or xt:document to
>create your log, but the problem is that whenever you direct output to a
>file, it overwrites that file (you can't just append to it), which ruins
>that option as far as I can make out.

>The second option is to use xsl:message to create your log.  Unfortunately
>the messages go to stderr rather than stdout - perhaps there's a way of
>capturing them, but I'm not sure what it is (and it'll depend on what
>processor you're using and on what operating system).

>So, the final thing I can think of would be to have the log become the
>output of your stylesheet, either mixed up in your actual output (and then
>postprocessed to separate it), or not.

If you use Xalan, its "redirect" extension implements the third method
without the drawbacks of the first. My colleague Paul Dick thinks that the
second way is quite feasible if your processor isn't sending anything else
to stderr.
.................David Marston

 XSL-List info and archive:

Current Thread