[prev in list] [next in list] [prev in thread] [next in thread] 

List:       xindice-users
Subject:    querying by dates
From:       "Boris Rousseau" <brousseau () tssg ! org>
Date:       2003-11-28 12:22:35
[Download RAW message or body]

Hi all,

I was trying to query some XML documents by date (in the example below, by creation \
time of type datetime) While this works fine:
xindice xpath -c /db/test -q "//A/B[creationtime='2003-11-27T09:19:43Z']"

The following query requesting the documents for the month of November doesn't:
xindice xpath -c /db/test -q "//A/B[starts-with(creationtime,'2003-11-')]" or
xindice xpath -c /db/test -q "//A/B[contains(creationtime,'2003-11-')]"

I know that XPath 1.0 has some limitation with date types.
However, I cannot see why the second query does not work.

Any help or ideas on how to work around the problem would be greatly appreciated.

Regards,
Boris


[Attachment #3 (text/html)]

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2800.1264" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV>Hi all,</DIV>
<DIV>&nbsp;</DIV>
<DIV>I was trying to query some XML documents by date (in the example below, by 
creation time of type datetime)</DIV>
<DIV>While this works fine:</DIV>
<DIV><EM>xindice xpath -c /db/test&nbsp;-q 
"//A/B[creationtime='2003-11-27T09:19:43Z']"</EM></DIV>
<DIV>&nbsp;</DIV>
<DIV>The following query requesting the documents for the month of November 
doesn't:</DIV>
<DIV><EM>xindice xpath -c /db/test -q 
"//A/B[starts-with(creationtime,'2003-11-')]" or</EM></DIV>
<DIV>
<DIV><EM>xindice xpath -c /db/test -q 
"//A/B[contains(creationtime,'2003-11-')]"</EM></DIV>
<DIV>&nbsp;</DIV>
<DIV>I know that XPath 1.0 has some limitation with date types.</DIV>
<DIV>However, I cannot see why the second query does not work.</DIV>
<DIV>&nbsp;</DIV>
<DIV>Any help or ideas on how to work around the problem&nbsp;would 
be&nbsp;greatly appreciated.</DIV>
<DIV>&nbsp;</DIV>
<DIV>Regards,</DIV>
<DIV>Boris</DIV>
<DIV>&nbsp;</DIV></DIV></BODY></HTML>


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic