Skip to Content
0
Former Member
Jul 27, 2010 at 08:56 PM

Standard XSLT 2.0 date functions not working in PI 7.11

133 Views

What do I need to include to use the standard XSLT 2.0 functions - such as format-date, Current-date() ?

The code below works correctly in XMLSpy... but when I import the XSL as an Imported Archive in PI - it fails with...

Method fatalError called, terminate transformation, because of

javax.xml.transform.TransformerException: com.sap.engine.lib.xsl.xpath.XPathException: Function with name 'current-date' not found in context library. at com.sap.engine.lib.jaxp.TransformerImpl.transform(TransformerImpl.java:250)

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

http://www.w3.org/1999/XSL/Transform" >

<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>

.

.

.

<xsl:attribute name="today">

<xsl:value-of select="format-date(current-date(),'[Y0001][M01][D01]')"/>

</xsl:attribute>