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

Re: appendig to multiple output files

Subject: Re: appendig to multiple output files
From: "Michael Wiedmann" <michael.wiedmann@xxxxxxxxx>
Date: Thu, 24 Jan 2002 13:42:57 +0100
direct file output multiple
Bryan Rasmussen wrote:
 
...
> of course you should probably put a tag around xsl:copy and
> xsl:apply-templates
> 
> like
> <document><xsl:copy-of select="$input"/>
> <xsl:apply-templates/></document>
> 
> of course then what you probably want to do is to get rid of all the excess
> document tags that get output each time you copy, if I understand correctly
> that you want a document that can be appended to.

Let me try to clarify my intention:

- given an XML file for which I don't have direct influence for the 
  markup / DTD used

- out of this XML file I want to generate in a *single* transformation 
  process two separate, completely different output files (method="text")


  <xsl:template match="oneelement">
    <!--  output for the "main" document -->
    ...
    ...

    <!-- output for second document
         this generates the second file     -->
    <xsl:document method="text" href="somefilename">
      <xsl:text>.....</xsl:text>
      <xslvalue-of select="content"/>
      ...
    </xsl:document>

    <xsl:apply-templates select="anotherelement"/>    
  </xsel:template>

  <xsl:template match="anotherelement">
    <!-- more output *appended* to main document -->
    <xsl-value-of select="..."/>
    ...

    <!-- here I want to append output to the second document
         but cannot find a way to append to already created
         file  because it gets overwritten here       -->

    <!-- this does obvioulsy not work!  ->
    <xsl:docmument method="text" href="somefilename">
      <xsl:value-of select="some content"/>
      ...
    </xsl_document>

  </xsl:template>

It looks like there is missing an attribute like "overwrite" (yes|no)
for <xsl:docmument>.

Of course I could run two separate transformation processes - but this 
isn't elegant...

Michael
-- 
office:  michael.wiedmann@xxxxxxxxx
private: mw@xxxxxxxxxxxxxxxxxx                 http://www.miwie.org/
         mw@xxxxxxxxx

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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

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.
Email
First Name
Last Name
Company
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.