From michael.blakeley at marklogic.com Thu Oct 1 12:50:41 2009
From: michael.blakeley at marklogic.com (Michael Blakeley)
Date: Thu Oct 1 11:41:03 2009
Subject: [xquery-talk] Unexpected token syntax error,
unexpected DeclareFunction_
In-Reply-To:
References:
Message-ID: <4AC4FA01.3030005@marklogic.com>
Anil,
Since this is a question specific to MarkLogic Server, I recommend
joining the mailing list at
http://developer.marklogic.com/discuss/subscribe.xqy?list=general
You can also search the list: for example, try
http://marklogic.markmail.org/search/?q=XDMP-UNEXPECTED+1.0-ml (the
second hit is relevant: http://markmail.org/thread/2nuwbppxeemsrpjs).
The problem you're running into is that the shakespeare demo code is
somewhat old, and was written in a custom dialect that is not quite
XQuery 1.0. To use this older demo code, set the "default xquery
version" for your app server (the one configured to listen on port 8010)
to "0.9-ml".
-- Mike
On 2009-09-30 18:13, Anil Shekhar wrote:
> Dear Experts,
>
> I am new to XQuery and I need your help. I am getting the following error when accessed ...
>
> http://127.0.0.1:8010/shakespeare.xqy
> 500 Internal Server Error
>
> XDMP-UNEXPECTED: (err:XPST0003) Unexpected token syntax error, unexpected DeclareFunction_
>
> in /shakespeare.xqy, on line 8 [1.0-ml]
>
> Line 8 is where I have defined the function.
>
> Thanks
> Anil
>
>
>
>
>
> Shakespeare ...
>
>
>
> {
> declare function local:handle-doc(
> $doc as document-node(),
> $speeches as element(SPEECH)+
> )
> {
>
{ document-uri($doc) }
,
> for $speech in $speeches
> let $speaker := $speech/SPEAKER
> let $lines := $speech/LINE
> return (
>
{ $speaker/text() }
,
>
{ $lines/text() }
> )
> };
>
> for $d in doc("file:///C:/Users/ashekhar/Desktop/Mark Logic/Shakespeare/*.xml")
> order by $d ascending
> return local:handle-doc($d, $d//SPEECH)
> }
>
>
> )
>
>
>
>
>
>
>
> ________________________________
> Insert movie times and more without leaving Hotmail?. See how.
>
From m.soutopico at gmail.com Thu Oct 1 21:53:29 2009
From: m.soutopico at gmail.com (Manuel Souto Pico)
Date: Thu Oct 1 11:44:08 2009
Subject: [xquery-talk] using a variable within a regexp pattern in XQuery
Message-ID: <8bb717a90910011153j4e4821f9t29f927fa39d7df35@mail.gmail.com>
Hi,
I'm a bit stuck trying to run a regexp pattern in a XQuery search file.
(1) where $record/langSet[@xml:lang="en"]/tig/term[matches(., $q)]
works
(2) where $record/langSet[@xml:lang="en"]/tig/term[matches(.,
"$q")] doesn't work
(3) where $record/langSet[@xml:lang="en"]/tig/term[matches(.,
"^$q.*$")] doesn't work
(4) where $record/langSet[@xml:lang="en"]/tig/term[matches(.,
"^bu.+$")] works!
Any ideas about how I can get to use regular expressions in this query?
(4) retrieves 'bufer', 'bug' and 'bus'. If $q is 'bu', (1) retrieves as well
'attri*bu*te', 'contrast *bu*tton', etc.
Thanks a lot!
Cheers, Manuel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://x-query.com/pipermail/talk/attachments/20091001/f1af370d/attachment.htm
From dlee at calldei.com Thu Oct 1 16:40:28 2009
From: dlee at calldei.com (David A. Lee)
Date: Thu Oct 1 12:30:11 2009
Subject: [xquery-talk] using a variable within a regexp pattern in XQuery
In-Reply-To: <8bb717a90910011153j4e4821f9t29f927fa39d7df35@mail.gmail.com>
References: <8bb717a90910011153j4e4821f9t29f927fa39d7df35@mail.gmail.com>
Message-ID: <4AC505AC.5040701@calldei.com>
you haven't said what you want to occur.
But I am guessing maybe this is what you are looking for
* where $record/langSet[@xml:lang="en"]/tig/term[matches(.,
fn:concat("^",$q,".*$"))] *
David A. Lee
dlee@calldei.com
http://www.calldei.com
http://www.xmlsh.org
812-482-5224
Manuel Souto Pico wrote:
> Hi,
>
> I'm a bit stuck trying to run a regexp pattern in a XQuery search file.
>
> (1) where $record/langSet[@xml:lang="en"]/tig/term[matches(.,
> $q)] works
> (2) where $record/langSet[@xml:lang="en"]/tig/term[matches(.,
> "$q")] doesn't work
> (3) where $record/langSet[@xml:lang="en"]/tig/term[matches(.,
> "^$q.*$")] doesn't work
> (4) where $record/langSet[@xml:lang="en"]/tig/term[matches(.,
> "^bu.+$")] works!
>
> Any ideas about how I can get to use regular expressions in this query?
>
> (4) retrieves 'bufer', 'bug' and 'bus'. If $q is 'bu', (1) retrieves
> as well 'attri*bu*te', 'contrast *bu*tton', etc.
>
> Thanks a lot!
>
> Cheers, Manuel
> ------------------------------------------------------------------------
>
> _______________________________________________
> talk@x-query.com
> http://x-query.com/mailman/listinfo/talk
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://x-query.com/pipermail/talk/attachments/20091001/861229e5/attachment.htm
From hrennau at yahoo.de Thu Oct 1 22:13:38 2009
From: hrennau at yahoo.de (Hans-Juergen Rennau)
Date: Thu Oct 1 14:01:31 2009
Subject: RE [xquery-talk] using a variable within a regexp pattern
In-Reply-To: <200910011900.n91J04eo026039@jhunter.x-query.com>
References: <200910011900.n91J04eo026039@jhunter.x-query.com>
Message-ID: <547017.71825.qm@web27103.mail.ukl.yahoo.com>
Hi Manual,
if I understand you correctly, you wonder how you can compose a match pattern from variable and fixed parts, e.g. framing a variable term by an initial ^ and a trailing $, right?
The solution is simple: use an _expression_ whose string value is the desired sequence of characters. Often this will be achieved using the concat function, whose arguments in turn may be literals, variable references, function calls, path expressions.... Examples:
matches(., concat('^', $q, '$'))
matches(., concat($prefix, $q, $postfix))
matches(., concat('^', 'ID', position()))
matches(., concat('^', $n/@criterion, '.*s'))
So the task becomes very simple if you remember that the way an expression is resolved to a value is independent on the context where the value is used. Therefore, you need not any special knowledge about the matches function - all you need is the general understanding how to build an expression that resolves to the intended string.
With kind regards,
Hans-Juergen
------------------------------
Message: 4
Date: Thu, 1 Oct 2009 20:53:29 +0200
From: Manuel Souto Pico
Subject: [xquery-talk] using a variable within a regexp pattern in
XQuery
To: talk@x-query.com
Message-ID:
<8bb717a90910011153j4e4821f9t29f927fa39d7df35@mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"
Hi,
I'm a bit stuck trying to run a regexp pattern in a XQuery search file.
(1) where $record/langSet[@xml:lang="en"]/tig/term[matches(., $q)]
works
(2) where $record/langSet[@xml:lang="en"]/tig/term[matches(.,
"$q")] doesn't work
(3) where $record/langSet[@xml:lang="en"]/tig/term[matches(.,
"^$q.*$")] doesn't work
(4) where $record/langSet[@xml:lang="en"]/tig/term[matches(.,
"^bu.+$")] works!
Any ideas about how I can get to use regular expressions in this query?
(4) retrieves 'bufer', 'bug' and 'bus'. If $q is 'bu', (1) retrieves as well
'attri*bu*te', 'contrast *bu*tton', etc.
Thanks a lot!
Cheers, Manuel
From m.soutopico at gmail.com Fri Oct 2 00:39:34 2009
From: m.soutopico at gmail.com (Manuel Souto Pico)
Date: Thu Oct 1 14:27:25 2009
Subject: RE [xquery-talk] using a variable within a regexp pattern
In-Reply-To: <547017.71825.qm@web27103.mail.ukl.yahoo.com>
References: <200910011900.n91J04eo026039@jhunter.x-query.com>
<547017.71825.qm@web27103.mail.ukl.yahoo.com>
Message-ID: <8bb717a90910011439j1693c736nd95f9b7dbfd98070@mail.gmail.com>
Dear David and Hans-Juergen,
Thanks a lot for your replies and, notably, for Jans-Juergen's explanation.
Very useful indeed!
This is a bit more complex than perl's regular expressions but still quite
straightforward at the end of the day. The solution had crossed my mind very
fast, but then I got distracted and I forgot. But indeed this is what I
needed:
where $record/langSet[@xml:lang="en"]/tig/term[matches(.,
concat('^', $q, '.*$'))]
Thanks a lot! And keep well :))
Chees, Manuel
2009/10/1 Hans-Juergen Rennau
> Hi Manual,
>
> if I understand you correctly, you wonder how you can compose a match
> pattern from variable and fixed parts, e.g. framing a variable term by an
> initial ^ and a trailing $, right?
>
> The solution is simple: use an _expression_ whose string value is the
> desired sequence of characters. Often this will be achieved using the concat
> function, whose arguments in turn may be literals, variable references,
> function calls, path expressions.... Examples:
>
> matches(., concat('^', $q, '$'))
> matches(., concat($prefix, $q, $postfix))
> matches(., concat('^', 'ID', position()))
> matches(., concat('^', $n/@criterion, '.*s'))
>
> So the task becomes very simple if you remember that the way an expression
> is resolved to a value is independent on the context where the value is
> used. Therefore, you need not any special knowledge about the matches
> function - all you need is the general understanding how to build an
> expression that resolves to the intended string.
>
> With kind regards,
> Hans-Juergen
>
> ------------------------------
>
> Message: 4
> Date: Thu, 1 Oct 2009 20:53:29 +0200
> From: Manuel Souto Pico
> Subject: [xquery-talk] using a variable within a regexp pattern in
> XQuery
> To: talk@x-query.com
> Message-ID:
> <8bb717a90910011153j4e4821f9t29f927fa39d7df35@mail.gmail.com>
> Content-Type: text/plain; charset="iso-8859-1"
>
> Hi,
>
> I'm a bit stuck trying to run a regexp pattern in a XQuery search file.
>
> (1) where $record/langSet[@xml:lang="en"]/tig/term[matches(., $q)]
> works
> (2) where $record/langSet[@xml:lang="en"]/tig/term[matches(.,
> "$q")] doesn't work
> (3) where $record/langSet[@xml:lang="en"]/tig/term[matches(.,
> "^$q.*$")] doesn't work
> (4) where $record/langSet[@xml:lang="en"]/tig/term[matches(.,
> "^bu.+$")] works!
>
> Any ideas about how I can get to use regular expressions in this query?
>
> (4) retrieves 'bufer', 'bug' and 'bus'. If $q is 'bu', (1) retrieves as
> well
> 'attri*bu*te', 'contrast *bu*tton', etc.
>
> Thanks a lot!
>
> Cheers, Manuel
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://x-query.com/pipermail/talk/attachments/20091001/728a81e2/attachment.htm
From anilshekhar at hotmail.com Thu Oct 1 16:18:09 2009
From: anilshekhar at hotmail.com (Anil Shekhar)
Date: Thu Oct 1 15:06:20 2009
Subject: FW: [xquery-talk] Unexpected token syntax error, unexpected
DeclareFunction_
In-Reply-To: <7.0.1.0.2.20090930214934.02593dc8@wheresmymailserver.com>
References:
Message-ID:
Thanks Ken. It worked. I did learn something new today.
I am able to successfully read from a database. However if I add the argument to doc() to read files from the file system I do not see anything being displayed - blank page.
for $d in doc("file:///C:/Users/ashekhar/Desktop/Mark Logic/Shakespeare/*.xml")
Can you please help me understand?
Thanks
Anil
> Date: Wed, 30 Sep 2009 21:53:30 -0400
> To: talk@xquery.com
> From: gkholman@cranesoftwrights.com
> Subject: Re: [xquery-talk] Unexpected token syntax error, unexpected DeclareFunction_
> CC:
>
> At 2009-09-30 18:13 -0700, Anil Shekhar wrote:
> >XDMP-UNEXPECTED: (err:XPST0003) Unexpected token syntax error,
> >unexpected DeclareFunction_
>
> The message says that your declaration of a function is unexpected.
>
> >in /shakespeare.xqy, on line 8 [1.0-ml]Line 8 is where I have
> >defined the function.
>
> Sure enough, that isn't an expected place for a function definition.
>
> Reviewing: http://www.w3.org/TR/xquery/#id-function-calls
>
> >3.1.5 Function Calls
> >[Definition: The built-in functions supported by XQuery are defined
> >in [XQuery 1.0 and XPath 2.0 Functions and Operators].] Additional
> >functions may be declared in a Prolog, imported from a library
> >module, or provided by the external environment as part of the static context.
>
> And that is pretty explicit that functions can only be declared in the prolog.
>
> You have:
>
> >
> >
> > Shakespeare ...
> >
> >
> >
> > {
> > declare function local:handle-doc(
> > $doc as document-node(),
> > $speeches as element(SPEECH)+
> > )
>
> .... which doesn't have the declaration in the prolog, but in the
> middle of the query.
>
> So I think the error message is quite justified.
>
> I hope this helps.
>
> . . . . . . . . . . Ken
>
> --
> Upcoming hands-on code list, UBL, XSLT, XQuery and XSL-FO classes.
> Interested in other classes? http://www.CraneSoftwrights.com/q/i/
> Crane Softwrights Ltd. http://www.CraneSoftwrights.com/q/
> Training tools: Comprehensive interactive XSLT/XPath 1.0/2.0 video
> Video lesson: http://www.youtube.com/watch?v=PrNjJCh7Ppg&fmt=18
> Video overview: http://www.youtube.com/watch?v=VTiodiij6gE&fmt=18
> G. Ken Holman mailto:gkholman@CraneSoftwrights.com
> Male Cancer Awareness Nov'07 http://www.CraneSoftwrights.com/q/bc
> Legal business disclaimers: http://www.CraneSoftwrights.com/legal
>
> _______________________________________________
> talk@x-query.com
> http://x-query.com/mailman/listinfo/talk
_________________________________________________________________
Insert movie times and more without leaving Hotmail?.
http://windowslive.com/Tutorial/Hotmail/QuickAdd?ocid=TXT_TAGLM_WL_HM_Tutorial_QuickAdd_062009
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://x-query.com/pipermail/talk/attachments/20091001/eb054f0b/attachment.htm
From gkholman at CraneSoftwrights.com Thu Oct 1 19:29:31 2009
From: gkholman at CraneSoftwrights.com (G. Ken Holman)
Date: Thu Oct 1 15:16:44 2009
Subject: FW: [xquery-talk] Unexpected token syntax error,
unexpected DeclareFunction_
In-Reply-To:
References:
Message-ID: <7.0.1.0.2.20091001182639.025cc308@wheresmymailserver.com>
At 2009-10-01 15:18 -0700, Anil Shekhar wrote:
>Thanks Ken. It worked. I did learn something new today.
>
>I am able to successfully read from a database. However if I add the argum=
>ent to doc() to read files from the file system I do not see anything being=
> displayed - blank page.
>
>for $d in doc("file:///C:/Users/ashekhar/Desktop/Mark Logic/Shakespeare/*.x=
>ml")
>
>Can you please help me understand?
Perhaps it is because you've used a singleton access function (the
doc() function returns a single root node for the one document you
are addressing) with a wildcard "*.xml" URI implying multiple documents.
If you want multiple documents returned with a single call, use the
collection() function, but ensure first that the syntax you use in
your URI is supported by the vendor of the XQuery tool. All URI
strings for accessing resources are implementation defined and not
standardized.
I hope this helps.
. . . . . . . . . . . . Ken
--
Upcoming hands-on code list, UBL, XSLT, XQuery and XSL-FO classes.
Interested in other classes? http://www.CraneSoftwrights.com/q/i/
Crane Softwrights Ltd. http://www.CraneSoftwrights.com/q/
Training tools: Comprehensive interactive XSLT/XPath 1.0/2.0 video
Video lesson: http://www.youtube.com/watch?v=PrNjJCh7Ppg&fmt=18
Video overview: http://www.youtube.com/watch?v=VTiodiij6gE&fmt=18
G. Ken Holman mailto:gkholman@CraneSoftwrights.com
Male Cancer Awareness Nov'07 http://www.CraneSoftwrights.com/q/bc
Legal business disclaimers: http://www.CraneSoftwrights.com/legal
From mike at saxonica.com Fri Oct 2 00:39:10 2009
From: mike at saxonica.com (Michael Kay)
Date: Thu Oct 1 15:26:07 2009
Subject: [xquery-talk] using a variable within a regexp pattern in XQuery
In-Reply-To: <8bb717a90910011153j4e4821f9t29f927fa39d7df35@mail.gmail.com>
References: <8bb717a90910011153j4e4821f9t29f927fa39d7df35@mail.gmail.com>
Message-ID: <27BA9C3A1FEE4D0EAA6B05C445319848@Sealion>
It's very unhelpful to report that something "doesn't work" without saying
how it failed. And if you expected the expression to do something useful,
it's useful to say what you expected it to do: you can't expect us to guess
the intention behind incorrect code.
If $q is a variable containing part of a regular expression, then you can
include it in a regex using the concat function:
matches(., concat('(', $q, ')*')
Regards,
Michael Kay
http://www.saxonica.com/
http://twitter.com/michaelhkay
_____
From: talk-bounces@x-query.com [mailto:talk-bounces@x-query.com] On Behalf
Of Manuel Souto Pico
Sent: 01 October 2009 19:53
To: talk@x-query.com
Subject: [xquery-talk] using a variable within a regexp pattern in XQuery
Hi,
I'm a bit stuck trying to run a regexp pattern in a XQuery search file.
(1) where $record/langSet[@xml:lang="en"]/tig/term[matches(., $q)]
works
(2) where $record/langSet[@xml:lang="en"]/tig/term[matches(., "$q")]
doesn't work
(3) where $record/langSet[@xml:lang="en"]/tig/term[matches(., "^$q.*$")]
doesn't work
(4) where $record/langSet[@xml:lang="en"]/tig/term[matches(., "^bu.+$")]
works!
Any ideas about how I can get to use regular expressions in this query?
(4) retrieves 'bufer', 'bug' and 'bus'. If $q is 'bu', (1) retrieves as well
'attribute', 'contrast button', etc.
Thanks a lot!
Cheers, Manuel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://x-query.com/pipermail/talk/attachments/20091001/22c0df09/attachment.htm
From m.soutopico at gmail.com Fri Oct 2 02:38:04 2009
From: m.soutopico at gmail.com (Manuel Souto Pico)
Date: Thu Oct 1 16:23:52 2009
Subject: [xquery-talk] using a variable within a regexp pattern in XQuery
In-Reply-To: <27BA9C3A1FEE4D0EAA6B05C445319848@Sealion>
References: <8bb717a90910011153j4e4821f9t29f927fa39d7df35@mail.gmail.com>
<27BA9C3A1FEE4D0EAA6B05C445319848@Sealion>
Message-ID: <8bb717a90910011638j2fad9734mb0fb09eda8f2a01a@mail.gmail.com>
Hi Michael,
Thanks a lot for your reply. Sorry about not being more explicit or clear.
I'll bear that in mind for my future emails.
What I meant with "works" is that the search expression and the term did
match. When they matched, the output was the term searched for. When they
didn't match, there was no output.
Thanks a lot for your suggestion. I certainly needed to use concat, but the
expression that eventually did the trick was:
matches(., concat('^', $q, '.*$'))
What I'd like is to control whether the search term matched the entire term,
part of it at the beginning, or part of it at the end, part of it in the
middle, etc.
Thanks again, and good night!
Manuel
2009/10/2 Michael Kay
> It's very unhelpful to report that something "doesn't work" without
> saying how it failed. And if you expected the expression to do something
> useful, it's useful to say what you expected it to do: you can't expect us
> to guess the intention behind incorrect code.
>
> If $q is a variable containing part of a regular expression, then you can
> include it in a regex using the concat function:
>
> matches(., concat('(', $q, ')*')
>
>
> Regards,
>
> Michael Kay
> http://www.saxonica.com/
> http://twitter.com/michaelhkay
>
> ------------------------------
> *From:* talk-bounces@x-query.com [mailto:talk-bounces@x-query.com] *On
> Behalf Of *Manuel Souto Pico
> *Sent:* 01 October 2009 19:53
> *To:* talk@x-query.com
> *Subject:* [xquery-talk] using a variable within a regexp pattern in
> XQuery
>
> Hi,
>
> I'm a bit stuck trying to run a regexp pattern in a XQuery search file.
>
> (1) where $record/langSet[@xml:lang="en"]/tig/term[matches(., $q)]
> works
> (2) where $record/langSet[@xml:lang="en"]/tig/term[matches(.,
> "$q")] doesn't work
> (3) where $record/langSet[@xml:lang="en"]/tig/term[matches(.,
> "^$q.*$")] doesn't work
> (4) where $record/langSet[@xml:lang="en"]/tig/term[matches(.,
> "^bu.+$")] works!
>
> Any ideas about how I can get to use regular expressions in this query?
>
> (4) retrieves 'bufer', 'bug' and 'bus'. If $q is 'bu', (1) retrieves as
> well 'attri*bu*te', 'contrast *bu*tton', etc.
>
> Thanks a lot!
>
> Cheers, Manuel
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://x-query.com/pipermail/talk/attachments/20091002/d6025020/attachment.htm
From Sorin.Nasoi at enea.com Fri Oct 2 14:19:00 2009
From: Sorin.Nasoi at enea.com (Sorin Nasoi)
Date: Fri Oct 2 03:49:16 2009
Subject: [xquery-talk] [ANN] eXcel Function Library
Message-ID:
Hi,
the FLWOR Foundation has developed a set of library modules written in XQuery.
These modules currently consist of 217 functions that provide a functionality similar to the
functionality (e.g. statistic or logic functions) provided in today's spreadsheet applications
(e.g. Microsoft Excel).
All the modules are written entirely in XQuery 1.0 (i.e. without external functions) and have
been tested to work with Zorba, Saxon, and eXist.
You can find more information, documentation, and download links at:
http://sourceforge.net/apps/mediawiki/zorba/index.php?title=EXcel_Function_Library
Best,
Sorin Nasoi
---
Sorin Nasoi
Senior Software Engineer
Enea Romania
Trust Center 319C Splaiul Independentei
District 6, Bucharest, Romania, 060044
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://x-query.com/pipermail/talk/attachments/20091002/98629469/attachment.htm
From hrennau at yahoo.de Fri Oct 2 23:03:46 2009
From: hrennau at yahoo.de (Hans-Juergen Rennau)
Date: Fri Oct 2 14:54:45 2009
Subject: [xquery-talk] In search of sample data ...
In-Reply-To: <200910021900.n92J04eo022736@jhunter.x-query.com>
References: <200910021900.n92J04eo022736@jhunter.x-query.com>
Message-ID: <120588.68742.qm@web27103.mail.ukl.yahoo.com>
Hello People,
preparing an extensive XQuery workshop, I am looking for interesting sample data. What I have in mind is data that
- are public and available online via URL (either static or as REST-ful webservice)
- have intermediate complexity (> 50 data items, <= 5 MB)
- must be in English (both tags and contents)
- may be dynamic, but not too ephemeral
- schema data welcome
Should anybody have suggestions, I would be grateful!
With kind regards,
Hans-Juergen
From dflorescu at mac.com Fri Oct 2 16:41:31 2009
From: dflorescu at mac.com (daniela florescu)
Date: Fri Oct 2 15:32:01 2009
Subject: [xquery-talk] In search of sample data ...
In-Reply-To: <120588.68742.qm@web27103.mail.ukl.yahoo.com>
References: <200910021900.n92J04eo022736@jhunter.x-query.com>
<120588.68742.qm@web27103.mail.ukl.yahoo.com>
Message-ID: <492FA071-3C46-43F5-BEF4-53A118AA2549@mac.com>
Hans Juergen,
I only have three words of advise, given your request:
www.data.gov
http://www.recovery.gov/
www.programmableweb.com/
Best regards
Dana
On Oct 2, 2009, at 3:03 PM, Hans-Juergen Rennau wrote:
> Hello People,
>
> preparing an extensive XQuery workshop, I am looking for interesting
> sample data. What I have in mind is data that
> - are public and available online via URL (either static or as REST-
> ful webservice)
> - have intermediate complexity (> 50 data items, <= 5 MB)
> - must be in English (both tags and contents)
> - may be dynamic, but not too ephemeral
> - schema data welcome
>
> Should anybody have suggestions, I would be grateful!
>
> With kind regards,
> Hans-Juergen
>
>
>
>
> _______________________________________________
> talk@x-query.com
> http://x-query.com/mailman/listinfo/talk
From Geert.Josten at daidalos.nl Sat Oct 3 11:53:14 2009
From: Geert.Josten at daidalos.nl (Geert Josten)
Date: Sat Oct 3 01:35:06 2009
Subject: [xquery-talk] In search of sample data ...
In-Reply-To: <492FA071-3C46-43F5-BEF4-53A118AA2549@mac.com>
References: <200910021900.n92J04eo022736@jhunter.x-query.com><120588.68742.qm@web27103.mail.ukl.yahoo.com>
<492FA071-3C46-43F5-BEF4-53A118AA2549@mac.com>
Message-ID: <0260356C6DFE754BA6FA48E659A14338334E32B375@helios.olympus.borgus.nl>
Hi,
How about online articles, news feeds, blogs? Though these are typically relatively short in length..
Kind regards,
Geert
>
Drs. G.P.H. Josten
Consultant
http://www.daidalos.nl/
Daidalos BV
Source of Innovation
Hoekeindsehof 1-4
2665 JZ Bleiswijk
Tel.: +31 (0) 10 850 1200
Fax: +31 (0) 10 850 1199
http://www.daidalos.nl/
KvK 27164984
De informatie - verzonden in of met dit emailbericht - is afkomstig van Daidalos BV en is uitsluitend bestemd voor de geadresseerde. Indien u dit bericht onbedoeld hebt ontvangen, verzoeken wij u het te verwijderen. Aan dit bericht kunnen geen rechten worden ontleend.
> From: talk-bounces@x-query.com
> [mailto:talk-bounces@x-query.com] On Behalf Of daniela florescu
> Sent: zaterdag 3 oktober 2009 0:42
> To: Hans-Juergen Rennau
> Cc: talk@x-query.com
> Subject: Re: [xquery-talk] In search of sample data ...
>
> Hans Juergen,
>
> I only have three words of advise, given your request:
>
> www.data.gov
> http://www.recovery.gov/
> www.programmableweb.com/
>
> Best regards
> Dana
>
> On Oct 2, 2009, at 3:03 PM, Hans-Juergen Rennau wrote:
>
> > Hello People,
> >
> > preparing an extensive XQuery workshop, I am looking for
> interesting
> > sample data. What I have in mind is data that
> > - are public and available online via URL (either static or
> as REST-
> > ful webservice)
> > - have intermediate complexity (> 50 data items, <= 5 MB)
> > - must be in English (both tags and contents)
> > - may be dynamic, but not too ephemeral
> > - schema data welcome
> >
> > Should anybody have suggestions, I would be grateful!
> >
> > With kind regards,
> > Hans-Juergen
> >
> >
> >
> >
> > _______________________________________________
> > talk@x-query.com
> > http://x-query.com/mailman/listinfo/talk
>
> _______________________________________________
> talk@x-query.com
> http://x-query.com/mailman/listinfo/talk
>
From james+xquery at blushingbunny.net Tue Oct 6 01:05:27 2009
From: james+xquery at blushingbunny.net (James Cummings)
Date: Mon Oct 5 15:53:07 2009
Subject: [xquery-talk] parsing dates
Message-ID: <961274970910051605tdf4d920i4a58b8f88f9e27e9@mail.gmail.com>
Hi there,
I've a silly question about the best way to parse dates. I'm passing
a parameter (in eXist) that is part of the URL for an xquery and I
want to separate it into its individual parts of year month and day. I
could test the string and do substring-before and after and such, or
create my own function, but it seemed better practice to use the
functions like year-from-date and month-from-date. So I tried:
let $date := request:get-parameter("date", ("1789-01-01")) cast as xs:date
let $year := fn:year-from-date($date)
let $month := fn:month-from-date($date)
let $day := fn:day-from-date($date)
which works fine when the date is YYYY-MM-DD. But what I want to
achieve is being able to handle YYYY-MM-DD, YYYY-MM or just YYYY. The
last two give me an error of "xs:date must not have hour, minute or
second fields set" (erm... which it doesn't, which is why I'm
confused). I'm happy for $month and $day to be empty if they don't
exist.
I'm sure it is something terribly obvious with the datatype. Should I
just be breaking it down to its component parts myself? It just
seemed like I was reinventing the wheel.
Thanks for any suggestions.
-James
From joewiz at gmail.com Mon Oct 5 21:16:57 2009
From: joewiz at gmail.com (Joe Wicentowski)
Date: Mon Oct 5 17:02:50 2009
Subject: [xquery-talk] parsing dates
In-Reply-To: <961274970910051605tdf4d920i4a58b8f88f9e27e9@mail.gmail.com>
References: <961274970910051605tdf4d920i4a58b8f88f9e27e9@mail.gmail.com>
Message-ID: <2e0234190910051716k2ddad4dcj14c5e02f04cb2d45@mail.gmail.com>
James,
I've encountered the same issue with dates in TEI documents. What
follows are some thoughts/suggestions about using TEI dates in eXist.
I think the issue is The TEI Guidelines allows/encourages one to mix
date datatypes, thereby conflating data with precision in dates
(http://www.tei-c.org/release/doc/tei-p5-doc/en/html/CO.html#CONADA):
------
"Partial dates or times (e.g. 1990, September 1990, twelvish) can be
expressed in the when attribute by simply omitting a part of the value
supplied. Imprecise dates or times (for example early August, some
time after ten and before twelve) may be expressed as date or time
ranges... The @when attribute always supplies a normalized
representation of the date given as content of the date element. The
format used should be a valid W3C schema datatype. Some typical
examples follow:
* The year 2001
* September 2001
* 11 Sept 01
* 9/11
* September
* Eleventh of the month
*
* Sept 11th, 12 minutes before 9 am
Note in the last example the use of a normalized representation for
the date string which includes a time: this example could thus equally
well be tagged using the time element.
The following examples demonstrate the use of the date element to mark
a period of time:
*
Those five years ? 1918 to
1923 ? had been, he suspected, somehow very important.
"
-----
If you mix 2+ date datatypes, you will encounter some difficulties
when doing what you asked about. Setting range indexes in eXist is
impossible if you mix datatypes, as far as I know. I think we might
encode TEI texts more effectively to make processing easier by (1)
either using a consistent datatype or (2) replacing the generic @when
with a new way of encoding which implies the datatype.
As far as your specific question, you could run a series of "if ($date
castable as ...) then ... else" statements on the following datatypes:
* date
* gYear
* gMonth
* gDay
* gYearMonth
* gMonthDay
* time
* dateTime
As an alternative to conditional expressions, I'm not sure if
typeswitch would work for this?
- Joe
On Mon, Oct 5, 2009 at 7:05 PM, James Cummings
wrote:
> Hi there,
>
> I've a silly question about the best way to parse dates. ?I'm passing
> a parameter (in eXist) that is part of the URL for an xquery and I
> want to separate it into its individual parts of year month and day. I
> could test the string and do substring-before and after and such, or
> create my own function, but it seemed better practice to use the
> functions like year-from-date and month-from-date. ?So I tried:
>
> let $date := request:get-parameter("date", ("1789-01-01")) cast as xs:date
> let $year := fn:year-from-date($date)
> let $month := fn:month-from-date($date)
> let $day := fn:day-from-date($date)
>
> which works fine when the date is YYYY-MM-DD. ?But what I want to
> achieve is being able to handle YYYY-MM-DD, YYYY-MM or just YYYY. ?The
> last two give me an error of "xs:date must not have hour, minute or
> second fields set" (erm... which it doesn't, which is why I'm
> confused). I'm happy for $month and $day to be empty if they don't
> exist.
>
> I'm sure it is something terribly obvious with the datatype. ?Should I
> just be breaking it down to its component parts myself? ?It just
> seemed like I was reinventing the wheel.
>
> Thanks for any suggestions.
>
> -James
> _______________________________________________
> talk@x-query.com
> http://x-query.com/mailman/listinfo/talk
>
From mike at saxonica.com Tue Oct 6 08:09:56 2009
From: mike at saxonica.com (Michael Kay)
Date: Mon Oct 5 22:47:56 2009
Subject: [xquery-talk] parsing dates
In-Reply-To: <961274970910051605tdf4d920i4a58b8f88f9e27e9@mail.gmail.com>
References: <961274970910051605tdf4d920i4a58b8f88f9e27e9@mail.gmail.com>
Message-ID: <10BA7737ED88499CB71FC8E1A6074A2A@Sealion>
I don't know if eXist has any schema support. If it does, you can define a
type genericDate that is a union of xs:date, xs:gYearMonth, and xs:gYear.
You can't cast to the union type (sadly) but you can construct an element
and validate against a schema that defines the element as a union type, and
then atomize.
OK, that's a bit longwinded. Sorry!
Regards,
Michael Kay
http://www.saxonica.com/
http://twitter.com/michaelhkay
> -----Original Message-----
> From: talk-bounces@x-query.com
> [mailto:talk-bounces@x-query.com] On Behalf Of James Cummings
> Sent: 06 October 2009 00:05
> To: talk@x-query.com
> Subject: [xquery-talk] parsing dates
>
> Hi there,
>
> I've a silly question about the best way to parse dates. I'm
> passing a parameter (in eXist) that is part of the URL for an
> xquery and I want to separate it into its individual parts of
> year month and day. I could test the string and do
> substring-before and after and such, or create my own
> function, but it seemed better practice to use the functions
> like year-from-date and month-from-date. So I tried:
>
> let $date := request:get-parameter("date", ("1789-01-01"))
> cast as xs:date let $year := fn:year-from-date($date) let
> $month := fn:month-from-date($date) let $day :=
> fn:day-from-date($date)
>
> which works fine when the date is YYYY-MM-DD. But what I
> want to achieve is being able to handle YYYY-MM-DD, YYYY-MM
> or just YYYY. The last two give me an error of "xs:date must
> not have hour, minute or second fields set" (erm... which it
> doesn't, which is why I'm confused). I'm happy for $month and
> $day to be empty if they don't exist.
>
> I'm sure it is something terribly obvious with the datatype.
> Should I just be breaking it down to its component parts
> myself? It just seemed like I was reinventing the wheel.
>
> Thanks for any suggestions.
>
> -James
> _______________________________________________
> talk@x-query.com
> http://x-query.com/mailman/listinfo/talk
From dsewell at virginia.edu Tue Oct 6 10:44:09 2009
From: dsewell at virginia.edu (David Sewell)
Date: Tue Oct 6 06:41:21 2009
Subject: [xquery-talk] parsing dates
In-Reply-To: <2e0234190910051716k2ddad4dcj14c5e02f04cb2d45@mail.gmail.com>
References: <961274970910051605tdf4d920i4a58b8f88f9e27e9@mail.gmail.com>
<2e0234190910051716k2ddad4dcj14c5e02f04cb2d45@mail.gmail.com>
Message-ID:
On Mon, 5 Oct 2009, Joe Wicentowski wrote:
> As far as your specific question, you could run a series of "if ($date
> castable as ...) then ... else" statements on the following datatypes:
[...]
> As an alternative to conditional expressions, I'm not sure if
> typeswitch would work for this?
typeswitch tests for node kinds, not data types, so the "if castable"
approach is probably the way to go (barring the custom data type
solution that Michael mentioned).
--
David Sewell, Editorial and Technical Manager
ROTUNDA, The University of Virginia Press
PO Box 801079, Charlottesville, VA 22904-4318 USA
Courier: 310 Old Ivy Way, Suite 302, Charlottesville VA 22903
Email: dsewell@virginia.edu Tel: +1 434 924 9973
Web: http://rotunda.upress.virginia.edu/
From james+xquery at blushingbunny.net Tue Oct 6 16:34:35 2009
From: james+xquery at blushingbunny.net (James Cummings)
Date: Tue Oct 6 07:31:24 2009
Subject: [xquery-talk] parsing dates
In-Reply-To:
References: <961274970910051605tdf4d920i4a58b8f88f9e27e9@mail.gmail.com>
<2e0234190910051716k2ddad4dcj14c5e02f04cb2d45@mail.gmail.com>
Message-ID: <961274970910060734l69589e34p2085e1c0a843be6f@mail.gmail.com>
On Tue, Oct 6, 2009 at 14:44, David Sewell wrote:
> On Mon, 5 Oct 2009, Joe Wicentowski wrote:
>
>> As far as your specific question, you could run a series of "if ($date
>> castable as ...) then ... else" statements on the following datatypes:
> typeswitch tests for node kinds, not data types, so the "if castable"
> approach is probably the way to go (barring the custom data type
> solution that Michael mentioned).
Thanks Joe, Mike, and David,
I think you are right that the "if castable as" approach will work the
best. Mike's suggestion (while perhaps more reliable) is probably
overkill. I don't actually care to validate the dates as a date,
since if someone is putting in funny non-dates in this case, then they
probably deserve the error message they'll get. The files are a
historical diary and I just want to give users (well, and my
processing) the option of looking at it by day, by month, or by year
through a simple change in a hackable human-readable URL. All the real
date/@when in the files are YYYY-MM-DD but want to let them do
/diary/1788-04-07.html (or .xml) and get that one day's entry or
/diary/1788-04.html to get the month or /diary/1788.html to get the
year. Obviously in 99% of the time the urls will be generated from
some link they are clicking on but it gives me an easy way to move
from day to month to year if desired.
I suppose another way would be not to treat these as dates at all, but
in canonicalizing the data before loading it into eXist, I could give
unique @xml:ids to each day, month and year, that were in the form of
somethingYYYY on the enclosing element for the year's entries,
somethingYYYY-MM for the element enclosing a month, and
somethingYYYY-MM-DD for the element enclosing a day. That way when
then ask for /diary/YYYY-MM-DD I would just go get the element with
somethingYYYY-MM-DD as an @xml:id. I guess that the drawbacks of that
are that I can't really do an date-arithmetic, but that said at this
stage I'm not sure I need to. I was just assuming I should be doing it
by date (rather than ID) because the whole work is date oriented.
Thanks for the help, as I'm now working feverishly on this I'm sure
I'll be asking for help again soon! ;-)
-James
From joewiz at gmail.com Tue Oct 6 12:59:37 2009
From: joewiz at gmail.com (Joe Wicentowski)
Date: Tue Oct 6 08:54:50 2009
Subject: [xquery-talk] parsing dates
In-Reply-To: <961274970910060734l69589e34p2085e1c0a843be6f@mail.gmail.com>
References: <961274970910051605tdf4d920i4a58b8f88f9e27e9@mail.gmail.com>
<2e0234190910051716k2ddad4dcj14c5e02f04cb2d45@mail.gmail.com>
<961274970910060734l69589e34p2085e1c0a843be6f@mail.gmail.com>
Message-ID: <2e0234190910060859q4c9201bepe106ef7550d24ec3@mail.gmail.com>
Hi James,
Got it - now I understand.
Well, if your dates are normalized to yyyy-mm-dd, I'd suggest keeping
them as is in date/@when. This way, you can set up a range index on
@when, and you can do date comparisons (<, >, =) based on the
searches. See eXist's documentation on setting up indexing, but I'd
use something like:
This would enable comparison queries like:
let $date := request:get-parameter("date", ("1789-01-01"))
let $query-start-date :=
if ($date castable as xs:date) then $date cast as xs:date
else if ($date castable as xs:gYearMonth) then concat($date, '-01')
cast as xs:date
else concat($date, '-01-01') cast as xs:date
let $query-end-date :=
if ($date castable as xs:date) then $date cast as xs:date
else if ($date castable as xs:gYearMonth) then concat($date,
functx:days-in-month($month)) cast as xs:date
else concat($date, '-12-31') cast as xs:date
for $hit in $docs[tei:date/@when ge $query-start-date and
tei:date/@when le $query-end-date]
...
(for the functx days-in-month function, see
http://www.xqueryfunctions.com/xq/functx_days-in-month.html)
Joe
From michael.blakeley at marklogic.com Tue Oct 6 10:39:32 2009
From: michael.blakeley at marklogic.com (Michael Blakeley)
Date: Tue Oct 6 09:34:09 2009
Subject: [xquery-talk] parsing dates
In-Reply-To:
References: <961274970910051605tdf4d920i4a58b8f88f9e27e9@mail.gmail.com> <2e0234190910051716k2ddad4dcj14c5e02f04cb2d45@mail.gmail.com>
Message-ID: <4ACB72C4.8070105@marklogic.com>
On 2009-10-06 06:44, David Sewell wrote:
> On Mon, 5 Oct 2009, Joe Wicentowski wrote:
>
>> As far as your specific question, you could run a series of "if ($date
>> castable as ...) then ... else" statements on the following datatypes:
>
> [...]
>
>> As an alternative to conditional expressions, I'm not sure if
>> typeswitch would work for this?
>
> typeswitch tests for node kinds, not data types, so the "if castable"
> approach is probably the way to go (barring the custom data type
> solution that Michael mentioned).
I think that's not quite correct. Typeswitch case clauses expect a
SequenceType, which includes ItemType. So the tests can be any node type
or any schema type (see http://www.w3.org/TR/xquery/#id-typeswitch and
http://www.w3.org/TR/xquery/#doc-xquery-SequenceType).
Here's an example: note that the order of the 'case' clauses is
important. Since xs:ID is derived from xs:string, it must be tested
before any xs:string test case.
xquery version "1.0-ml";
let $i := "test"
return
typeswitch ($i)
case xs:integer return "integer"
case xs:ID return "id"
case xs:string return "string"
default return error((), "UNEXPECTED", $i)
-- Mike
From Geert.Josten at daidalos.nl Tue Oct 6 20:09:09 2009
From: Geert.Josten at daidalos.nl (Geert Josten)
Date: Tue Oct 6 10:03:27 2009
Subject: [xquery-talk] parsing dates
In-Reply-To: <4ACB72C4.8070105@marklogic.com>
References: <961274970910051605tdf4d920i4a58b8f88f9e27e9@mail.gmail.com><2e0234190910051716k2ddad4dcj14c5e02f04cb2d45@mail.gmail.com>
<4ACB72C4.8070105@marklogic.com>
Message-ID: <0260356C6DFE754BA6FA48E659A14338334E32B69D@helios.olympus.borgus.nl>
> I think that's not quite correct. Typeswitch case clauses
> expect a SequenceType, which includes ItemType. So the tests
> can be any node type or any schema type (see
> http://www.w3.org/TR/xquery/#id-typeswitch and
> http://www.w3.org/TR/xquery/#doc-xquery-SequenceType).
>
> Here's an example: note that the order of the 'case' clauses
> is important. Since xs:ID is derived from xs:string, it must
> be tested before any xs:string test case.
>
> xquery version "1.0-ml";
>
> let $i := "test"
> return
> typeswitch ($i)
> case xs:integer return "integer"
> case xs:ID return "id"
> case xs:string return "string"
> default return error((), "UNEXPECTED", $i)
>
> -- Mike
Is that because xs:integer is considered an AtomicType?
Kind regards,
Geert
Drs. G.P.H. Josten
Consultant
http://www.daidalos.nl/
Daidalos BV
Source of Innovation
Hoekeindsehof 1-4
2665 JZ Bleiswijk
Tel.: +31 (0) 10 850 1200
Fax: +31 (0) 10 850 1199
http://www.daidalos.nl/
KvK 27164984
De informatie - verzonden in of met dit emailbericht - is afkomstig van Daidalos BV en is uitsluitend bestemd voor de geadresseerde. Indien u dit bericht onbedoeld hebt ontvangen, verzoeken wij u het te verwijderen. Aan dit bericht kunnen geen rechten worden ontleend.
From mike at saxonica.com Tue Oct 6 21:21:03 2009
From: mike at saxonica.com (Michael Kay)
Date: Tue Oct 6 12:13:48 2009
Subject: [xquery-talk] parsing dates
In-Reply-To: <4ACB72C4.8070105@marklogic.com>
References: <961274970910051605tdf4d920i4a58b8f88f9e27e9@mail.gmail.com> <2e0234190910051716k2ddad4dcj14c5e02f04cb2d45@mail.gmail.com>
<4ACB72C4.8070105@marklogic.com>
Message-ID:
>
> I think that's not quite correct. Typeswitch case clauses
> expect a SequenceType, which includes ItemType. So the tests
> can be any node type or any schema type (see
> http://www.w3.org/TR/xquery/#id-typeswitch and
> http://www.w3.org/TR/xquery/#doc-xquery-SequenceType).
>
> Here's an example: note that the order of the 'case' clauses
> is important. Since xs:ID is derived from xs:string, it must
> be tested before any xs:string test case.
>
> xquery version "1.0-ml";
>
> let $i := "test"
> return
> typeswitch ($i)
> case xs:integer return "integer"
> case xs:ID return "id"
> case xs:string return "string"
> default return error((), "UNEXPECTED", $i)
>
But we aren't starting with an xs:date or xs:gYearMonth; we are starting
with a string that is capable of being converted to an xs:date or
xs:gYearMonth. So "castable as" is indeed the right solution.
Except that matches() would be more flexible, because it can also test for
formats that don't happen to correspond to any known schema-defined type.
>Is that because xs:integer is considered an AtomicType?
xs:integer is most definitely an AtomicType, there's no "considered to be"
about it.
Regards,
Michael Kay
http://www.saxonica.com/
http://twitter.com/michaelhkay
From dflorescu at mac.com Wed Oct 7 09:46:33 2009
From: dflorescu at mac.com (Daniela Florescu)
Date: Wed Oct 7 08:41:33 2009
Subject: [xquery-talk] Fwd: How you can help promote the Developer Gathering
(part of TPAC 2009)
References:
Message-ID: <5275512C-88E9-4572-9DA7-DE2E90F354D5@mac.com>
Maybe this is of interest to the XQuery developers in the Bay Area.
http://www.w3.org/2009/11/TPAC/DevMeeting.html
Best regards
Dana
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://x-query.com/pipermail/talk/attachments/20091007/e529d039/attachment.htm
From wely_live at live.com Fri Oct 16 12:00:29 2009
From: wely_live at live.com (Wely Live)
Date: Thu Oct 15 19:47:56 2009
Subject: [xquery-talk] XQuery Implementation for PHP
Message-ID:
Hello,
I am new in XQuery.
Could somebody suggest is there any free implementation of XQuery for PHP?
Thanks.
Regards,
Wely
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://x-query.com/pipermail/talk/attachments/20091016/f9a8ce3f/attachment.htm
From vyacheslav.sedov at gmail.com Fri Oct 16 09:02:03 2009
From: vyacheslav.sedov at gmail.com (Vyacheslav Sedov)
Date: Thu Oct 15 20:48:41 2009
Subject: [xquery-talk] XQuery Implementation for PHP
In-Reply-To:
References:
Message-ID: <7ab7cbac0910152102l517a79fwe33bc07758be67a7@mail.gmail.com>
with eXist (http://exist-db.org) you don`t need php anymore (and even
nor Apache and nor MySQL)
On Fri, Oct 16, 2009 at 7:00 AM, Wely Live wrote:
> Hello,
>
> I am new in XQuery.
> Could somebody suggest is there any free implementation of XQuery for PHP?
> Thanks.
>
> Regards,
> Wely
> _______________________________________________
> talk@x-query.com
> http://x-query.com/mailman/listinfo/talk
>
From matthias.brantner at 28msec.com Fri Oct 16 09:17:20 2009
From: matthias.brantner at 28msec.com (Matthias Brantner)
Date: Thu Oct 15 23:01:47 2009
Subject: [xquery-talk] XQuery Implementation for PHP
In-Reply-To:
References:
Message-ID:
Hello,
the Zorba XQuery processor (zorba-xquery.org) provides language
bindings for PHP.
Matthias
On 16.10.2009, at 05:00, Wely Live wrote:
> Hello,
>
> I am new in XQuery.
> Could somebody suggest is there any free implementation of XQuery
> for PHP?
> Thanks.
>
> Regards,
> Wely
> _______________________________________________
> talk@x-query.com
> http://x-query.com/mailman/listinfo/talk
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://x-query.com/pipermail/talk/attachments/20091016/31feb47c/attachment.htm
From wely_live at live.com Thu Oct 29 10:56:45 2009
From: wely_live at live.com (Wely Live)
Date: Wed Oct 28 19:04:56 2009
Subject: [xquery-talk] Benchmarking on XQuery Implementation in DBMS
Message-ID:
Hi,
I am planning to research the comparison and benchmarking XQuery Implementation in DBMS (SQL Server, Oracle, DB2). There are a few question to discuss as following:
1. I wonder if anybody has ever done the similar research?
I would be appreciate if anybody could provide my any related source or document.
2. To do the benchmarking, we of course need a sample dataset. Anybody has reference where can I find a good dataset sample?
Thanks!
Regards,
Wely
Post Graduate Student
Nanyang Technological University
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://x-query.com/pipermail/talk/attachments/20091029/1e01edd0/attachment.htm
From rpbourret at rpbourret.com Wed Oct 28 22:18:02 2009
From: rpbourret at rpbourret.com (Ronald Bourret)
Date: Wed Oct 28 21:28:27 2009
Subject: [xquery-talk] Benchmarking on XQuery Implementation in DBMS
In-Reply-To:
References:
Message-ID: <4AE9258A.8000501@rpbourret.com>
Hello,
You can find a partial list of XML query benchmarks at [1]. You should
also search DBLP [2] for XML and benchmark, as there may be more recent
research in this area. Finally, be sure to read your license agreements
carefully. Unfortunately, many databases do not allow you to publish the
results of benchmarks.
-- Ron
[1] http://www.rpbourret.com/xml/XMLDBLinks.htm#Benchmarks
[2] http://www.informatik.uni-trier.de/~ley/db/indices/t-form.html
Wely Live wrote:
> Hi,
>
> I am planning to research the comparison and benchmarking XQuery Implementation in DBMS (SQL Server, Oracle, DB2). There are a few question to discuss as following:
> 1. I wonder if anybody has ever done the similar research?
> I would be appreciate if anybody could provide my any related source or document.
> 2. To do the benchmarking, we of course need a sample dataset. Anybody has reference where can I find a good dataset sample?
>
> Thanks!
>
> Regards,
> Wely
> Post Graduate Student
> Nanyang Technological University
From mike at saxonica.com Thu Oct 29 09:09:48 2009
From: mike at saxonica.com (Michael Kay)
Date: Thu Oct 29 01:24:30 2009
Subject: [xquery-talk] Benchmarking on XQuery Implementation in DBMS
In-Reply-To:
References:
Message-ID: <31E18AECC155486E8242B33B1F77BB3A@Sealion>
A fair bit of work has been done but more is always needed.
I think you need to start out with very clear objectives, especially in the
following areas:
* are you going to try and measure how well the products handle something
close to a "real-life" workload (including factors such as updating,
database loading, etc), or are you going to measure a small number of
synthetic queries?
* are you going to make strenuous efforts to get the best possible
performance out of each product that you test, or are you simply going to
measure what it achieves "out of the box"?
* do you just want to produce some numbers, or do you want to use those
numbers to test some theories or hypotheses?
Most of the papers I've seen on XSLT, XPath, or XQuery benchmarks over the
years suffer from one or more of the following drawbacks:
* Some of the queries they measure are totally unrepresentative of real
life, for example IIRC one benchmark has a query like
/descendant::*/ancestor::*/descendant::*. Who cares whether that performs
well? (But it can be useful, of course, if your objective is to find out how
path expressions are implemented internally).
* Simple flaws in the measurement methodology, for example failing to take
account of Java VM startup time, or to distinguish query compilation,
document parsing, and query evaluation costs. Such flaws can make your
numbers meaningless, but they are surprisingly common in published papers.
* Running products in a sub-optimal way. This might say something about the
product's usability or documentation, but if you run with the wrong
configuration options, it tells you very little about the product's true
performance capabilities. This is especially true where your knowledge of
one of the products is much better than your knowledge of others: a factor
that taints all comparative benchmarks produced by vendors.
* Making incorrect inferences from the measurements (for example, the
authors of one paper drew inferences about the internal workings of Saxon
which were completely and bizarrely wrong, and they didn't check them with
me before publication.)
It's worth remembering that in real life, the performance you achieve
depends much more on your skills as a developer and your knowledge and
experience of the technology you are using than on the absolute capabilities
of the chosen product. Performance problems in real life don't occur because
the technology is intrinsically slow, they occur because it is misused. This
places a severe limitation on the usefulness of benchmark numbers.
Regards,
Michael Kay
http://www.saxonica.com/
http://twitter.com/michaelhkay
_____
From: talk-bounces@x-query.com [mailto:talk-bounces@x-query.com] On Behalf
Of Wely Live
Sent: 29 October 2009 02:57
To: talk@x-query.com
Subject: [xquery-talk] Benchmarking on XQuery Implementation in DBMS
Hi,
I am planning to research the comparison and benchmarking XQuery
Implementation in DBMS (SQL Server, Oracle, DB2). There are a few question
to discuss as following:
1. I wonder if anybody has ever done the similar research?
I would be appreciate if anybody could provide my any related source or
document.
2. To do the benchmarking, we of course need a sample dataset. Anybody has
reference where can I find a good dataset sample?
Thanks!
Regards,
Wely
Post Graduate Student
Nanyang Technological University
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://x-query.com/pipermail/talk/attachments/20091029/babab73b/attachment.htm
From Geert.Josten at daidalos.nl Thu Oct 29 10:37:16 2009
From: Geert.Josten at daidalos.nl (Geert Josten)
Date: Thu Oct 29 01:52:24 2009
Subject: [xquery-talk] Benchmarking on XQuery Implementation in DBMS
In-Reply-To: <4AE9258A.8000501@rpbourret.com>
References:
<4AE9258A.8000501@rpbourret.com>
Message-ID: <0260356C6DFE754BA6FA48E659A14338415E4BA560@helios.olympus.borgus.nl>
Hi,
There is also the TPoX Benchmark suite that might be worth taking a look at..
http://tpox.sourceforge.net/
Kind regards,
Geert
>
Drs. G.P.H. Josten
Consultant
http://www.daidalos.nl/
Daidalos BV
Source of Innovation
Hoekeindsehof 1-4
2665 JZ Bleiswijk
Tel.: +31 (0) 10 850 1200
Fax: +31 (0) 10 850 1199
http://www.daidalos.nl/
KvK 27164984
De informatie - verzonden in of met dit emailbericht - is afkomstig van Daidalos BV en is uitsluitend bestemd voor de geadresseerde. Indien u dit bericht onbedoeld hebt ontvangen, verzoeken wij u het te verwijderen. Aan dit bericht kunnen geen rechten worden ontleend.
> From: talk-bounces@x-query.com
> [mailto:talk-bounces@x-query.com] On Behalf Of Ronald Bourret
> Sent: donderdag 29 oktober 2009 6:18
> To: Wely Live
> Cc: talk@x-query.com
> Subject: Re: [xquery-talk] Benchmarking on XQuery
> Implementation in DBMS
>
> Hello,
>
> You can find a partial list of XML query benchmarks at [1].
> You should also search DBLP [2] for XML and benchmark, as
> there may be more recent research in this area. Finally, be
> sure to read your license agreements carefully.
> Unfortunately, many databases do not allow you to publish the
> results of benchmarks.
>
> -- Ron
>
> [1] http://www.rpbourret.com/xml/XMLDBLinks.htm#Benchmarks
> [2] http://www.informatik.uni-trier.de/~ley/db/indices/t-form.html
>
> Wely Live wrote:
> > Hi,
> >
> > I am planning to research the comparison and benchmarking
> XQuery Implementation in DBMS (SQL Server, Oracle, DB2).
> There are a few question to discuss as following:
> > 1. I wonder if anybody has ever done the similar research?
> > I would be appreciate if anybody could provide my any
> related source or document.
> > 2. To do the benchmarking, we of course need a sample
> dataset. Anybody has reference where can I find a good dataset sample?
> >
> > Thanks!
> >
> > Regards,
> > Wely
> > Post Graduate Student
> > Nanyang Technological University
> _______________________________________________
> talk@x-query.com
> http://x-query.com/mailman/listinfo/talk
>
From Andy.K.Chang at aexp.com Thu Oct 29 14:02:44 2009
From: Andy.K.Chang at aexp.com (Andy K Chang)
Date: Thu Oct 29 13:05:47 2009
Subject: [xquery-talk] Andy K Chang is on Business Trip with Limited
Availability
Message-ID:
I will be out of the office starting 10/25/2009 and will not return until
10/30/2009.
I am in Las Vegas for 2009 IBM IOD Conference. My availability is limited but
am available to any important or emergent matters. I will check my emails a
few times a day and be available from my cell. If you need help, please
contact Sundi Mahadevan first
American Express made the following annotations on Thu Oct 29 2009 15:02:46
------------------------------------------------------------------------------
"This message and any attachments are solely for the intended recipient and may contain confidential or privileged information. If you are not the intended recipient, any disclosure, copying, use, or distribution of the information included in this message and any attachments is prohibited. If you have received this communication in error, please notify us by reply e-mail and immediately and permanently delete this message and any attachments. Thank you."
American Express a ajouté le commentaire suivant le Thu Oct 29 2009 15:02:46
Ce courrier et toute pièce jointe qu'il contient sont réservés au seul destinataire indiqué et peuvent renfermer des renseignements confidentiels et privilégiés. Si vous n'êtes pas le destinataire prévu, toute divulgation, duplication, utilisation ou distribution du courrier ou de toute pièce jointe est interdite. Si vous avez reçu cette communication par erreur, veuillez nous en aviser par courrier et détruire immédiatement le courrier et les pièces jointes. Merci.
******************************************************************************
-------------------------------------------------------------------------------
From liz.andrews at altova.com Thu Oct 29 17:11:40 2009
From: liz.andrews at altova.com (Liz Andrews)
Date: Thu Oct 29 13:14:55 2009
Subject: [xquery-talk] [ANN] Altova announces v2010 of the MissionKit tool
suite
Message-ID: <015B8F921A8AEE498CAAD1B83BD8EE2406F1FFA7@bospexc01.bos.altova.com>
Altova is pleased to announce general availability version 2010 of its
MissionKit XML, database, and UML tools. v2010 is our MOST WANTED
release and includes over 70 new customer-requested features. Just a few
of these include:
* Support for WSDL 2.0, JSON, and SysML technologies
* Database schema comparison
* New stylesheet design paradigm with advanced support for electronic
form design
* Enhanced XBRL functionality
* And much more
More info and screenshots are available at
Download a fully functional free trial at
Best regards,
Liz
Liz Andrews
Technical Marketing Manager
Altova, Inc.
www.altova.com
________________________________
This e-mail and any attachments are intended only for the person/entity
to which they are addressed and may contain confidential and/or
privileged material. If you received this in error, please notify the
sender and delete the message.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://x-query.com/pipermail/talk/attachments/20091029/1898d618/attachment.htm