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

RE: First attempt at xsl:result-document

Subject: RE: First attempt at xsl:result-document
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Mon, 25 Apr 2005 20:53:32 +0100
RE:  First attempt at xsl:result-document
> Thanks once again for the reply. I've retested my application and do
> not think the URI is the problem. As an example
> 
> .
> .
> .
> <xsl:for-each select="part">
> <xsl:variable name="filename" select="concat('file:///', 
> position(), '.htm'"/>
> <xsl:result-document href={$filename}" format="html">
> <html>
> <body>
> 
> <!-- Test -->
> <xsl:value-of="/act/title"/>
> <!--End of Test -->
> 
> <xsl:apply-templates mode="content"/>
> </body>
> </html>
> </xsl:result-document>
> </xsl:for-each>
> </xsl:template>
> 
> Now let's say I have 4 parts in an xml document. I do get 5 files in
> the end (1 table of contents and 4 parts) and each file is named as
> expected and each file picks up the title. However none of the files
> pick up any content from the <xsl:apply-templates mode="content"/>.
>

Your example XML was:

<act>
> > <part>this is a part we will divide a file on</part>
> > <section>This is a section</section>
> > <clause>This is a clause</clause>
> > <part>This is another part, in the new scheme of things, a second
> > file</part>
> > <section>Yet another section</section>
> > </act>

In this example, the only child of the <part> element is a single text node.
I would expect this text to be output as a result of the
<xsl:apply-templates mode="content"/> call. I would not expect the section
and clause elements to be output, because they are not children of the
<part>.

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

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.