Altova Mailing List Archives


RE: [xsl] appending to result-document

From: "Michael Kay" <mike@------------>
To:
Date: 8/3/2005 7:59:00 AM
Yes, for producing a log like this I would recommend xsl:message. The Saxon
implementation of xsl:message allows you some control over the formatting
and destination of the messages (but only from Java, not from the command
line).

The other way to do it is to write a single result tree that contains real
output interleaved with log output, and then postprocess it (pipelining
again!) with a transformation that makes two passes over the input,
outputting first the "real output" and then the "log".

Michael Kay
http://www.saxonica.com/ 

> -----Original Message-----
> From: Sam D. Chuparkoff [mailto:sdc@xxxxxxxxxx] 
> Sent: 03 August 2005 03:14
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject: Re: [xsl] appending to result-document
> 
> On Tue, 2005-08-02 at 14:48 +0100, Rahil wrote:
> > Hi
> > 
> > I have an xsl file which has two output formats. The first 
> one is .html 
> > and the other is a named xml output.
> 
> > The output I want is two files: (i) mainResult.html , (ii) Log.xml
> > -------------
> > <Results xmlns:saxon="http://saxon.sf.net/">
> >     <Term>Log1</Term>
> >    <Term>Log2</Term>
> > </Results>
> > -----------------
> > 
> > How do I append xml tags in the log.xml file in the midst 
> of general 
> > .html output ?
> > 
> > Appreciate all help.
> 
> Michael's response is of course spot on. I can understand your
> motivation, however, as log.xml really is just that: a log. In similar
> situations I've used xsl:message.
> 
> Anybody else willing to confess to having done this, or at 
> least having
> the temptation?
> 
> sdc
> 
> > Thanks
> > Rahil

Disclaimer

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.