I'm trying to build a component-based site with AxKit.
I have a file a.xml, with associated stylesheet, which displays fine
as HTML, and anther file b.xml which does the same.
Now I want a file t.xml, which when passed through its stylesheet
outputs something like:
<html><head><title>...</title></head>
<body>
<div id="a">
a.xml's contents (transformed)
</div>
<div id="b">
b.xml's contents (transformed)
</div>
<div id="t">
t.xml's contents
</div>
</body>
</html>
My stylesheet, t.xsl, contains:
<xsl:variable name="a" select="document('axkit:a.xml',/)"/>
<xsl:variable name="b" select="document('axkit:b.xml',/)"/>
to get the other two files' transformed contents, then:
<xsl:template match="/">
<html><head><title>...</title></head>
<body>
<div id="a">
<xsl:copy-of select="$a//body/node()"/>
</div>
<div id="b">
<xsl:copy-of select="$b//body/node()"/>
</div>
<div id="t">
<xsl:copy-of select="//body/node()"/>
</div>
</body>
</html>
</xsl:template>
(I'm working with AxKit from CVS)
This doesn't work: in the logs I can see get_axkit_uri (called by the
callbacks from LibXSLT) return the strings containing a.xml and b.xml
transformed, but then I see:
[Mon Jan 13 20:09:44 2003] [warn] [client 127.0.0.1] [AxKit] Caught an exceptio
[Mon Jan 13 20:09:44 2003] [error] [client 127.0.0.1] [AxKit] [Error] Can't coerce
UNKNOWN to string in entersub at
/usr/lib/perl5/site_perl/5.8.0/i686-linux-thread-multi-ld/Apache/AxKit/Language/LibXSLT.pm
line 120.
Line 120 is
my $results = $stylesheet->transform($xml_doc, @params);
What is it trying to convert to string? (@params should be empty,
since I don't pass any parameter to the URI)
I'd say it tries to convert '$stylesheet' to a string (for package
lookup), but this implies that the parsing of the stylesheet didn't
work...
Any idea?
--
Dakkar - <Mobilis in mobile>
GPG public key fingerprint = A071 E618 DD2C 5901 9574
6FE2 40EA 9883 7519 3F88
key id = 0x75193F88
There's a lesson that I need to remember
When everything is falling apart
In life, just like in loving
There's such a thing as trying to hard
You've gotta sing
Like you don't need the money
Love like you'll never get hurt
You've gotta dance
Like nobody's watching
It's gotta come from the heart
If you want it to work.
-- Kathy Mattea
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]