[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: no output files

Subject: RE: no output files
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Wed, 19 Nov 2008 14:46:01 -0000
RE:  no output files
> Another way to do the same, without worrying about 
> implementation specifics is to enclose the transformation 
> into an <xsl:variable/> (which means that nothing is to be 
> done with this variable).
> As this variable will capture the results of the 
> transformation, no output will be produced.

Not so. The transformation

<xsl:template match="/">
  <xsl:variable name="x" select="2"/>

produces as its output a result tree consisting of a document node with no
children. If the transformation output is serialized and directed to a file
out.xml, the effect should be that after the transformation, out.xml exists
and contains only an XML declaration (regardless of whether or not the file
existed previously).

You can of course, as others have suggested, send the output to somewhere
where it does no harm. I was trying to answer the question more literally -
how do you arrange to produce no output in the first place.

Michael Kay

Current Thread


Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
First Name
Last Name
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.