Jump to content

Whats wrong with this?!


misbiz

Recommended Posts

Hi, Im trying to get a difference between todays date and date in my xml file -xs:date works fine its the xs:gMonthDay im really struggling with. Error message is below

<xsl:template name="timechanges" match="timechanges	 "><xsl:param name="today" select="current-date()"/><xsl:variable name="today" select="$today cast as xs:gMonthDay"/>  <xsl:variable name="dt1" select=" (dt1)"/>   <xsl:if test="$today < xs:gMonthDay($dt1) "> TRUE<xsl:value-of select="$today - xs:gMonthDay($dt1)"/></xsl:if>  </xsl:template></xsl:stylesheet>

ERROR: XPTY0004: Arithmetic operator is not defined for arguments of types (xs:gMonthDay, xs:gMonthDay) in built-in template rule in built-in template rulenet.sf.saxon.trans.XPathException: Arithmetic operator is not defined for arguments of types (xs:gMonthDay, xs:gMonthDay) Help will be much appreciated. thanks

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
×
×
  • Create New...