www.webdeveloper.com
Results 1 to 4 of 4

Thread: XML Xpath question

  1. #1
    Join Date
    Jun 2003
    Posts
    2

    Question XML Xpath question

    Can anyone tell me how it would be possible to compare dates using variables with attribute values in a XML node. This is what I have, but it doesn't work.


    strXpath = "//time_block[@end_dttm >'" & dtEstStartDtTm & "' and @start_dttm <'" & dtEstEndDtTm & "']"

    Thanks,
    Rod Yager
    Rod Yager

  2. #2
    Join Date
    Dec 2002
    Location
    Calgary, Canada
    Posts
    6,123
    If I remember correctly,XSL does not have any thing like date object,therefore you will need to write a template that will compare values as strings...
    Cheers

    Khalid

    Message Posting Guidelines In These Forums, Please read these before posting any question.
    Web site: webapplikations.com
    Web Resources Page:Web Resources

  3. #3
    Join Date
    Nov 2002
    Location
    Baltimore, Maryland
    Posts
    12,270
    If you use the W3CDTF (http://www.w3.org/TR/NOTE-datetime) then it's quite simple to work with dates as simple strings. Otherwise, you can always use EXSLT Dates and Times module (http://www.exslt.org/).
    “The power of the Web is in its universality. Access by everyone regardless of disability is an essential aspect.”
    —Tim Berners-Lee, W3C Director and inventor of the World Wide Web

  4. #4
    Join Date
    Jun 2003
    Posts
    2
    Thanks all. It sounds comparing with simple date strings is the way to go here. It would really be nice though if there was a simple date function.
    Rod Yager

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles