SAXON 6.5.5 supports the EXSLT extensions, but the date:add-duration() from dates and times module — which would solve your problem elegantly — is not implemented.
However, you can directly use Java objects from within XSLT with Saxon:
You can also use a short-cut technique of binding external Java classes, by making the class name part of the namespace URI.
With the short-cut technique, the URI for the namespace identifies the class where the external function will be found. The namespace URI must either be "java:" followed by the fully-qualified class name (for example xmlns:date="java:java.util.Date") ...
Quoting from this post, the method for adding days to dates in Java is
String dt = "2008-01-01"; // Start date
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
Calendar c = Calendar.getInstance();
c.setTime(sdf.parse(dt));
c.add(Calendar.DATE, 1); // number of days to add
dt = sdf.format(c.getTime()); // dt is now the new date
the XSLT version could look something like this (untested):
<xsl:stylesheet
version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:simple-date-format:="java:java.text.SimpleDateFormat"
xmlns:calendar="java:java.util.Calendar"
>
<xsl:template name="date-add-days">
<xsl:param name="input" />
<xsl:param name="days" />
<xsl:if test="
function-available('simple-date-format:new')
and function-available('calendar:get-instance')
">
<xsl:variable name="sdf" select="simple-date-format:new('yyyy-MM-dd')" />
<xsl:variable name="cal" select="calendar:get-instance()" />
<xsl:variable name="time" select="simple-date-format:parse($sdf, $input)" />
<xsl:variable name="tmp1" select="calendar:set-time($cal, $time)" />
<xsl:variable name="tmp2" select="calendar:add($cal, calendar:DATE(), number($days))" />
<xsl:variable name="res" select="calendar:get-time($cal)" />
<xsl:value-of select="simple-date-format:format($sdf, $res)" />
</xsl:if>
</xsl:template>
</xsl:stylesheet>
With regard to interacting with Java classes and objects from XPath:
I'm not sure of the method name format. The Saxon 6.5.5 documentation seems to imply dashed format (toString() becomes to-string()), so I've been using this here. Maybe calendar:set-time() must actually called calendar:setTime(), try it out & fix my answer.