[xslt] Spurious error calling document()
- From: Vaclav Barta <vbar comp cz>
- To: xslt gnome org
- Subject: [xslt] Spurious error calling document()
- Date: Wed, 24 Sep 2003 07:56:40 +0200
Hi,
the attached stylesheet declares (and uses) a variable:
<xsl:variable name="dynamic"
select="document('http://localhost/cgi-bin/small.cgi')"/>
On my computer, http://localhost/cgi-bin/small.cgi is a valid URL generated by
the small.cgi script (also attached). But, when I try to use the stylesheet
(with ``xsltproc small.xsl small1.xml''), xsltproc complaints:
xmlNanoHTTPConnectAttempt: Error connecting to remote host - Connection
refused
- and then it prints the correct result (including data from localhost). :-O
It might seem a small thing, but I suspect the error indication is confusing
LibXSLT (the Perl binding for libxslt), which fails outright. What is causing
the error message, and how do I get rid of it?
Bye
Vasek
P.S.: libxslt 1.0.31, libxml 2.5.8 on Linux
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<xsl:output method="html"/>
<xsl:template match="/">
<html>
<body>
<xsl:copy-of select="content/node()"/>
<hr/>
<xsl:variable name="dynamic" select="document('http://localhost/cgi-bin/small.cgi')"/>
<xsl:copy-of select="$dynamic/content/node()"/>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
<?xml version="1.0"?>
<?xml-stylesheet href="small.xsl" type="text/xsl"?>
<content>
1. static page
</content>
small.cgi
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]