FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


Does libxslt in php support XSLT 2.0 and XPath 2.0?





boinsterman
Does libxslt in php support XSLT 2.0 and XPath 2.0?

I get this error from http://worldthinker.frihost.org/codeexamples/datetest.xml:

Quote:
Error: XPath expression compilation failed: distinct-values(dateslist/item/submitted)
Details: compilation error (characters 1-44, "distinct-values(dateslist/item/submitted)"): unknown function called: '{ http://www.w3.org/2005/xpath-functions, distinct-values }'


When transformed via php, I just get the php source code.

The following code works properly in my XSLT editor:

Code:
<?xml version="1.0" encoding="UTF-8" ?>

<!-- New document created with EditiX at Wed Feb 15 20:33:00 EST 2012 -->

<xsl:stylesheet version="2.0"
   xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
   xmlns:xs="http://www.w3.org/2001/XMLSchema"
   xmlns:fn="http://www.w3.org/2005/xpath-functions"
   xmlns:xdt="http://www.w3.org/2005/xpath-datatypes"
   xmlns:err="http://www.w3.org/2005/xqt-errors"
   exclude-result-prefixes="xs xdt err fn">

   <xsl:output method="html" indent="yes"/>
   
   <xsl:template match="/">
<html>
<head>
<title>date listing test</title>
</head>
<body>
<ul>
 <xsl:for-each select="distinct-values(dateslist/item/submitted)">
<li><xsl:value-of select="." /></li>
 </xsl:for-each>
 </ul>
</body>
</html>      
   </xsl:template>

</xsl:stylesheet>


For a blog navigation menu, I want to display unique list-items for each year for which there are posts. (and for each month within that year--I expect to also need fn:year-from-date and fn:month-from-date, and I need to figure out how to loop within atomic values, but those are other problems.)
Related topics
Help Needed Regarding CGI And Php
does the firhost.net php server have PEAR?
Does the php support utf8?
have your servers got php support?
HELP with installing 300 GB HDD
gd support for freetype
Can You Get HTML in Your PHP Mail Script?
Scripting Language
Admin : Does the PHP installed has CURL ?
rss 2.0 feeds
Does FtiHost Support Cron Jobs?
Frihost php version
Forum hosting?
PHP 5.4.0 Release Announcement
Reply to topic    Frihost Forum Index -> Scripting -> Others

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.