Jump to content

failed to evaluate xpath expression


hibou57
 Share

Recommended Posts

Hi all,I'm a newbie with xml/xslt, so forgive me if my question is foolish.I have wrote this code as an xslt file :

<?xml version="1.0" encoding="ISO-8859-1" ?><xsl:transform version = "1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">	<xsl:template match="/test">  <html> 	 <xsl:value-of select="current-dateTime()"/><br/>  </html>	</xsl:template></xsl:transform>

I have wrote with it, an xml document with link to the xslt style-sheet.I open the source with a web-browser (firefox), but it fail to evaluate this expression. It tells something like « Error while loading a style-sheet file : invalid XSLT/XPath function ».So, as it work fine for some other (a very few number of) functions (position, last, ...), I still insite and try again inserting « fn: », so using <xsl:value-of select="fn:current-dateTime()"/>But the result is very similare to the preceding. I.e. it tells something like « Error while loading a style-sheet file : (null) »What about it ? What is the reason of this failure to evaluate some expressions ?I have check the cours at w3school, but it doesn't help me for this stuff. No more answers elsewhere.Thanks for all

Link to comment
Share on other sites

I have found that Firefox doesn't really like XSL stylesheets! Whenever I try to view an XML document with an associated XSL stylesheet in Firefox it *always* comes up with that error. This maybe something I am doing wrong, or I need to download a patch or something (in which case I would very much appreciate some input!).In answer to your question, just try it in Internet Explorer, I think it will probably work!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...