Re: [xsl] document() can not used in IE6?

Subject: Re: [xsl] document() can not used in IE6?
From: Abel Braaksma <abel.online@xxxxxxxxx>
Date: Mon, 02 Jul 2007 12:19:17 +0200
shi wudao wrote:
> HI, guru
> I tried to use document() to process some XMLs with their absolute
> path, but it can not work in IE6 that complained it can not find the
> file. But FF works fine.

You must have a path error. I.e., if you do not use http:// in front of
the path, it is not an absolute path.

In addition, see my posts on the Sarissa list that explain why it is not
(easily) possible to use relative paths in IE with MSXML techniques
(like XSLT) when the containing file is called from a javascript that is
in turn called from an html page that has a different path than you XSLT
file (which is likely to be the case often). IE uses paths relative to
your HTML page, not the XSLT page. The same is true for CSS using filter
progIDs and paths.

>
> I heard that document() is a function of XSLT2.0, but IE6 is not
> supported it? Is so, any solution? thank you.

Don't know where you heard that, but it is wrong. The doc() function is
an XPath 2.0 function (and similar to document()), but the document()
function is an XSLT 1.0 function (but was expanded a bit in XSLT 2.0).

You can use the document() function with any browser *except* Opera.

Cheers,
-- Abel

Current Thread