XML Editor
Sign up for a WebBoard account Sign Up Keyword Search Search More Options... Options
Chat Rooms Chat Help Help News News Log in to WebBoard Log in Not Logged in
Show tree view Topic
Topic Page 1 2 3 4 5 6 7 8 9 Go to previous topicPrev TopicGo to next topicNext Topic
Postnext
Nabil DurandSubject: XSL date minus 2 weeks
Author: Nabil Durand
Date: 20 Dec 2006 11:28 AM
Hi,

I want to compare two dates. I would like the second date to have 2 weeks subtracted from it. So in essence date1 < 'date2-14days'
How do I subtract 2 weeks from a date field?



Here is the xpath I used to get me this far.....
-------------------------------
[number(translate(substring-before(@PEP_x0020_Status_x0020__x002d__x,'T'),'-','')) < number(translate(substring-before(@CC,'T'),'-',''))]


Here is the XSL created
-------------------------------
<xsl:if xmlns:xsl="http://www.w3.org/1999/XSL/Transform" test="number(translate(substring-before(@PEP_x0020_Status_x0020__x002d__x,'T'),'-',''))&lt; number(translate(substring-before(@CC,'T'),'-',''))">padding: 100%; background-color: #FFFF00;</xsl:if></xsl:attribute>


what next?

Posttop
Joe RobeSubject: XSL date minus 2 weeks
Author: Joe Robe
Date: 21 Dec 2006 11:05 PM
do you use a parser which supports exstl ? Than its is easy as you have add/difference etc. functions

Joe Robe

 
Topic Page 1 2 3 4 5 6 7 8 9 Go to previous topicPrev TopicGo to next topicNext Topic
Download A Free Trial of Stylus Studio 6 XML Professional Edition Today! Powered by Stylus Studio, the world's leading XML IDE for XML, XSLT, XQuery, XML Schema, DTD, XPath, WSDL, XHTML, SQL/XML, and XML Mapping!  
go

Log In Options

Site Map | Privacy Policy | Terms of Use | Trademarks
Stylus Scoop XML Newsletter:
W3C Member
Stylus Studio® and DataDirect XQuery ™are from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2016 All Rights Reserved.