473,405 Members | 2,279 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

The use of fn: functions in XSL - XPath

Hello,

In an XSL stylesheet, that I apply using an XSLTProcessor() in PHP5, I would
like to use the function fn:month-from-dateTime( ). I found this function
at: http://www.w3schools.com/xpath/xpath...s.asp#datetime
I get the error message:
xmlXPathCompOpEval: function month-from-dateTime not found

Is the use of these functions not supported in php? Or am I using them
wrong?

I use it as follows:
xml data:
<entry>
<submitDate>
2005-01-10T12:30-04:10
</submitDate>
</entry>

xsl stylesheet:
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:fn="http://www.w3.org/2005/02/xpath-functions">
...
<xsl:template match="entry">
<xsl:value-of select="fn:month-from-dateTime( submitDate )" />
</xsl:template>
...
</xsl:stylesheet>

Thanks in advance,
Rutger Claes
--
Rutger Claes rg*@rgc.tld
Replace tld with top level domain of belgium to contact me pgp:0x3B7D6BD6
Do not reply to the from address. It's read by /dev/null and sa-learn only

Jul 17 '05 #1
0 1739

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: bdinmstig | last post by:
I refined my attempt a little further, and the following code does seem to work, however it has 2 major problems: 1. Very limited support for XPath features Basic paths are supported for...
2
by: Peter Gerstbach | last post by:
Hi, I want to convert with XSLT/XPATH a String like "Aaa bbb ccc" with variant length into to "AaaBbbCcc". I think it should be possible with these steps: 1) tokenize the String with ' ' as...
0
by: Marc A. Criley | last post by:
I'm having to write some test queries for an XPath query processor, and for the most part it's pretty straightforward, but I'm a little uncertain about the use of the name(), local-name(), and...
1
by: Brian Pedersen | last post by:
Hi Can anyone please tell me what the namespace for xpath-functions is? All the namespaces i found on google does not work. The browser tells me something like "namespace does not contain any...
1
by: shaun | last post by:
I need to calculate a duration in seconds between 1 January 1970 and an arbitrary date (e.g today) within an xslt transform which gives the same answer as the time.h functions would in C. I can use...
5
by: laks | last post by:
Hi I have the following xsl stmt. <xsl:for-each select="JOB_POSTINGS/JOB_POSTING \"> <xsl:sort select="JOB_TITLE" order="ascending"/> This works fine when I use it. But when using multiple...
4
by: amessimon | last post by:
Hi, im trying to use the Xpath function "reverse" with an XmlTextReader. Im not sure if i need to add a namespace to reference this function or what, if so whats the address of the namespace. Can...
5
by: Gnic | last post by:
Hi , I have an XmlDocument instance, I want to find a node in the xml, but I don't know it's path until runtime, for example <aaa> <bbb name="x"/> <aaa attr="y"> <ccc>sometext</ccc> </aaa>
2
by: usmhot | last post by:
Sorry to sound beligerent, but this is hacking me off Can someone tell me why I can't access the XPath functions in an XSL document? I'm using XML Spy V4 and I've tried the following reference...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.