Sorry that my very first post is a slight rant, but I thought I'd post it anyway if only to save some poor sole wasting hours of their time.. ( I'll try and keep it short.. )
<rant>
Basically I'm generating a CD based on XML, relying on the user's browser XSLT engine to take my XSLT stylesheets to transform the xml to xhtml for display, when I came across this little gem in IE...
In generating the navigation I need to traverse file directories but I found using :
<xsl:value select="document('../index.xml')/document/title" />
is different to ..
<xsl:variable name="mypath" ><xsl:text>../index.xml</xsl:text></variable>
<xsl:value select="document($mypath)/document/title" />
It gives exactly the same result in firefox and the other mozilla based browsers but in IE, the variable version looks for the index.xml in the parent directory of the calling xml document, rather than relative to the folder the xslt file is in... you get a different result depening if you use a variable for the path or hardcode it ... grr ..:(
Three hours I spent tracking that one down, and to make matters worse IE dos'nt fail gracefully when it can't find a file. Unlike Firefox and others which simply return an empty result, IE throws a parser error..
So the only way round this ( that I can think of ) is have the XSLT look for the index file in the wrong place with will work for IE, then catch the empty set that firefox will generate looking in the right place then have it look in the wrong place to make it work....
</endofrant >
Thanks for listening.
------------------------
Has anyone seen the plot ?