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

RE: document() revisited

Subject: RE: document() revisited
From: "Daneker, Vincent" <DanekerV@xxxxxxxx>
Date: Wed, 16 Feb 2000 07:19:17 -0800
param in document method xsl
Marc, below is an excerpt of XSLT I used with XT to generate multiple files
using the xt:document. I haven't tested the bit below, but conceptually (I
hope) it works.

<!-- match parent -->
<xsl:template match="mother">
<!-- declare path parameter based on value-of file -->
<xsl:param name="path" select="file"/>
	<!-- call output template and pass %path% as parameter-->
	<xsl:call-template name="output">
	<xsl:with-param name="path"><xsl:value-of
select="$path"/></xsl:with-param>
	</xsl:call-template>
</xsl:template>


<xsl:template name="output">
<xsl:param name="path">files\default.htm</xsl:param>
<xt:document method="html" href="{$path}">
	<xsl:apply-templates/>
</xt:document>
</xsl:template>

> -----Original Message-----
> From:	Beckers, Marc [SMTP:Marc.Beckers@xxxxxxxxxxxxxx]
> Sent:	Wednesday, February 16, 2000 1:33 PM
> To:	'xsl-list@xxxxxxxxxxxxxxxx'
> Subject:	RE: document() revisited
> 
> 
> > I don't know what you mean by copying the result onto itself. 
> 
> I mean overwriting each file with an output file of the same name.
> 
> > Do you want
> > the result to be available for further processing? Then you 
> > need to store it
> > in a variable as a result tree fragment using copy-of and access the
> > variable with an extension function such as XT and Saxon 
> > have. It's not
> > possible in standard XSLT. 
> >
> 
> I'm using XT with the xt:document extension and am stuck on the
> href expression:
> 
> <xsl:template match="html">
>  <!-- find me the path and put in a variable: for each html 
>       instance, it is the text in the corresponding file element 
>       in the "mother" xml document -->
>   <xt:document method="html" href="{$path}">
>  <!-- copy-of result or apply-templates or whatever -->        
>    </xt:document>
> </xsl:template>
> 
> Any ideas on filling the href?
> 
> Thanks,
> Marc
> 
> 
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


 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.