|
Home > Learn XML > XML Blogs > XQuery Talk Blog
The XQuery-Talk BlogThe XQuery-Talk developer forum was started by Java guru Jason Hunter and is hosted by xquery.com. The XQuery-Talk Blog provides an easy way to interact with the growing XQuery developer community, including many implementors of XQuery products and technologies. why do you care what other people think ?Posted 5/21/2013 12:57:24 PMOn May 20, 2013, at 7:55 AM, Joe Wicentowski wrote: >> I am extremely grateful for the work that has been done on XQuery > I'm > convinced that I could not have taken on and accomplished what I have > were it not for the high level concerns that XQuery allows me to focus > on . . . Read full entry » why do you care what other people think ?Posted 5/21/2013 12:57:24 PMOn May 20, 2013, at 7:55 AM, Joe Wicentowski wrote: >> I am extremely grateful for the work that has been done on XQuery > I'm > convinced that I could not have taken on and accomplished what I have > were it not for the high level concerns that XQuery allows me to focus > on . . . Read full entry » and what I think we should tackle right nowPosted 5/20/2013 5:33:53 PM1. I think this community should take JSON very seriously, because it's here to stay. The way that maps are designed in XQuery is a failed attempt to solve that problem, that kind of solves the JSON problem, but not really. It's more likely to annoy the JSON people then attract them to what we . . . Read full entry » and what I think we should tackle right nowPosted 5/20/2013 5:33:53 PM1. I think this community should take JSON very seriously, because it's here to stay. The way that maps are designed in XQuery is a failed attempt to solve that problem, that kind of solves the JSON problem, but not really. It's more likely to annoy the JSON people then attract them to what we . . . Read full entry » letter to a young scientist, and what this community is all aboutPosted 5/20/2013 5:13:48 PMDear James and David, you both told me that you do not understand what I am trying to say about turning this community into a more scientifically driven one. At first I didn't know what to answer, because honestly, I have no particular agenda, and no clear goal in mind when I said that. But in . . . Read full entry » letter to a young scientist, and what this community is all aboutPosted 5/20/2013 5:13:48 PMDear James and David, you both told me that you do not understand what I am trying to say about turning this community into a more scientifically driven one. At first I didn't know what to answer, because honestly, I have no particular agenda, and no clear goal in mind when I said that. But in . . . Read full entry » why do you care what other people think ?Posted 5/20/2013 9:51:20 AMJim, the yearly Digital Humanities Summer School in Oxford has a technical and hands-on focus on matters of XML-based text encoding and -transformation. They also have a dedicated Linked Data workshop this year (July)—although nothing specifically targeted at xQuery, so apologies if off- . . . Read full entry » why do you care what other people think ?Posted 5/20/2013 9:51:20 AMJim, the yearly Digital Humanities Summer School in Oxford has a technical and hands-on focus on matters of XML-based text encoding and -transformation. They also have a dedicated Linked Data workshop this year (July)—although nothing specifically targeted at xQuery, so apologies if off- . . . Read full entry » why do you care what other people think ?Posted 5/20/2013 7:55:01 AM> Speaking as someone in the digital humanities community, I am extremely > grateful for the work that has been done on XQuery and on the entire suite > of XML-related W3C technologies (XPath, XSLT, etc.) within the W3C working > groups and by independent developers. As a self-taught pr . . . Read full entry » why do you care what other people think ?Posted 5/20/2013 7:55:01 AM> Speaking as someone in the digital humanities community, I am extremely > grateful for the work that has been done on XQuery and on the entire suite > of XML-related W3C technologies (XPath, XSLT, etc.) within the W3C working > groups and by independent developers. As a self-taught pr . . . Read full entry » why do you care what other people think ?Posted 5/20/2013 7:49:25 AMOn Mon, 2013-05-20 at 09:46 -0400, David Sewell wrote: > [...] > it > is almost inconceivable that the projects I have worked on for the last decade > could have been achieved as well as they have without XQuery and the tools built > upon it (notably Saxon, MarkLogic, and the oX . . . Read full entry » why do you care what other people think ?Posted 5/20/2013 7:49:25 AMOn Mon, 2013-05-20 at 09:46 -0400, David Sewell wrote: > [...] > it > is almost inconceivable that the projects I have worked on for the last decade > could have been achieved as well as they have without XQuery and the tools built > upon it (notably Saxon, MarkLogic, and the oX . . . Read full entry » why do you care what other people think ? (fwd)Posted 5/20/2013 7:09:35 AMJim, The best two websites for general information on DH organizations/events are probably: http://adho.org/ http://dh2013.unl.edu/ Also, the people within the DH community who are most interested in XML from a theoretical perspective can usually be found at the Balisage meetings: http://www. . . . Read full entry » why do you care what other people think ? (fwd)Posted 5/20/2013 7:09:35 AMJim, The best two websites for general information on DH organizations/events are probably: http://adho.org/ http://dh2013.unl.edu/ Also, the people within the DH community who are most interested in XML from a theoretical perspective can usually be found at the Balisage meetings: http://www. . . . Read full entry » why do you care what other people think ?Posted 5/20/2013 7:08:04 AMJim, The best two websites for general information on DH organizations/events are probably: http://adho.org/ http://dh2013.unl.edu/ Also, the people within the DH community who are most interested in XML from a theoretical perspective can usually be found at the Balisage meetings: http://www. . . . Read full entry » why do you care what other people think ?Posted 5/20/2013 7:08:04 AMJim, The best two websites for general information on DH organizations/events are probably: http://adho.org/ http://dh2013.unl.edu/ Also, the people within the DH community who are most interested in XML from a theoretical perspective can usually be found at the Balisage meetings: http://www. . . . Read full entry » why do you care what other people think ?Posted 5/20/2013 6:58:37 AMHello David, On Mon, May 20, 2013 at 3:46 PM, David Sewell <http://x-query.com/mailman/listinfo/talk> wrote: ... > the oXygen editor/IDE). Even if the community of users is small by > comparison with Javascript or Perl or whatever, the impact of projects that > rely on XQuery is, I . . . Read full entry » why do you care what other people think ?Posted 5/20/2013 6:58:37 AMHello David, On Mon, May 20, 2013 at 3:46 PM, David Sewell <http://x-query.com/mailman/listinfo/talk> wrote: ... > the oXygen editor/IDE). Even if the community of users is small by > comparison with Javascript or Perl or whatever, the impact of projects that > rely on XQuery is, I . . . Read full entry » why do you care what other people think ?Posted 5/20/2013 6:46:57 AMOn Sat, 18 May 2013, James Fuller wrote: > Uche Ogbuji reminded us at last XML Prague to reach out to the digital > humanities folks ... and I think this is an especially relevant group > of people we should be trying to engage; librarians love this little > language. Speaking as some . . . Read full entry » why do you care what other people think ?Posted 5/20/2013 6:46:57 AMOn Sat, 18 May 2013, James Fuller wrote: > Uche Ogbuji reminded us at last XML Prague to reach out to the digital > humanities folks ... and I think this is an especially relevant group > of people we should be trying to engage; librarians love this little > language. Speaking as some . . . Read full entry » why do you care what other people think ?Posted 5/17/2013 11:42:10 PMOn Sat, May 18, 2013 at 2:32 AM, daniela florescu <http://x-query.com/mailman/listinfo/talk> wrote: > I have to apologize on this mailing list first for completely scaring one of > potential XQuery's customers a couple of days back. > (he never answered back... oups... I will always . . . Read full entry » why do you care what other people think ?Posted 5/17/2013 11:42:10 PMOn Sat, May 18, 2013 at 2:32 AM, daniela florescu <http://x-query.com/mailman/listinfo/talk> wrote: > I have to apologize on this mailing list first for completely scaring one of > potential XQuery's customers a couple of days back. > (he never answered back... oups... I will always . . . Read full entry » Is it possible to maintain a list of value in XQueryPosted 5/16/2013 5:56:41 AMOn 05/16/2013 08:20 AM, David Lee wrote: > ----------- > > This is the "Promised Land of Milk and Honey" that I have been told about ... > > Look at what has been achieved with Java byte compilation, or -- Javascript to ASM ! -- who would have expected that in 1995? W . . . Read full entry » Is it possible to maintain a list of value in XQueryPosted 5/16/2013 5:56:41 AMOn 05/16/2013 08:20 AM, David Lee wrote: > ----------- > > This is the "Promised Land of Milk and Honey" that I have been told about ... > > Look at what has been achieved with Java byte compilation, or -- Javascript to ASM ! -- who would have expected that in 1995? W . . . Read full entry » Is it possible to maintain a list of value in XQueryPosted 5/16/2013 5:37:10 AMStop thinking like you only have one tool in your toolbox! Would you use a pliers to drive in a screw? I use many languages and XQuery is one of them. Each language has its strengths and weaknesses. Sent from my iPhone On May 16, 2013, at 7:20 AM, David Lee <http://x-query.com/mailman/listi . . . Read full entry » Is it possible to maintain a list of value in XQueryPosted 5/16/2013 5:37:10 AMStop thinking like you only have one tool in your toolbox! Would you use a pliers to drive in a screw? I use many languages and XQuery is one of them. Each language has its strengths and weaknesses. Sent from my iPhone On May 16, 2013, at 7:20 AM, David Lee <http://x-query.com/mailman/listi . . . Read full entry » Is it possible to maintain a list of value in XQueryPosted 5/16/2013 5:20:26 AM>>> Liam I'm not sure I'm failing to follow you incorrectly here. ------ Someone is failing somethign :)_ Yes, declarative languages, especially with referential transparency, are often massively easier to optimize than procedural ones. Or rather, the computer science and mathematics mi . . . Read full entry » Is it possible to maintain a list of value in XQueryPosted 5/16/2013 5:20:26 AM>>> Liam I'm not sure I'm failing to follow you incorrectly here. ------ Someone is failing somethign :)_ Yes, declarative languages, especially with referential transparency, are often massively easier to optimize than procedural ones. Or rather, the computer science and mathematics mi . . . Read full entry » Is it possible to maintain a list of value in XQueryPosted 5/16/2013 2:21:34 AM> Could you elaborate on the bigger picture? Are you running through a pile of > data, trying to accumulate information along the way, and want to use that > afterwards? Or is it something entirely different that you are trying to > achieve? It sounds like they want the equivalent of a . . . Read full entry » Is it possible to maintain a list of value in XQueryPosted 5/16/2013 2:21:34 AM> Could you elaborate on the bigger picture? Are you running through a pile of > data, trying to accumulate information along the way, and want to use that > afterwards? Or is it something entirely different that you are trying to > achieve? It sounds like they want the equivalent of a . . . Read full entry » Is it possible to maintain a list of value in XQueryPosted 5/15/2013 10:39:09 PMOn May 15, 2013, at 9:39 PM, Liam R E Quin wrote: > On Thu, 2013-05-16 at 00:22 +0000, David Lee wrote: >> I still am unconvinced that the theory that a purely functional >> language would enable vastly better optimizations >> has yet to be realized in the real world and may . . . Read full entry » Is it possible to maintain a list of value in XQueryPosted 5/15/2013 10:39:09 PMOn May 15, 2013, at 9:39 PM, Liam R E Quin wrote: > On Thu, 2013-05-16 at 00:22 +0000, David Lee wrote: >> I still am unconvinced that the theory that a purely functional >> language would enable vastly better optimizations >> has yet to be realized in the real world and may . . . Read full entry » Is it possible to maintain a list of value in XQueryPosted 5/15/2013 9:39:42 PMOn Thu, 2013-05-16 at 00:22 +0000, David Lee wrote: > I still am unconvinced that the theory that a purely functional > language would enable vastly better optimizations > has yet to be realized in the real world and may never be. I'm not sure I'm failing to follow you incorrectly here. . . . Read full entry » Is it possible to maintain a list of value in XQueryPosted 5/15/2013 9:39:42 PMOn Thu, 2013-05-16 at 00:22 +0000, David Lee wrote: > I still am unconvinced that the theory that a purely functional > language would enable vastly better optimizations > has yet to be realized in the real world and may never be. I'm not sure I'm failing to follow you incorrectly here. . . . Read full entry » Is it possible to maintain a list of value in XQueryPosted 5/15/2013 5:22:57 PMI still am unconvinced that the theory that a purely functional language would enable vastly better optimizations has yet to be realized in the real world and may never be. It sounds good, and looks good on paper ... And maybe someday a genius will make it so ... and teach us peons how to do it . . . Read full entry » Is it possible to maintain a list of value in XQueryPosted 5/15/2013 5:22:57 PMI still am unconvinced that the theory that a purely functional language would enable vastly better optimizations has yet to be realized in the real world and may never be. It sounds good, and looks good on paper ... And maybe someday a genius will make it so ... and teach us peons how to do it . . . Read full entry » Is it possible to maintain a list of value in XQueryPosted 5/15/2013 5:21:14 PMOn Wed, 2013-05-15 at 23:53 +0000, Eric Bloch wrote: > > > > > Maybe the long term answer is XQuery extensions to JavaScript. > > > > Are you suggesting a resurrection of E4X? I wasn't, at least not directly, although E4X isn't as dead as you might think (e.g. it's i . . . Read full entry » Is it possible to maintain a list of value in XQueryPosted 5/15/2013 5:21:14 PMOn Wed, 2013-05-15 at 23:53 +0000, Eric Bloch wrote: > > > > > Maybe the long term answer is XQuery extensions to JavaScript. > > > > Are you suggesting a resurrection of E4X? I wasn't, at least not directly, although E4X isn't as dead as you might think (e.g. it's i . . . Read full entry » Is it possible to maintain a list of value in XQueryPosted 5/15/2013 4:53:46 PM> > Maybe the long term answer is XQuery extensions to JavaScript. > Are you suggesting a resurrection of E4X? . . . Read full entry » Is it possible to maintain a list of value in XQueryPosted 5/15/2013 4:53:46 PM> > Maybe the long term answer is XQuery extensions to JavaScript. > Are you suggesting a resurrection of E4X? . . . Read full entry » Is it possible to maintain a list of value in XQueryPosted 5/15/2013 4:25:25 PMOn Wed, 2013-05-15 at 23:10 +0000, David Lee wrote: [...] > I boldly propose that perhaps as a group we step back and get off our > high horse and admit that some procedural aspects to XML processing > be embraced instead of hidden in the dark corners of "vendor > implementations& . . . Read full entry » Is it possible to maintain a list of value in XQueryPosted 5/15/2013 4:25:25 PMOn Wed, 2013-05-15 at 23:10 +0000, David Lee wrote: [...] > I boldly propose that perhaps as a group we step back and get off our > high horse and admit that some procedural aspects to XML processing > be embraced instead of hidden in the dark corners of "vendor > implementations& . . . Read full entry » Is it possible to maintain a list of value in XQueryPosted 5/15/2013 1:32:04 PMOn May 15, 2013, at 1:05 PM, David Lee wrote: > Wow ... I really hoped our ivory tower was immune from personal attacks.... what's up with today a full moon crossing mars? I just said the code is ugly and potentially slow. I am attacking the coding style, not the author. (and BTW, given the . . . Read full entry » Is it possible to maintain a list of value in XQueryPosted 5/15/2013 1:32:04 PMOn May 15, 2013, at 1:05 PM, David Lee wrote: > Wow ... I really hoped our ivory tower was immune from personal attacks.... what's up with today a full moon crossing mars? I just said the code is ugly and potentially slow. I am attacking the coding style, not the author. (and BTW, given the . . . Read full entry » Is it possible to maintain a list of value in XQueryPosted 5/15/2013 1:12:08 PMMaps will most probably be added to XQuery 3.1, but there are already some implementations available (e.g. check out Saxon [1] BaseX [2], or eXist-db [3]). Note that the exact map syntax is still subject to change. [1] http://www.saxonica.com/documentation/index.html#!expressions/xpath30maps [2] h . . . Read full entry » Is it possible to maintain a list of value in XQueryPosted 5/15/2013 1:12:08 PMMaps will most probably be added to XQuery 3.1, but there are already some implementations available (e.g. check out Saxon [1] BaseX [2], or eXist-db [3]). Note that the exact map syntax is still subject to change. [1] http://www.saxonica.com/documentation/index.html#!expressions/xpath30maps [2] h . . . Read full entry » Is it possible to maintain a list of value in XQueryPosted 5/15/2013 1:05:53 PMWow ... I really hoped our ivory tower was immune from personal attacks.... what's up with today a full moon crossing mars? If *anyone* on this list, or the entire world for that matter, knows about program optimization I would put Mike at the top of the list, higher than anyone I know personally a . . . Read full entry » Is it possible to maintain a list of value in XQueryPosted 5/15/2013 1:05:53 PMWow ... I really hoped our ivory tower was immune from personal attacks.... what's up with today a full moon crossing mars? If *anyone* on this list, or the entire world for that matter, knows about program optimization I would put Mike at the top of the list, higher than anyone I know personally a . . . Read full entry » Is it possible to maintain a list of value in XQueryPosted 5/15/2013 12:42:20 PMSure they will be in XQuery 3.0 On 15 May 2013 20:38, "David Lee" <http://x-query.com/mailman/listinfo/talk> wrote: > Has maps actually made it into xquery 3? I thought they were xslt only so > far > > Sent from my iPhone > > On May 15, 2013, at 3:27 PM, "Mi . . . Read full entry » Is it possible to maintain a list of value in XQueryPosted 5/15/2013 12:42:20 PMSure they will be in XQuery 3.0 On 15 May 2013 20:38, "David Lee" <http://x-query.com/mailman/listinfo/talk> wrote: > Has maps actually made it into xquery 3? I thought they were xslt only so > far > > Sent from my iPhone > > On May 15, 2013, at 3:27 PM, "Mi . . . Read full entry » Is it possible to maintain a list of value in XQueryPosted 5/15/2013 12:36:40 PMHas maps actually made it into xquery 3? I thought they were xslt only so far Sent from my iPhone On May 15, 2013, at 3:27 PM, "Michael Sokolov" <http://x-query.com/mailman/listinfo/talk> wrote: > On 5/15/2013 10:47 AM, Kunal Chauhan wrote: >> Hi, >> >> I w . . . Read full entry » Is it possible to maintain a list of value in XQueryPosted 5/15/2013 12:36:40 PMHas maps actually made it into xquery 3? I thought they were xslt only so far Sent from my iPhone On May 15, 2013, at 3:27 PM, "Michael Sokolov" <http://x-query.com/mailman/listinfo/talk> wrote: > On 5/15/2013 10:47 AM, Kunal Chauhan wrote: >> Hi, >> >> I w . . . Read full entry » Is it possible to maintain a list of value in XQueryPosted 5/15/2013 12:26:22 PMOn 5/15/2013 10:47 AM, Kunal Chauhan wrote: > Hi, > > I want to maintain a list of value. > > for eg: > initially I have blank list and through some process I add values in > to the list. > > like (Apple,Banana,Cherry) > > now, when get Apple as an output 2nd time . . . Read full entry » Is it possible to maintain a list of value in XQueryPosted 5/15/2013 12:26:22 PMOn 5/15/2013 10:47 AM, Kunal Chauhan wrote: > Hi, > > I want to maintain a list of value. > > for eg: > initially I have blank list and through some process I add values in > to the list. > > like (Apple,Banana,Cherry) > > now, when get Apple as an output 2nd time . . . Read full entry » Is it possible to maintain a list of value in XQueryPosted 5/15/2013 11:23:42 AM> > No, if you are horrified by the inefficiency of this code then switch to an XQuery processor with a decent optimizer. You know, Michael, I would mellow down a little bit if I were you. Or at least try some benchmarks before hand (I did, and the results might surprise you ). If you can . . . Read full entry » Is it possible to maintain a list of value in XQueryPosted 5/15/2013 11:23:42 AM> > No, if you are horrified by the inefficiency of this code then switch to an XQuery processor with a decent optimizer. You know, Michael, I would mellow down a little bit if I were you. Or at least try some benchmarks before hand (I did, and the results might surprise you ). If you can . . . Read full entry » Fuctions and variables in replacement string of fn:replace()Posted 5/1/2013 6:43:00 AMThanks, Michael, for the clarification. I'm aware that fn:analyze-string is (with XPath 3.0) the right tool for this kind of job, I was just confused about the extent to which fn:replace() was capable of being a poor-man's equivalent. The answer then is "not much". David On Wed, 1 Ma . . . Read full entry » Fuctions and variables in replacement string of fn:replace()Posted 5/1/2013 6:43:00 AMThanks, Michael, for the clarification. I'm aware that fn:analyze-string is (with XPath 3.0) the right tool for this kind of job, I was just confused about the extent to which fn:replace() was capable of being a poor-man's equivalent. The answer then is "not much". David On Wed, 1 Ma . . . Read full entry » Fuctions and variables in replacement string of fn:replace()Posted 5/1/2013 1:32:38 AMOr switch to xsl:analyze-string.. ;-) > -----Oorspronkelijk bericht----- > Van: http://x-query.com/mailman/listinfo/talk [mailto:http://x-query.com/mailman/listinfo/talk] > Namens Michael Kay > Verzonden: woensdag 1 mei 2013 10:02 > Aan: http://x-query.com/mailman/listinfo/talk > . . . Read full entry » Fuctions and variables in replacement string of fn:replace()Posted 5/1/2013 1:32:38 AMOr switch to xsl:analyze-string.. ;-) > -----Oorspronkelijk bericht----- > Van: http://x-query.com/mailman/listinfo/talk [mailto:http://x-query.com/mailman/listinfo/talk] > Namens Michael Kay > Verzonden: woensdag 1 mei 2013 10:02 > Aan: http://x-query.com/mailman/listinfo/talk > . . . Read full entry » Fuctions and variables in replacement string of fn:replace()Posted 5/1/2013 1:02:07 AMOn 1 May 2013, at 04:14, Liam R E Quin wrote: > On Tue, 2013-04-30 at 23:01 -0400, David Sewell wrote: >> When using fn:replace(), is it kosher or illegal to construct the >> replacement string dynamically using a function? Yes. XQuery is an orthogonal language, any expression can . . . Read full entry » Fuctions and variables in replacement string of fn:replace()Posted 5/1/2013 1:02:07 AMOn 1 May 2013, at 04:14, Liam R E Quin wrote: > On Tue, 2013-04-30 at 23:01 -0400, David Sewell wrote: >> When using fn:replace(), is it kosher or illegal to construct the >> replacement string dynamically using a function? Yes. XQuery is an orthogonal language, any expression can . . . Read full entry » Fuctions and variables in replacement string of fn:replace()Posted 4/30/2013 8:14:27 PMOn Tue, 2013-04-30 at 23:01 -0400, David Sewell wrote: > When using fn:replace(), is it kosher or illegal to construct the > replacement string dynamically using a function? In some cases this > seems to work (tested in Saxon and MarkLogic): > > xquery version "1.0"; > . . . Read full entry » Fuctions and variables in replacement string of fn:replace()Posted 4/30/2013 8:14:27 PMOn Tue, 2013-04-30 at 23:01 -0400, David Sewell wrote: > When using fn:replace(), is it kosher or illegal to construct the > replacement string dynamically using a function? In some cases this > seems to work (tested in Saxon and MarkLogic): > > xquery version "1.0"; > . . . Read full entry » Fuctions and variables in replacement string of fn:replace()Posted 4/30/2013 8:01:01 PMWhen using fn:replace(), is it kosher or illegal to construct the replacement string dynamically using a function? In some cases this seems to work (tested in Saxon and MarkLogic): xquery version "1.0"; let $string := "Now, let's SEND OUT for QUICHE!!" let $match := "[A-Z] . . . Read full entry » Fuctions and variables in replacement string of fn:replace()Posted 4/30/2013 8:01:01 PMWhen using fn:replace(), is it kosher or illegal to construct the replacement string dynamically using a function? In some cases this seems to work (tested in Saxon and MarkLogic): xquery version "1.0"; let $string := "Now, let's SEND OUT for QUICHE!!" let $match := "[A-Z] . . . Read full entry » Xquery and API documentationPosted 4/24/2013 6:21:51 AMHi Jakob, I also recently saw Swagger and was very impressed and was considering doing something with it at some point. The XQuery 3.0 annotations for defining a REST API are known as RESTXQ. If the platform you are using supports RESTXQ and introspection, then you could probably quite easily wr . . . Read full entry » Xquery and API documentationPosted 4/24/2013 6:21:51 AMHi Jakob, I also recently saw Swagger and was very impressed and was considering doing something with it at some point. The XQuery 3.0 annotations for defining a REST API are known as RESTXQ. If the platform you are using supports RESTXQ and introspection, then you could probably quite easily wr . . . Read full entry » Xquery and API documentationPosted 4/24/2013 5:57:55 AMTry xquerydoc, which can extract XQDoc comments and style them in HTML and markdown. It's written in pure XQuery 1.0, with a small amount of XProc to drive the initial execution. https://github.com/xquery/xquerydoc John On 24 Apr 2013, at 13:40, Jakob Fix <http://x-query.com/mailman/listinfo/ . . . Read full entry » Xquery and API documentationPosted 4/24/2013 5:57:55 AMTry xquerydoc, which can extract XQDoc comments and style them in HTML and markdown. It's written in pure XQuery 1.0, with a small amount of XProc to drive the initial execution. https://github.com/xquery/xquerydoc John On 24 Apr 2013, at 13:40, Jakob Fix <http://x-query.com/mailman/listinfo/ . . . Read full entry » Need xquery function for "number of days between two dates"Posted 4/12/2013 10:25:01 AMsudheshna iyer wrote: > I need a xquery function which takes two dates and return number of days > that lapsed between these two dates. Input to this function can be a 2 > strings of type "mm/dd/yyyy 00:00:00". > > Can any of you have a function handy to do this? Well the . . . Read full entry » Need xquery function for "number of days between two dates"Posted 4/12/2013 10:25:01 AMsudheshna iyer wrote: > I need a xquery function which takes two dates and return number of days > that lapsed between these two dates. Input to this function can be a 2 > strings of type "mm/dd/yyyy 00:00:00". > > Can any of you have a function handy to do this? Well the . . . Read full entry » XQuery Update vs. PerlPosted 4/4/2013 8:12:40 PMOK, I figured out how to do most of it: copy $c := doc("zaokeng.kml") modify ( for $d in $c//*:Point return insert node ( <extrude>1</extrude>, <altitudeMode>relativeToGround</altitudeMode> ) before $d/*:coordinates ) return $c As far as inserting thing . . . Read full entry » XQuery Update vs. PerlPosted 4/4/2013 4:04:41 AMGentlemen, though I read http://docs.basex.org/wiki/XQuery_Update http://docs.oracle.com/cd/E17276_01/html/gsg_xml/cxx/modifydocument.html it seems nothing can beat #!/usr/bin/perl while(<>){ s!<Point>!$&<extrude>1</extrude><altitudeMode>relativeToGround</al . . . Read full entry » First draft of the Web Application specPosted 4/3/2013 10:54:01 AMHi, I thought you might be interested in the following announce, as it is about a spec for writing XQuery main modules and libraries (among other technologies) to implement server-side response to HTTP requests. Regards, -- Florent Georges http://fgeorges.org/ http://h2ocon . . . Read full entry » let's comment out a line in XQueryPosted 4/2/2013 10:28:19 AMMS> IIRC he's all het up about {} ... Yes something like that. Anyway there's no point in discussing it again. I just want to say "doctors have proven that the most one can remember is (: and :)." . . . Read full entry » let's comment out a line in XQueryPosted 4/2/2013 10:27:12 AMXQuery comments are (: trivial :) Where exactly they work is complicated ... until you understand XQuery then its trivial. ---------------------------------------- David A. Lee http://x-query.com/mailman/listinfo/talk http://www.xmlsh.org -----Original Message----- From: http://x-query.com/mai . . . Read full entry » let's comment out a line in XQueryPosted 4/2/2013 10:23:24 AMOn 04/02/2013 01:34 PM, Florent Georges wrote: > http://x-query.com/mailman/listinfo/talk wrote: > > >> there is no way for me to remember the xquery complex full >> comment syntax for more than one month. >> > The "smiley syntax", complex? Real . . . Read full entry » let's comment out a line in XQueryPosted 4/2/2013 9:34:13 AMhttp://x-query.com/mailman/listinfo/talk wrote: > there is no way for me to remember the xquery complex full > comment syntax for more than one month. The "smiley syntax", complex? Really? -- Florent Georges http://fgeorges.org/ http://h2oconsulting.be/ . . . Read full entry » let's comment out a line in XQueryPosted 4/1/2013 9:20:04 PMI'm back, and it's proven!: there is no way for me to remember the xquery complex full comment syntax for more than one month. Solution. put comments into a separate file. OK. . . . Read full entry » where clausePosted 3/28/2013 11:54:06 PMIt's not just the WHERE clause, of course: ORDER BY and GROUP BY also affect the strategy. In XQuery 1.0 nearly every FLWOR expression could be rewritten as an expression on sequences of items (rather than tuples). The only exception was a rather weird and rare case involving ORDER BY where the or . . . Read full entry » where clausePosted 3/28/2013 11:35:38 PMOn Wed, 2013-03-27 at 13:26 +0000, deBakker, Bas wrote: > Wouldn't that be equivalent to > > for $a in expr1, $b in expr2, $c in expr3[$a = $b + .] > return $a I notice that BaseX does exactly that rewrite. In SQL with a WHERE clause some of the values may be NULL, but that . . . Read full entry » where clausePosted 3/28/2013 11:08:13 AMI see - nice! Still trying to wrap my head around it to generalize, but I see your point. -Mike On 03/28/2013 02:22 PM, daniela florescu wrote: > Not in the general case of such pattern -- because of cardinality. > (I told you XQuery is twisted :-) > > Imagine that the function woul . . . Read full entry » where clausePosted 3/28/2013 10:22:08 AMNot in the general case of such pattern -- because of cardinality. (I told you XQuery is twisted :-) Imagine that the function would have looked like this instead of the one I wrote: declare function foo($x) { if ($x/@a) then ($x, $x) else <b/> }; then count(...) of the total result . . . Read full entry » where clausePosted 3/28/2013 10:15:20 AMOn 03/28/2013 12:23 PM, daniela florescu wrote: > Michael, > > in addition to the queries I already gave you with count and groupby, here is another one in > pure XQuery 1.0 that cannot be reduced > > declare function foo($x) > { > if ($x/@a) then $x else<b/> &g . . . Read full entry » where clausePosted 3/28/2013 8:23:02 AMMichael, in addition to the queries I already gave you with count and groupby, here is another one in pure XQuery 1.0 that cannot be reduced declare function foo($x) { if ($x/@a) then $x else <b/> }; for $x in Blah1 for $y in Blah2 let $z := foo($y) where $z is $z return $x (var . . . Read full entry » [ANN] Pascal XQuery 1 engine now with JSONiqPosted 3/28/2013 4:15:50 AMHi, there is now a new release of my Pascal-based XQuery engine which adds JSONiq support. (not JSONiq Update through, but there is an old global variable extension, which can be used to update some (but not all) object properties without involving snapshots ) The XQuery part supports everythin . . . Read full entry » Fwd: Re: where clausePosted 3/27/2013 6:10:35 PM(forwarding Daniela's message) Michael, I think the ones with grouby and a where after the groupby are impossible to rewrite in general (remember this from my optimizing SQL days). In this case the WHERE is the good old HAVING clause of SQL. Something along the lines of for $x in blah for $y in . . . Read full entry » where clausePosted 3/27/2013 5:09:58 PMOn 3/27/13 8:31 AM, Michael Sokolov wrote: > I'm trying to come up with examples in which "where" clauses cannot be > rewritten as XPath predicates. So far, the ones I have all involve an > "at" counter. Are there others? > OK - thanks, Ken, Michael, Daniela - I' . . . Read full entry » where clausePosted 3/27/2013 2:43:28 PMOn 27/03/2013 12:31, Michael Sokolov wrote: > I'm trying to come up with examples in which "where" clauses cannot be > rewritten as XPath predicates. So far, the ones I have all involve an > "at" counter. Are there others? > The ones that are trickiest to rewrit . . . Read full entry » where clausePosted 3/27/2013 7:01:31 AMAt 2013-03-27 13:26 +0000, deBakker, Bas wrote: >Wouldn't that be equivalent to > > for $a in expr1, $b in expr2, $c in expr3[$a = $b + .] > return $a Thank you, Bas, yes I grant that your expression is equivalent to mine. I failed to acknowledge that tuples are only created w . . . Read full entry » where clausePosted 3/27/2013 5:26:52 AMWouldn't that be equivalent to for $a in expr1, $b in expr2, $c in expr3[$a = $b + .] return $a Bas -----Original Message----- From: http://x-query.com/mailman/listinfo/talk [mailto:http://x-query.com/mailman/listinfo/talk] On Behalf Of G. Ken Holman Sent: Wednesday, March 27, 2013 14:19 . . . Read full entry » where clausePosted 3/27/2013 5:18:41 AMAt 2013-03-27 08:31 -0400, Michael Sokolov wrote: >I'm trying to come up with examples in which "where" clauses cannot >be rewritten as XPath predicates. So far, the ones I have all >involve an "at" counter. Are there others? I can see no difference off hand when c . . . Read full entry » where clausePosted 3/27/2013 4:31:40 AMI'm trying to come up with examples in which "where" clauses cannot be rewritten as XPath predicates. So far, the ones I have all involve an "at" counter. Are there others? -- Michael Sokolov Senior Architect Safari Books Online . . . Read full entry » XQuery 3.0 test suite - Call for implementations of XQuery 3Posted 3/10/2013 11:01:57 AMLiam, thanks for the reminder! We are working on the finalization of XQuery 3.0, and we will submit our results as soon as we are approximating 100%. Yoshi OKAMOTO san: our implementation of format-integer() still needs to be adjusted to the latest version of the specification. I can just confirm . . . Read full entry » XQuery 3.0: formatting integersPosted 3/10/2013 10:08:22 AMThere has been quite a bit of tightening up of the format-integer specification over successive drafts. The Candidate Recommendation says this: If the primary format token contains at least one Unicode digit then it is taken as a decimal digit pattern, and in this case it must match the regula . . . Read full entry » XQuery 3.0 test suite - Call for implementations of XQuery 3Posted 3/10/2013 9:23:42 AMThe XQuery 3.0 specification is currently a W3C "Candidate Recommendation", meaning we (W3C) are waiting to know that it can be implemented by multiple people such that people can move queries from one implementation to another reasonably easily. If you have made an XQuery 3 implementati . . . Read full entry » XQuery 3.0: formatting integers (2)Posted 3/10/2013 9:11:19 AMOn Sun, 2013-03-10 at 16:43 +0000, Yoshi Okamoto wrote: > Dear readers (2), > > my impression is that it may be too early to test fn:format-integer(), > because the returned values of all implementations I have tested so > far seem to remain unpredictable. It might mean that our te . . . Read full entry » XQuery 3.0: formatting integers (2)Posted 3/10/2013 8:43:51 AMDear readers (2), my impression is that it may be too early to test fn:format-integer(), because the returned values of all implementations I have tested so far seem to remain unpredictable. Indeed, I believe I have managed to bring the tested implementations together in all possible combinations! . . . Read full entry » XQuery 3.0: formatting integersPosted 3/10/2013 7:31:52 AMDear readers, I have a question regarding the new fn:format-integer() function of XQuery. I noticed that the implementations I tried give me different results for various queries. This is one example: format-integer(-1, '#####12.3') The results are: * Saxon: -0.0.1 * BaseX, XMLPrime: - . . . Read full entry » [ANN] BaseX 7.6: The XMLPrague EditionPosted 2/5/2013 1:24:12 PMHi all, we are excited to announce Version 7.6 of BaseX, which provides some fresh new features that will further boost your productivity: DATABASE LOCKING: - updates on different databases can now be executed in parallel and won't lock your read-only queries anymore: http://docs.basex.org/wi . . . Read full entry » Looking for an example - calling XQuery 3.0 function module from XSLT 3.0Posted 2/4/2013 1:23:15 AMHere's a very simple test case from my test suite (though it uses XSLT 2.0 and XQuery 1.0): test.xsl <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0" xmlns:saxon="http://saxon.sf.net/" xmlns:qf="library.uri"> <xsl:t . . . Read full entry » Looking for an example - calling XQuery 3.0 function module from XSLT 3.0Posted 2/1/2013 7:10:09 AMHello folks, I am playing with the latest version of Saxon from Saxonica and am looking for an example of calling a function from an XQuery 3.0 function module from XSLT 3.0. Has anyone out there done this yet? Thanks, Loren . . . Read full entry » XQuery file naming conventions (xq, xqy, xql, xqm, xquery, etc.)Posted 1/22/2013 3:35:50 PMMaybe its Xquery Update... whatever that would mean standalone?!? On 22 January 2013 23:21, Joe Wicentowski <http://x-query.com/mailman/listinfo/talk> wrote: > Hi all, > > I just noticed a new one: .xu. This extension appears in oXygen's > File > Save dialog in Windows when y . . . Read full entry » XQuery file naming conventions (xq, xqy, xql, xqm, xquery, etc.)Posted 1/22/2013 3:21:24 PMHi all, I just noticed a new one: .xu. This extension appears in oXygen's File > Save dialog in Windows when you are saving an XQuery file: Save as type: XQUERY, XQ, XQL, XQM, XQY, XU Hadn't seen that one before. What could it mean? XUpdate? But XUpdate isn't XQuery... Maybe we should . . . Read full entry » treat asPosted 1/21/2013 10:59:26 AMDavid - I've run across them in a somewhat obscure context, I guess. I've written an XQuery processor that rewrites queries originally parsed by Saxon, basically serializing them in the process. All I can tell you is that Saxon generates an internal expression (ItemChecker) that is documented . . . Read full entry » Conditional use of fn:error() ?Posted 1/21/2013 3:45:56 AMDear Michael Kay, this was a quick and excellent reply, which answered all my open questions. Best regards Yoshi OKAMOTO ----- Original Message ----- From: Michael Kay <http://x-query.com/mailman/listinfo/talk> To: http://x-query.com/mailman/listinfo/talk Cc: Sent: Monday, January . . . Read full entry » Conditional use of fn:error() ?Posted 1/21/2013 3:24:09 AMFor all these queries, implementations have the option whether to evaluate the base expression (error()) before or after evaluating the predicate. If the value of a predicate doesn't depend on the focus, rewriting A[B] as "if (B) then A else ()" is a good thing to do, so many process . . . Read full entry » Conditional use of fn:error() ?Posted 1/21/2013 3:07:36 AMDear list subscribers, I noticed that different XQuery processors (BaseX, Saxon, XMLPrime, Zorba) return different results for the following queries: Query A: fn:error()[false()] Query B: error(())[contains('http://....', 'details')] Query C: let $url := <url>. . . . Read full entry » XQuery file naming conventions (xq, xqy, xql, xqm, xquery, etc.)Posted 1/11/2013 1:55:33 PMThanks to all for your responses! There's merit in all of the approaches that were shared. I'm sympathetic to the idea that we shouldn't have to use file extensions to distinguish between library and main modules. Maybe ".xq" (or ".xquery") across the board makes sense. One . . . Read full entry » XQuery file naming conventions (xq, xqy, xql, xqm, xquery, etc.)Posted 1/8/2013 4:29:59 AM>>However, I would note that David's suggestion to use .x could be >>problematic. As .x is already used for DirectX model files. FYI: this was a "Reductio ad Absurdum" joke ... Back in "The Old Days" on mainframe type systems files had actual "types" inde . . . Read full entry » XQuery file naming conventions (xq, xqy, xql, xqm, xquery, etc.)Posted 1/8/2013 1:19:49 AMJoe, I currently do the opposite to you, I adopted this because some eXist folks were doing it before me. i.e. .xql for main modules (XQuery Language) and .xqm for library modules (XQuery Module). However now I think about it, it does not make as much sense as your proposal of reversing it. I t . . . Read full entry » XQuery file naming conventions (xq, xqy, xql, xqm, xquery, etc.)Posted 1/7/2013 1:49:44 PMHi Joe, in BaseX, .xq is used for main modules and .xqm for library modules (including RESTXQ modules). The main motivation for this was similar to yours: .xq is short, there was some need to distinguish between main and library modules, and there was no convention what would be the best choice. . . . Read full entry » XQuery file naming conventions (xq, xqy, xql, xqm, xquery, etc.)Posted 1/7/2013 1:43:19 PMMy opinion. First, just like C and Java etc ... I dont see a need to seperate Libraries and Modules and Mains with extensions. The extension (should, IMHO) apply to the source language not to the use its applied. A single extension should do, and its main job is to load the right editor (for GUI . . . Read full entry » XQuery file naming conventions (xq, xqy, xql, xqm, xquery, etc.)Posted 1/7/2013 1:33:22 PMHi all, There is quite a profusion of file extensions for XQuery: .xq, .xqy, .xql, .xqm, and .xquery. Perhaps this profusion has happened the spec doesn't say anything about the file extensions. This has opened up the choice to each implementation and each community/project. I'd be interested t . . . Read full entry » Basex: using all of -i, -c and -qPosted 12/27/2012 2:03:59 AMI tried to use all of -i, -c, and -q, but in the end the only thing for me that worked was $ basex -q 'declare option db:parser "html"; doc("bla.html")' so maybe it is not possible. P.S., I tried to send this to the right list, alas, <http://x-query.com/mailman/listinfo/tal . . . Read full entry » let's comment out a line in XQueryPosted 12/22/2012 3:09:58 PM>>>>> "MK" == Michael Kay <mike-JkSD5nQpfvpWk0Htik3J/http://x-query.com/mailman/listinfo/talk> writes: MK> The use of /text() in this way is generally a bad habit. Thanks! I removed them and my program worked just as fine! (Not Cc'd so didn't notice your comment . . . Read full entry » Join my network on LinkedInPosted 12/21/2012 3:39:06 PMLinkedIn ------------ Christian Grün has indicated you are a Friend ------------------------------------------ Since you are a person I trust, I wanted to invite you to join my network on LinkedIn. Accept invitation from Christia . . . Read full entry » let's comment out a line in XQueryPosted 12/21/2012 7:11:09 AMOn 12/21/2012 09:40 AM, David Lee wrote: > in XQuery > > declare function foo() {} > > is bad for precisely the same reason as functions *always* have a return type. > (no void). But what should it be ? > Again, empty-sequence() is the only logical choice. Better than a . . . Read full entry » [ANN] BaseX 7.5 -- The BaseXMas EditionPosted 12/21/2012 6:55:47 AMDear all, we are excited to announce the release of BaseX 7.5, aka the BaseXMas Edition: http://basex.org/downloads The latest features and changes are as follows: XQUERY UPDATE - bulk updates are now much faster than before - insert and replace operations take much less memory - databases ca . . . Read full entry » let's comment out a line in XQueryPosted 12/21/2012 6:49:53 AM... whether there is any good reason plain {} doesn't generate () (an empty sequence)? I'm not aware that the idea has ever been proposed and discussed in the WG. I've no idea whether it would find favour. Probably not; minor tweaking for minor usability benefits doesn't usually attract much e . . . Read full entry » let's comment out a line in XQueryPosted 12/21/2012 6:43:18 AMOn Fri, Dec 21, 2012 at 1:08 PM, Michael Sokolov <http://x-query.com/mailman/listinfo/talk> wrote: > On 12/20/2012 11:00 AM, Michael Kay wrote: >> >> >> Note that you haven't actually commented anything out. When you change the >> content of an element constructor f . . . Read full entry » let's comment out a line in XQueryPosted 12/21/2012 6:40:55 AM------------- Actually my compiler allows "void foo () { }" - why not? A function that does nothing could be very useful sometimes. "foo () { }" is bad because implicitly it is declared as returning int, yet does not return anything. ----------- Which is why I used as an . . . Read full entry » let's comment out a line in XQueryPosted 12/21/2012 6:38:09 AMOn 12/21/2012 09:32 AM, David Lee wrote: > ------------------ > I think this has been batted around here before, but would somebody mind > refreshing us as to whether there is any good reason plain {} doesn't > generate () (an empty sequence)? > --------------- > > If you wan . . . Read full entry » let's comment out a line in XQueryPosted 12/21/2012 6:32:28 AM------------------ I think this has been batted around here before, but would somebody mind refreshing us as to whether there is any good reason plain {} doesn't generate () (an empty sequence)? --------------- If you want historical rationality you will have to ask someone else. If you want d . . . Read full entry » let's comment out a line in XQueryPosted 12/21/2012 5:08:35 AMOn 12/20/2012 11:00 AM, Michael Kay wrote: > > Note that you haven't actually commented anything out. When you change > the content of an element constructor from > > <a> <b/> <c/> </a> > > to > > <a> (:<b/>:) <c/> </a> So . . . Read full entry » let's comment out a line in XQueryPosted 12/20/2012 8:47:05 AMOK, I will try various combinations of these in various situations. I just wish Google searches wouldn't always just come up with (: :) when in fact one often needs "the heavy pliers" instead. DL> its actually quite easy once you learn the syntax. I'm sure it must be, but I just want t . . . Read full entry » let's comment out a line in XQueryPosted 12/20/2012 8:25:33 AMSorry, you need to make a bit more room in your brain. The proper syntax is context specific. And I made a mistake in my example. double bad :) inside an element constructor you need this: <elem>{()(:comment:)}</elem> other places you use (: comment :) but realize that produce . . . Read full entry » let's comment out a line in XQueryPosted 12/20/2012 8:12:25 AMOK. In my brain (which only has room for one comment syntax per language) I will now try to remember {(: comment :)()} as the REAL XQuery comment syntax (the one that is guaranteed not to fail, the one that gets even tough stains out), and any simplifications thereof e.g., (: comment :) as mere sho . . . Read full entry » let's comment out a line in XQueryPosted 12/20/2012 8:00:09 AMYour problem is the call concat($f/*:Placemark[$c]//*:coordinates/text(), ... The first argument selects more than one text node, but the arguments to concat() must be single items. Note that you haven't actually commented anything out. When you change the content of an element constructor from . . . Read full entry » let's comment out a line in XQueryPosted 12/20/2012 7:47:05 AMAs per the mailing list archive link I sent yesterday. Use this to comment out data inside XML literal constructors <Point> { (: <coordinates> ALLOW ME TO COMMENT OUT THIS LINE</coordinates> :) } ... ---------------------------------------- David A. Lee http://x-query.co . . . Read full entry » let's comment out a line in XQueryPosted 12/20/2012 7:39:22 AMI don't have a Senior Secondary Certificate of Education :-) but here goes anyway. basex: Debian's 7.3-1. $ basex noise0.xq |wc Stopped at line 26, column 46 in /home/jidanni/mapping/kml/noise0.xq: [XPTY0004] Single item expected, ( ALLOW ME TO COMMENT OUT THIS LINE, ...) found. 0 0 . . . Read full entry » let's comment out a line in XQueryPosted 12/20/2012 4:19:55 AMArg so tired I can't copy/paste sorry http://markmail.org/thread/cd2nyugalcffjf3o -----Original Message----- From: http://x-query.com/mailman/listinfo/talk [mailto:http://x-query.com/mailman/listinfo/talk] On Behalf Of David Lee Sent: Thursday, December 20, 2012 7:18 AM To: Michael Kay; http://x- . . . Read full entry » let's comment out a line in XQueryPosted 12/20/2012 4:18:26 AMSince I am tired this morning :) Try perusing this tread for a lively discussion on XQuery comments arkmail.org/thread/cd2nyugalcffjf3o -----Original Message----- From: http://x-query.com/mailman/listinfo/talk [mailto:http://x-query.com/mailman/listinfo/talk] On Behalf Of Michael Kay Sent: Thurs . . . Read full entry » let's comment out a line in XQueryPosted 12/20/2012 12:29:33 AMClearly there are contexts in which commenting out a line of code will leave a query that is syntactically or semantically invalid. Why do you find this strange? Why do you expect us to be able to tell you why the remaining query throws an error, when you haven't shown us this query? Or is this . . . Read full entry » let's comment out a line in XQueryPosted 12/19/2012 11:41:05 PMHi jidanni, Your particular line does not cause an error here. Tried it with the BaseX live demo (online). Your query indicates it consists of at least 26 lines, could you provide the whole query, or even better an ssce? We are using comments in XQuery on a day to basis, so I hope you're only p . . . Read full entry » let's comment out a line in XQueryPosted 12/19/2012 9:45:37 PMGeez, all I wanted to do was comment out a line: (: <coordinates>120.865225,24.181802</coordinates> :) But now I have to make it (: 120.865225,24.181802 :) or else I get $ basex noise.xq > noise.kml Stopped at line 26, column 46 in /home/jidanni/mapping/kml/noise.xq: [XPTY0004] Singl . . . Read full entry » static error [err:XPST0051]: "xs:anySimpleType": not defined as atomic typePosted 12/19/2012 7:40:37 AMOn Wed, Dec 19, 2012 at 2:54 PM, Robby Pelssers <http://x-query.com/mailman/listinfo/talk> wrote: > Ok... > > I managed to get something working. But not sure if it is such a smart idea... Any comments from the experts? > > http://robbypelssers.blogspot.nl/2012/12/using-option . . . Read full entry » static error [err:XPST0051]: "xs:anySimpleType": not defined as atomic typePosted 12/19/2012 6:54:28 AMOk... I managed to get something working. But not sure if it is such a smart idea... Any comments from the experts? http://robbypelssers.blogspot.nl/2012/12/using-options-in-xquery.html Cheers, Robby -----Original Message----- From: Robby Pelssers Sent: Wednesday, December 19, 2012 3:21 PM T . . . Read full entry » static error [err:XPST0051]: "xs:anySimpleType": not defined as atomic typePosted 12/19/2012 6:21:21 AMHi all, I was experimenting a bit to make my code more robust but I don't fully understand why the code below complains about the local:getOrElse function. Can someone shed some light on this matter? Thx in advance, Robby (: Taken the same approach as Scala we return options which are either . . . Read full entry » The value does not conform to the lexical constraints defined for the xs:anyURI typePosted 12/19/2012 4:11:12 AM>> http://www.w3.org/2011/04/XMLSchema/TypeLibrary-IRI-RFC3987.xsd So the newest regex is the union of ((([A-Za-z])[A-Za-z0-9+\-\.]*):((//(((([A-Za-z0-9\-\._~ -豈-﷏ﷰ-- --ᖬ . . . Read full entry » The value does not conform to the lexical constraints defined for the xs:anyURI typePosted 12/19/2012 3:41:17 AMMichael Sperberg-McQueen has defined types that match different flavours of URI in http://www.w3.org/2011/04/XMLSchema/TypeLibrary-URI-RFC3986.xsd and http://www.w3.org/2011/04/XMLSchema/TypeLibrary-IRI-RFC3987.xsd To see the way these complex regular expressions are constructed, view these doc . . . Read full entry » The value does not conform to the lexical constraints defined for the xs:anyURI typePosted 12/19/2012 3:13:00 AMHi, btw. has anyone a regular expression matching exactly the allowed anyURIs of XSD 1.0? I tried to make one by translating the BNF in RFC 2396 and 2732 to regex, by having a regex for every token, and substituting them everywhere the token is used in the BNF. But the resulting regex: ((((( . . . Read full entry » The value does not conform to the lexical constraints defined for the xs:anyURI typePosted 12/19/2012 1:31:29 AMThe validation rules for xs:anyURI in the XSD 1.0 specification are notoriously troublesome, and it is not surprising that different implementors interpret them differently. This is what XSD 1.0 says: <quote> The ·lexical space· of anyURI is finite-length character sequences wh . . . Read full entry » The value does not conform to the lexical constraints defined for the xs:anyURI typePosted 12/19/2012 1:11:55 AMHi all, I tested following Xquery with Sedna and Zorba: declare function local:getPipUri($id as xs:string) as xs:anyURI { xs:anyURI(concat("http://www.nxp.com/pip/", $id)) }; local:getPipUri("CX24483 14LZ") Sedna throws an exception: 2012/12/19 10:07:09 database query/u . . . Read full entry » Sequence of Nodes ComparisonPosted 12/5/2012 12:49:50 AMOn 05/12/2012 04:59, Kunal Chauhan wrote: > Hi, > > I tried the way you suggest, but it works for me in xquery editor. > when I integrate it with java it returns true all the time. > > don't know why it happens ? > Because you are doing something wrong. If you want help in di . . . Read full entry » Sequence of Nodes ComparisonPosted 12/4/2012 7:37:24 AMlet $i := (<item id="2">ABC</item>, <item id="2">DEF</item>, <item2 id="3">XYZ</item2>) let $j := (<item id="2">DEF</item>, <item2 id="3">XYZ</item2>, <item id="1">ABC< . . . Read full entry » Sequence of Nodes ComparisonPosted 12/4/2012 7:26:37 AMOn 4 December 2012 15:14, Kunal Chauhan <http://x-query.com/mailman/listinfo/talk> wrote: > Hi, > > I want to compare two list of nodes. > Comparison should be based on QName, attribute and value. > Node's position is sequence doesn't matter. > > for example, > List A . . . Read full entry » [ANN] RXQ v0.1 - RESTful MVC with XQuery 3.0 annotations for MarkLogicPosted 10/28/2012 12:26:39 PM..great news, thanks for the links! Christian ___________________________ > having fun with Adam Retter's RESTXQ > > src at https://github.com/xquery/rxq > > -Jim Fuller > _______________________________________________ > http://x-query.com/mailman/listinfo/talk > http://x- . . . Read full entry » [ANN] RXQ v0.1 - RESTful MVC with XQuery 3.0 annotations for MarkLogicPosted 10/28/2012 12:23:40 PMhaving fun with Adam Retter's RESTXQ src at https://github.com/xquery/rxq -Jim Fuller . . . Read full entry » exist xquery searchPosted 10/25/2012 5:26:22 AM>Also the > performance is really bad. Your query can be made much more efficient yet. > I haven't fully done an index of the exist-db yet. Indexes made a huge difference in eXist, but you need to get your query correct first, so that you know which indexes you need. -- Adam Retter s . . . Read full entry » exist xquery searchPosted 10/25/2012 5:24:20 AMIm not quite sure what the context of your query is, but this really does not look right to me. I would try inverting the order of execution, you can often use the set operators like union or intersect to bring together faceted queries - e.g. let $base := if($person) then //foo/bar[contributions/ . . . Read full entry » moving an element from last child to next siblingPosted 10/24/2012 12:43:14 AM> Now I wonder whether something like this is feasible using xquery 3.0 > features. Maybe not worth the effort, given the existence of xslt, > but at least you could imagine defining a map of XPath to function, > iterating over a tree, matching patterns and calling functions... > . . . Read full entry » moving an element from last child to next siblingPosted 10/23/2012 7:30:20 PMOn 10/23/2012 10:02 AM, David Sewell wrote: > > Speaking as someone who wrote a lot of pseudo-templates in XQuery > before MarkLogic added an XSLT 2.0 parser to their product, this is > one area where XSLT is a lot more pleasant to use, if that's a > possibility. > > David H . . . Read full entry » moving an element from last child to next siblingPosted 10/23/2012 7:02:06 AMThere are at least a couple of different approaches to this via the typeswitch strategy, but I think the simplest would be: 1. In your function for closer, recurse over the child nodes as usual (which I assume will output a <closer> element, or whatever you transform it to), then process . . . Read full entry » moving an element from last child to next siblingPosted 10/23/2012 6:36:41 AMI have used the xquery typeswitch function to transform elements from a TEI file, but I am stymied by a task involving the following fragment: <closer> <signed>Your ever affectionate WOODVILLE.</signed> <postscript> <p& . . . Read full entry » Invitation to connect on LinkedInPosted 10/19/2012 8:29:26 AMLinkedIn ------------ I'd like to add you to my professional network on LinkedIn. - Naveen Naveen Hanumara Software Developer at Detica London, United Kingdom Confirm that you know Naveen Hanumara: https://www.linkedin.com/e/vuwohj-h8hgff4f-3o/isd/9161410241/uQwFakjN/?hs=false&tok=1xEmtoY . . . Read full entry » deduplicating information in XML filesPosted 10/19/2012 4:05:55 AMHi, I'm currently trying out a pure XSLT solution. As an add-on, I'd like to mention I like where Zorba is going although I did not have the time to use it yet. I really need to take a closer look once I have time at the documentation. Thx for the tip by the way. Robby -----Original Message- . . . Read full entry » deduplicating information in XML filesPosted 10/17/2012 3:18:36 AMDear Robby, Zorba XQuery processor currently supports a data cleaning module (look for data cleaning in http://www.zorba-xquery.com/html/modules) that we may want to try. In principle, the requirements associated to your data de-duplication problem can be addressed by writing an XQuery program . . . Read full entry » deduplicating information in XML filesPosted 10/12/2012 5:02:40 AMHi all, This time I have a rather challenging task at hand. Let me first describe the use case. We have lots of product information stored in XML. Some of that information describes . Technical applications . Features and benefits . Technical summary One of the problems is a lo . . . Read full entry » [ANN] XML Prague 2013 Call for PapersPosted 10/10/2012 3:42:45 AMXML Prague 2013 is now welcoming submissions for presentations on the following topics: Digital books and publishing: The role of XML in single-source publishing in the era of tablets, smart phones, and eBook readers. Semantic web: Beyond mere structures. Expressing semantics in data forma . . . Read full entry » incorrect syntax?Posted 10/2/2012 8:51:12 AMDo I sense an International Obfuscated XQuery Code Contest [1] [2] in the offing? -- Ron [1] http://www.ioccc.org/ [2] http://en.wikipedia.org/wiki/International_Obfuscated_C_Code_Contest On 10/2/2012 1:38 AM, Andrew Welch wrote: > On 2 October 2012 09:30, David Carlisle<http://x-query.co . . . Read full entry » incorrect syntax?Posted 10/2/2012 1:38:30 AMOn 2 October 2012 09:30, David Carlisle <http://x-query.com/mailman/listinfo/talk> wrote: > On 02/10/2012 08:56, Andrew Welch wrote: >> >> ha that's great (if a little contrived): >> >> declare default function namespace "x"; >> declare function retu . . . Read full entry » incorrect syntax?Posted 10/2/2012 1:30:07 AMOn 02/10/2012 08:56, Andrew Welch wrote: > ha that's great (if a little contrived): > > declare default function namespace "x"; > declare function return ($x) { $x+1 }; > return (23) > > returns 24 Yes that is contrived, I think it's clearer if you write it like this . . . Read full entry » incorrect syntax?Posted 10/2/2012 12:56:32 AM> But if you say > > declare default function namespace "x"; > declare function return ($x) { $x+1 }; > return (23) > > that does seem to return 24 for at least one processor that I tried, which > seems truly bizarre (to me, anyway) ha that's great (if a little co . . . Read full entry » incorrect syntax?Posted 10/1/2012 9:11:32 PMOn 10/1/2012 7:22 PM, Michael Sokolov wrote: > Sorry, I think I neglected to include a let before a couple of the > returns. I thought that might be the case. > But my main point was the unusual (and probably unfamiliar to > people used to other languages) change in the interpretation . . . Read full entry » incorrect syntax?Posted 10/1/2012 7:22:03 PMSorry, I think I neglected to include a let before a couple of the returns. But my main point was the unusual (and probably unfamiliar to people used to other languages) change in the interpretation of parentheses when they follow the return keyword and when they follow the return function. A . . . Read full entry » incorrect syntax?Posted 10/1/2012 5:55:20 PMThis is actually very straightforward. "return" is a keyword, used in FLWOR expressions and a few other places. There is no standalone "return" in XQuery. Thus: let $x:=0 return (23) is a valid (if uninteresting) FLWOR expression that is equivalent to the even less inte . . . Read full entry » incorrect syntax?Posted 10/1/2012 7:29:35 AMOn 01/10/2012 15:19, Gleb Gawriljuk wrote: > I cannot see where my error lies. I am just executing the return function That is your error. Xquery does not have a return function. Without seeing more context it's not clear what the query should be. David -- google plus: https:/profiles.goog . . . Read full entry » incorrect syntax?Posted 10/1/2012 7:25:03 AMHi Gleb, Could the prefix in front of the return call be missing? (e.g., local:return, depending on how you defined this function) By default (if you have not changed it), the default function namespace is the builtin one (also available through fn:), so just typing "return" will look u . . . Read full entry » Looking for help restricting results per input?Posted 9/24/2012 1:59:21 AMOn 24 September 2012 07:47, Jeremy Botto <http://x-query.com/mailman/listinfo/talk> wrote: > let $keywords := ("keyworda", "keywordb", "keywordc") > for $keyword in $keywords, > $v in doc('test')//document/item > where $v/quote contains text {$keyword . . . Read full entry » [xml-dev] XQuery 3.0 implementations vs the XQuery 3.0 Test SuitePosted 9/19/2012 10:12:56 AMJim, I expect Zorba to report results by the end of the year, hopefully 100%. We implement all the features, including the optional ones. Best Dana On Sep 17, 2012, at 6:55 PM, Jim Melton wrote: > Gentle friends, > > The XML Query WG, jointly with the XSLT Working Group, are nearly r . . . Read full entry » Replacing an attributePosted 9/7/2012 8:22:52 AM> Yes. I saw that If I write an XSLT stylesheet, then I can call that > from marklogic and it all works good... > I am not too sure, if XSLT is a good approach or if Xquery is a better > way of doing things? > Generally, XQuery is better than XSLT for extracting specific informat . . . Read full entry » Simple (I thought) Xquery giving run-time error.Posted 7/13/2012 8:20:41 AMIt seems like you might have too many '/*' steps. For example, if you evaluate $models/* in the body, I think you should get the empty sequence. $models appears to bind to the sequence of <Model> elements so $models/* would select element children of each but there aren't any. I would try . . . Read full entry » Simple (I thought) Xquery giving run-time error.Posted 7/13/2012 8:18:08 AMYour problem is that the initialization of $models goes down two levels below the document node, so it is bound to a sequence of Model elements, so when you do $models/* you are selecting the children of the Model elements, but there are no child elements to select. Remove a /* either from the . . . Read full entry » Simple (I thought) Xquery giving run-time error.Posted 7/13/2012 7:41:50 AMGiven this in modelNames.xml <?xml version="1.0"?> <ModelNames xmlns="http://www.b2b.net/plants"> <Model singular="sale">sales</Model> <Model singular="stock">stocks</Model> <Model singular="plant">pl . . . Read full entry » XML & XQuery @ NoSQL Now! 2012Posted 7/11/2012 8:59:58 AMHello gang, This year edition of the NoSQL Now! 2012 will feature several talks related to XML & XQuery topics. We have listed the ones related to the Zorba XQuery Processor at http://www.zorba-xquery.com/html/entry/2012/07/10/NoSQL_Now We hope to see you there! William . . . Read full entry » XQuery Update Facility and unwanted whitespacePosted 7/10/2012 1:00:23 AMAndrew has answered the whitespace questions. It's a Saxon (not an Oxygen) restriction that XQuery 3.0 and XQuery Update can't currently be used together in the same query. It happened that way because both are implemented as extensions to the "core" XQuery 1.0 parser, built using su . . . Read full entry » XQuery Update Facility and unwanted whitespacePosted 7/9/2012 2:12:04 PMHi Andrew, > What is you "strip whitespace" set to? It sounds like it's set to "all"... Great point - I had actually been fiddling with that setting earlier before your I emailed the list. Setting it back to "none" or "ignorable" is much better: <? . . . Read full entry » XQuery Update Facility and unwanted whitespacePosted 7/9/2012 12:53:49 PMOn 9 July 2012 20:35, Joe Wicentowski <http://x-query.com/mailman/listinfo/talk> wrote: > Hi Andrew, > >> In the XQuery options (in oXygen) untick 'format transformer output' > > Thanks for that suggestion. That's definitely preferable, in that it > doesn't introduce new . . . Read full entry » XQuery Update Facility and unwanted whitespacePosted 7/9/2012 12:35:47 PMHi Andrew, > In the XQuery options (in oXygen) untick 'format transformer output' Thanks for that suggestion. That's definitely preferable, in that it doesn't introduce new whitespace, though it does strips out all whitespace between nodes -- which is fine with me: <?xml version="1.0 . . . Read full entry » XQuery Update Facility and unwanted whitespacePosted 7/9/2012 12:02:22 PM> Is this a serialization issue? Is there a way for me to declare some > options that will prevent the unwanted whitespace from being inserted? > > I'm not sure whether this is a general XQuery issue or an > implementation-specific issue, so let me know if this isn't the right > . . . Read full entry » XQuery Update Facility and unwanted whitespacePosted 7/9/2012 11:45:23 AMHi all, I'm having a problem with query I wrote that makes use of the XQuery Update Facility. The problem is that unwanted whitespace inserted into the results of my query. Here is my source XML (a TEI-like list), the query in question, and the output showing the unwanted whitespace: source.xml . . . Read full entry » fn:doc not returning dataPosted 7/9/2012 9:10:28 AMHi Daniel, XQIB does not support the doc function - the XQIB way of accessing an XML document is to send a GET request over the Web with the EXPath http-client module (possibly to the same server). An example is given here: http://www.xqib.org/js/RESTCallCourses_source.html I hope this is helpfu . . . Read full entry » fn:doc not returning dataPosted 7/9/2012 7:32:17 AMDaniel Oneil wrote: > I'm trying to use XQIB to get data from an XML file using the fn:doc > function. > The following link leads to a Source Forge forum where I posted my code > and a link to the books.xml file. > https://sourceforge.net/projects/mxquery/forums/forum/633155/topic/54 . . . Read full entry » simple map operatorPosted 7/9/2012 3:30:44 AMThank you, Michael, I see that this is a syntactic categorisation and that the semantics of the definition does not carry as much weight as the order of precedence. When the order of precedence changes in the next draft, will "/" and "//" become map operators? Waiting to have . . . Read full entry » simple map operatorPosted 7/9/2012 2:26:50 AMA!B is a RelativePathExpr in the BNF grammar, but so are 29, count($x), and (1 to 10)[3]. Similarly, the way the grammar works, "a and b" is an instance of OrExpr, and 2+2 is an instance of ValueComp. So you need to distinguish the names of productions in the grammar, which affect t . . . Read full entry » simple map operatorPosted 7/9/2012 1:43:12 AMThanks, Michael, If the simple map operator "does not locate any special nodes within trees, but works on sequences of items you specify by expressions", does that not make it into a sequence expression in the terms of Michael Kay's Reference, Chapter 10 (which also has "/" as . . . Read full entry » simple map operatorPosted 7/9/2012 1:01:21 AMHi Jens, they are relative, such that each step (E1 ! E2) will serve as the input sequence E'1 for the next operation (E'1 ! E'2), hence: > <foo> > <bar>hello</bar> > <bar>world</bar> > <bar>and</bar> > <bar>hello</bar> . . . Read full entry » simple map operatorPosted 7/9/2012 12:41:30 AMHi, Can anyone explain to me why the XQuery 3.0 simple map operator <http://www.w3.org/TR/xquery-30/#id-map-operator> is a relative path expression? Which nodes within trees does it locate? Thanks in advance for any enlightenment, Jens . . . Read full entry » Invitation to connect on LinkedInPosted 6/19/2012 3:56:38 AMLinkedIn ------------ I'd like to add you to my professional network on LinkedIn. - Alice Alice Wei Technical Consultant at Indiana University Bloomington, Indiana Area Confirm that you know Alice Wei: https://www.linkedin.com/e/xnupbm-h3muyo7o-28/isd/7546757883/m_IXhCbP/?hs=false&tok=1Cl . . . Read full entry » [ANN] BaseX 7.3Posted 6/18/2012 9:47:04 AMHi everyone, we are glad to announce a great new release of BaseX, our XML database and XPath/XQuery 3.0 processor! Here are the latest features; - Many new internal XQuery Modules have been added, and existing ones have been revised to ensure long-term stability of your future XQuery application . . . Read full entry » Strong data checking on @xml:id?Posted 6/8/2012 4:00:06 PMThe relevant statement in the spec is XQuery 3.7.1.1 clause 5: "If the attribute name is xml:id, then xml:id processing is performed as defined in [XML ID]. This ensures that the attribute has the type xs:ID and that its value is properly normalized. If an error is encountered during xml:i . . . Read full entry » Strong data checking on @xml:id?Posted 6/8/2012 12:21:59 PMYes that's because the id table is validating ... Simple case is the XML is schema invalid. It needs to be fixed. Some processors will choke others may not. But its still bad XML. ---------------------------------------- David A. Lee http://x-query.com/mailman/listinfo/talk http://www.xmlsh.org . . . Read full entry » Strong data checking on @xml:id?Posted 6/8/2012 11:48:11 AMAt 2012-06-08 18:35 +0000, David Lee wrote: >I belive the issue is that of validation. >MarkLogic is a validating XQuery parser so is validating xml:id >against the standard XML schemas. "-ptr" is not a valid xml:id > >Saxon HE (I presume you are using HE), otoh, is not . . . Read full entry » Strong data checking on @xml:id?Posted 6/8/2012 11:35:21 AMI belive the issue is that of validation. MarkLogic is a validating XQuery parser so is validating xml:id against the standard XML schemas. "-ptr" is not a valid xml:id Saxon HE (I presume you are using HE), otoh, is not a validating XQuery engine. ---------------------------------- . . . Read full entry » Strong data checking on @xml:id?Posted 6/8/2012 10:55:20 AMWorking within MarkLogic, I just got bitten by a server error caused by lexically invalid @xml:id in the input data. Boiled down, this was the offending query: let $in := <input xml:id="-ptr"/> return element out { attribute id { $in/@xml:id } } MarkLogic complains: XDMP-LEXV . . . Read full entry » Help with an XQuery functionPosted 5/15/2012 10:28:44 AMPerfect. Thank you everyone. I was a bit confused about using the string-join function, but I just looked it up and it makes sense now. So, I can call the following with my function, as Liam mentioned: string-join(local:xpath($someNode), '') Or I can use the new built-in function, as David me . . . Read full entry » Help with an XQuery functionPosted 5/15/2012 9:48:14 AMOn Tue, 2012-05-15 at 11:29 -0400, Custer, Mark wrote: [..] > This works, but I was wondering if it could be written better (and I > imagine that someone already has written a concise XQuery function to > do this). It might be easier to write it recursively, but clear is better than conci . . . Read full entry » Help with an XQuery functionPosted 5/15/2012 9:12:40 AMOn 15/05/2012 17:02, Custer, Mark wrote: > Thanks for pointing out the XQuery 3.0 functions, Matthias! > > fn:path is indeed supported, but I want a function that will do the same > as fn:path, minus any of the values of “[1]”. Plus, since my current > crop of documents d . . . Read full entry » |
PURCHASE STYLUS STUDIO ONLINE TODAY!!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! What's New for X14?New XQuery & Web Services Tools, Support for MySQL, PostgreSQL, HL7 EDI, Microsoft .NET Code Generation and much more! Why Pay More for XML Tools?With Stylus Studio® X14 XML Enterprise Suite, you get the most comprehensive XML tool suite at one incredibly low price. Value: it's just one of many reasons why smart XML developers are choosing Stylus Studio! |

Cart





