xsl-list
[Top] [All Lists]

Re: First attempt at xsl:result-document

2005-04-25 11:22:53
Well, you could try setting the base URI. According to the spec, that's 
implementation-specific, so you'll have to consult your XSLT processor's 
documentation.

Jay Bryant
Bryant Communication Services
(presently consulting at Synergistic Solution Technologies)




Spencer Tickner <spencertickner(_at_)gmail(_dot_)com> 
04/25/2005 12:31 PM
Please respond to
xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com


To
xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
cc

Subject
Re: [xsl] First attempt at xsl:result-document






Hi Jay,

Thanks for the response. I did try stripping out the file:/// and I
get a java.lang.RuntimeException: "Resolved URL is malformed". This
may be because I tried to really strip down my code to make my problem
more visible on the list. in truth the variable is something more like
<xsl:variable name="filname"
select=concat('file:///W:/test/testing/b/, $myindex, '_', position(),
'.htm')"/>



On 4/25/05, JBryant(_at_)s-s-t(_dot_)com <JBryant(_at_)s-s-t(_dot_)com> wrote:
Hi, Spencer,

When I tried your XML and XSL files (after filling in the necessary
pieces), I found that I got no output unless I removed the "file:///" 
part
of the href value.

Jay Bryant
Bryant Communication Services
(presently consulting at Synergistic Solution Technologies)

Spencer Tickner <spencertickner(_at_)gmail(_dot_)com>
04/25/2005 11:59 AM
Please respond to
xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com

To
xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
cc

Subject
[xsl] First attempt at xsl:result-document


Hi everyone, and thanks in advance for the help.

I have a magical and wonderful xsl that was doing everything I needed
it too. Unfortunately as this buisness goes, requirements changed.
Some of the html documents I was producing were getting too large for
our website. The decision was made to split the larger ones up by
part. So after some research I found xsl:result-document. Here is some
sample xml, my single file xsl transformer and my attempt at
multi-file transformation.

xml

<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>

original xsl (works fine)

<xsl:template match="act">

<html>
<body>
<xsl:apply-templates mode="tableofcontents"/>
<xsl:apply-templates mode="content"/>
</body>
</html>

</xsl:template>
<!-- Down here of course I have the templates that apply the styles
for either mode -->

new xsl (well, not so fine)

<xsl:template match="act">

<xsl:result-document href="file:///toc.html" format="html">
<html>
<body>
<xsl:apply-templates mode="tableofcontents"/>
</body>
</html>
</xsl:result-document>

<xsl:for-each select="part">
<xsl:variable name="filename" select="concat('file:///', position(),
'.htm'"/>
<xsl:result-document href={$filename}" format="html">
<html>
<body>
<xsl:apply-templates mode="content"/>
</body>
</html>
</xsl:result-document>
</xsl:for-each>
</xsl:template>

<!-- Exact same  templates that apply the styles for either mode as
original xsl -->

In the new xsl, I get the tableof contents no problem. in terms of
content I get a number of files (same as the number of parts) with no
content in them. I realize that the for-each statement probably
doesn't do what I'm hoping it will do, but I can't quite wrap my mind
around any other ways of doing this. I would really appreciate any
suggestions or advice.

Thank you all very much,

Spencer

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: 
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: 
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--




--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



<Prev in Thread] Current Thread [Next in Thread>