From geert.josten at dayon.nl Fri Mar 2 13:13:01 2012 From: geert.josten at dayon.nl (Geert Josten) Date: Fri, 2 Mar 2012 22:13:01 +0100 Subject: [xquery-talk] XQIB issues.. Message-ID: <600478dccecaf864cee9fac5a238fc20@mail.gmail.com> Hi, Not sure this is the most suitable place to post this question. Please correct me.. I'm trying to use replace node to wrap something out of the HTML dom into another element. But XQIB (even nighly build #280) throws me this error: Some error occurred in the library Error: (NS_ERROR_DOM_NAMESPACE_ERR): An attempt was made to create or change an object in a way which is incorrect with regard to namespaces code: 14 INDEX_SIZE_ERR: 1 DOMSTRING_SIZE_ERR: 2 HIERARCHY_REQUEST_ERR: 3 WRONG_DOCUMENT_ERR: 4 INVALID_CHARACTER_ERR: 5 NO_DATA_ALLOWED_ERR: 6 (and some more..) Yes, the element I'm wrapping is in a namespace, and it contains something in the empty namespace. It's a typical xf:model. Anyone out there with an idea of the root cause, and who perhaps knows a way around? Kind regards, Geert M.Sc. G.P.H. (Geert) Josten Senior Developer Dayon B.V. Delftechpark 37b 2628 XJ Delft The Netherlands T +31 (0)88 26 82 570 geert.josten at dayon.nl www.dayon.nl De informatie - verzonden in of met dit e-mailbericht - is afkomstig van Dayon 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 ghislain.fourny at 28msec.com Sun Mar 4 23:44:57 2012 From: ghislain.fourny at 28msec.com (Ghislain Fourny) Date: Mon, 5 Mar 2012 08:44:57 +0100 Subject: [xquery-talk] XQIB issues.. In-Reply-To: <600478dccecaf864cee9fac5a238fc20@mail.gmail.com> References: <600478dccecaf864cee9fac5a238fc20@mail.gmail.com> Message-ID: <8DD4F6A4-F375-4543-B388-92D606D40EE7@28msec.com> Hi Geert, We got in touch with you offline and hope we could be of useful assistance. In general, the fastest way to get support on XQIB, directly from the developers, is by sending an e-mail to: mxquery-xqib at lists.sourceforge.net. Thanks and kind regards, Ghislain On Mar 2, 2012, at 10:13 PM, Geert Josten wrote: > Hi, > > Not sure this is the most suitable place to post this question. Please > correct me.. > > I'm trying to use replace node to wrap something out of the HTML dom into > another element. But XQIB (even nighly build #280) throws me this error: > > Some error occurred in the library > Error: (NS_ERROR_DOM_NAMESPACE_ERR): An attempt was made to create or > change an object in a way which is incorrect with regard to namespaces > code: 14 > INDEX_SIZE_ERR: 1 > DOMSTRING_SIZE_ERR: 2 > HIERARCHY_REQUEST_ERR: 3 > WRONG_DOCUMENT_ERR: 4 > INVALID_CHARACTER_ERR: 5 > NO_DATA_ALLOWED_ERR: 6 > (and some more..) > > Yes, the element I'm wrapping is in a namespace, and it contains something > in the empty namespace. It's a typical xf:model. > > Anyone out there with an idea of the root cause, and who perhaps knows a > way around? > > Kind regards, > Geert > > > M.Sc. G.P.H. (Geert) Josten > Senior Developer > > > Dayon B.V. > Delftechpark 37b > 2628 XJ Delft > The Netherlands > > T +31 (0)88 26 82 570 > > geert.josten at dayon.nl > www.dayon.nl > > De informatie - verzonden in of met dit e-mailbericht - is afkomstig van > Dayon 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. > _______________________________________________ > talk at x-query.com > http://x-query.com/mailman/listinfo/talk From james.fuller.2007 at gmail.com Mon Mar 5 00:20:00 2012 From: james.fuller.2007 at gmail.com (James Fuller) Date: Mon, 5 Mar 2012 09:20:00 +0100 Subject: [xquery-talk] XQIB issues.. In-Reply-To: <8DD4F6A4-F375-4543-B388-92D606D40EE7@28msec.com> References: <600478dccecaf864cee9fac5a238fc20@mail.gmail.com> <8DD4F6A4-F375-4543-B388-92D606D40EE7@28msec.com> Message-ID: along these lines, is there a public repo of the xqib codebase ? thanks, J On Mon, Mar 5, 2012 at 8:44 AM, Ghislain Fourny wrote: > Hi Geert, > > We got in touch with you offline and hope we could be of useful assistance. > > In general, the fastest way to get support on XQIB, directly from the developers, is by sending an e-mail to: mxquery-xqib at lists.sourceforge.net. > > Thanks and kind regards, > Ghislain > > > On Mar 2, 2012, at 10:13 PM, Geert Josten wrote: > >> Hi, >> >> Not sure this is the most suitable place to post this question. Please >> correct me.. >> >> I'm trying to use replace node to wrap something out of the HTML dom into >> another element. But XQIB (even nighly build #280) throws me this error: >> >> Some error occurred in the library >> Error: (NS_ERROR_DOM_NAMESPACE_ERR): An attempt was made to create or >> change an object in a way which is incorrect with regard to namespaces >> code: 14 >> INDEX_SIZE_ERR: 1 >> DOMSTRING_SIZE_ERR: 2 >> HIERARCHY_REQUEST_ERR: 3 >> WRONG_DOCUMENT_ERR: 4 >> INVALID_CHARACTER_ERR: 5 >> NO_DATA_ALLOWED_ERR: 6 >> (and some more..) >> >> Yes, the element I'm wrapping is in a namespace, and it contains something >> in the empty namespace. It's a typical xf:model. >> >> Anyone out there with an idea of the root cause, and who perhaps knows a >> way around? >> >> Kind regards, >> Geert >> >> >> M.Sc. G.P.H. (Geert) Josten >> Senior Developer >> >> >> Dayon B.V. >> Delftechpark 37b >> 2628 XJ Delft >> The Netherlands >> >> T +31 (0)88 26 82 570 >> >> geert.josten at dayon.nl >> www.dayon.nl >> >> De informatie - verzonden in of met dit e-mailbericht - is afkomstig van >> Dayon 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. >> _______________________________________________ >> talk at x-query.com >> http://x-query.com/mailman/listinfo/talk > > > _______________________________________________ > talk at x-query.com > http://x-query.com/mailman/listinfo/talk From ghislain.fourny at 28msec.com Mon Mar 5 00:27:23 2012 From: ghislain.fourny at 28msec.com (Ghislain Fourny) Date: Mon, 5 Mar 2012 09:27:23 +0100 Subject: [xquery-talk] XQIB issues.. In-Reply-To: References: <600478dccecaf864cee9fac5a238fc20@mail.gmail.com> <8DD4F6A4-F375-4543-B388-92D606D40EE7@28msec.com> Message-ID: Hi Jim, Yes, the code is public. Here is a link to the continuous integration system (with links to the source): http://sgv-jenkins-01.ethz.ch//job/MXQuery-XQIB/ And here is a link to the SVN repository: https://mxquery.svn.sourceforge.net/svnroot/mxquery/trunk/MXQuery/ Kind regards, Ghislain On Mar 5, 2012, at 9:20 AM, James Fuller wrote: > along these lines, > > is there a public repo of the xqib codebase ? > > thanks, J > > On Mon, Mar 5, 2012 at 8:44 AM, Ghislain Fourny > wrote: >> Hi Geert, >> >> We got in touch with you offline and hope we could be of useful assistance. >> >> In general, the fastest way to get support on XQIB, directly from the developers, is by sending an e-mail to: mxquery-xqib at lists.sourceforge.net. >> >> Thanks and kind regards, >> Ghislain >> >> >> On Mar 2, 2012, at 10:13 PM, Geert Josten wrote: >> >>> Hi, >>> >>> Not sure this is the most suitable place to post this question. Please >>> correct me.. >>> >>> I'm trying to use replace node to wrap something out of the HTML dom into >>> another element. But XQIB (even nighly build #280) throws me this error: >>> >>> Some error occurred in the library >>> Error: (NS_ERROR_DOM_NAMESPACE_ERR): An attempt was made to create or >>> change an object in a way which is incorrect with regard to namespaces >>> code: 14 >>> INDEX_SIZE_ERR: 1 >>> DOMSTRING_SIZE_ERR: 2 >>> HIERARCHY_REQUEST_ERR: 3 >>> WRONG_DOCUMENT_ERR: 4 >>> INVALID_CHARACTER_ERR: 5 >>> NO_DATA_ALLOWED_ERR: 6 >>> (and some more..) >>> >>> Yes, the element I'm wrapping is in a namespace, and it contains something >>> in the empty namespace. It's a typical xf:model. >>> >>> Anyone out there with an idea of the root cause, and who perhaps knows a >>> way around? >>> >>> Kind regards, >>> Geert >>> >>> >>> M.Sc. G.P.H. (Geert) Josten >>> Senior Developer >>> >>> >>> Dayon B.V. >>> Delftechpark 37b >>> 2628 XJ Delft >>> The Netherlands >>> >>> T +31 (0)88 26 82 570 >>> >>> geert.josten at dayon.nl >>> www.dayon.nl >>> >>> De informatie - verzonden in of met dit e-mailbericht - is afkomstig van >>> Dayon 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. >>> _______________________________________________ >>> talk at x-query.com >>> http://x-query.com/mailman/listinfo/talk >> >> >> _______________________________________________ >> talk at x-query.com >> http://x-query.com/mailman/listinfo/talk From geert.josten at dayon.nl Mon Mar 5 03:32:35 2012 From: geert.josten at dayon.nl (Geert Josten) Date: Mon, 5 Mar 2012 12:32:35 +0100 Subject: [xquery-talk] XQIB issues.. In-Reply-To: <8DD4F6A4-F375-4543-B388-92D606D40EE7@28msec.com> References: <600478dccecaf864cee9fac5a238fc20@mail.gmail.com> <8DD4F6A4-F375-4543-B388-92D606D40EE7@28msec.com> Message-ID: <902f7676b1c90ef3adb062690c2c3c37@mail.gmail.com> Thnx, signed up just now.. Grtz, Geert > -----Oorspronkelijk bericht----- > Van: talk-bounces at x-query.com [mailto:talk-bounces at x-query.com] Namens > Ghislain Fourny > Verzonden: maandag 5 maart 2012 8:45 > Aan: x-query.talk > Onderwerp: Re: [xquery-talk] XQIB issues.. > > Hi Geert, > > We got in touch with you offline and hope we could be of useful assistance. > > In general, the fastest way to get support on XQIB, directly from the developers, > is by sending an e-mail to: mxquery-xqib at lists.sourceforge.net. > > Thanks and kind regards, > Ghislain > > > On Mar 2, 2012, at 10:13 PM, Geert Josten wrote: > > > Hi, > > > > Not sure this is the most suitable place to post this question. Please > > correct me.. > > > > I'm trying to use replace node to wrap something out of the HTML dom into > > another element. But XQIB (even nighly build #280) throws me this error: > > > > Some error occurred in the library > > Error: (NS_ERROR_DOM_NAMESPACE_ERR): An attempt was made to create > or > > change an object in a way which is incorrect with regard to namespaces > > code: 14 > > INDEX_SIZE_ERR: 1 > > DOMSTRING_SIZE_ERR: 2 > > HIERARCHY_REQUEST_ERR: 3 > > WRONG_DOCUMENT_ERR: 4 > > INVALID_CHARACTER_ERR: 5 > > NO_DATA_ALLOWED_ERR: 6 > > (and some more..) > > > > Yes, the element I'm wrapping is in a namespace, and it contains something > > in the empty namespace. It's a typical xf:model. > > > > Anyone out there with an idea of the root cause, and who perhaps knows a > > way around? > > > > Kind regards, > > Geert > > > > > > M.Sc. G.P.H. (Geert) Josten > > Senior Developer > > > > > > Dayon B.V. > > Delftechpark 37b > > 2628 XJ Delft > > The Netherlands > > > > T +31 (0)88 26 82 570 > > > > geert.josten at dayon.nl > > www.dayon.nl > > > > De informatie - verzonden in of met dit e-mailbericht - is afkomstig van > > Dayon 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. > > _______________________________________________ > > talk at x-query.com > > http://x-query.com/mailman/listinfo/talk > > > _______________________________________________ > talk at x-query.com > http://x-query.com/mailman/listinfo/talk From dlee at calldei.com Mon Mar 5 18:27:23 2012 From: dlee at calldei.com (David Lee) Date: Tue, 6 Mar 2012 02:27:23 +0000 Subject: [xquery-talk] Schema in xquery Message-ID: I've been contemplating the relationship between schema and type in schema aware xquery. Is xquery strictly tied to XSD? That is, could an implementation support another schema format such as rng to provide for the type system? Without conversion to XSD? Is validation strictly bound to type assignment? Would it be valid XQuery to allow for some totally new type definition language as long as it produced XDM? Or is the language strictly bound to the XSD model? It's just becoming increasingly aware to me that were mixing document validity checking too tightly with a type definition .. Where their roles may overlap but are not the same. Sent from my iPad (excuse the terseness) David A Lee dlee at calldei.com From liam at w3.org Mon Mar 5 23:20:47 2012 From: liam at w3.org (Liam R E Quin) Date: Tue, 06 Mar 2012 08:20:47 +0100 Subject: [xquery-talk] Schema in xquery In-Reply-To: References: Message-ID: <1331018447.27417.45.camel@localhost.localdomain> On Tue, 2012-03-06 at 02:27 +0000, David Lee wrote: > I've been contemplating the relationship between schema and type in > schema aware xquery. > Is xquery strictly tied to XSD? That is, could an implementation > support another schema format such as rng to provide for the type > system? Without conversion to XSD? Is validation strictly bound to > type assignment? Lots of questions here. Anything that produces XDM instances is fine, and in fact XSD is not tied to XDM either. Validation is the mechanism in XQuery to get type annotations onto nodes, but this does not preclude the use of a DTD, or of some other validation mechanism than XSD. I asked James Clark and Murata-san a similar question. The answer seems to be that RNG doesn't do the *deterministic* type assignment that you need to get the annotations working. But it could be done in principle. The term "validation" is indeed overloaded to include "see if you can assign types to these nodes or not". Liam -- Liam Quin - XML Activity Lead, W3C, http://www.w3.org/People/Quin/ Pictures from old books: http://fromoldbooks.org/ From mike at saxonica.com Tue Mar 6 00:41:03 2012 From: mike at saxonica.com (Michael Kay) Date: Tue, 06 Mar 2012 08:41:03 +0000 Subject: [xquery-talk] Schema in xquery In-Reply-To: References: Message-ID: <4F55CD9F.8080302@saxonica.com> On 06/03/2012 02:27, David Lee wrote: > I've been contemplating the relationship between schema and type in schema aware xquery. > Is xquery strictly tied to XSD? That is, could an implementation support another schema format such as rng to provide for the type system? It would be possible to support a different schema language, but not without difficulty. (a) XSD is the only schema language I know of that defines how elements and attributes in the instance document are associated with types, and that includes constraints (such as the notorious UPA) to make this association unambiguous. (b) Many of the concepts of XSD, such as the distinction between simple and complex types, substitution groups, and nullability, turn up in the semantics of XQuery, and would need to be mapped to the concepts of a different schema language. Michael Kay Saxonica From geert.josten at dayon.nl Tue Mar 6 03:41:28 2012 From: geert.josten at dayon.nl (Geert Josten) Date: Tue, 6 Mar 2012 12:41:28 +0100 Subject: [xquery-talk] Schema in xquery In-Reply-To: <4F55CD9F.8080302@saxonica.com> References: <4F55CD9F.8080302@saxonica.com> Message-ID: <2084da502ff3c78b3000a27a058d5ea5@mail.gmail.com> Could one not say that 'schema' languages that have less expressiveness, are easier to apply? Provided there are no ambiguities. I mean if a schema language doesn't for instance support nullability, that a particular element/attrib simply isn't allowed to be null, right? Grtz > -----Oorspronkelijk bericht----- > Van: talk-bounces at x-query.com [mailto:talk-bounces at x-query.com] Namens > Michael Kay > Verzonden: dinsdag 6 maart 2012 9:41 > Aan: talk at x-query.com > Onderwerp: Re: [xquery-talk] Schema in xquery > > On 06/03/2012 02:27, David Lee wrote: > > I've been contemplating the relationship between schema and type in schema > aware xquery. > > Is xquery strictly tied to XSD? That is, could an implementation support > another schema format such as rng to provide for the type system? > It would be possible to support a different schema language, but not > without difficulty. > > (a) XSD is the only schema language I know of that defines how elements > and attributes in the instance document are associated with types, and > that includes constraints (such as the notorious UPA) to make this > association unambiguous. > > (b) Many of the concepts of XSD, such as the distinction between simple > and complex types, substitution groups, and nullability, turn up in the > semantics of XQuery, and would need to be mapped to the concepts of a > different schema language. > > Michael Kay > Saxonica > > > _______________________________________________ > talk at x-query.com > http://x-query.com/mailman/listinfo/talk From jidanni at jidanni.org Wed Mar 7 19:09:22 2012 From: jidanni at jidanni.org (jidanni at jidanni.org) Date: Thu, 08 Mar 2012 11:09:22 +0800 Subject: [xquery-talk] [Dumbo question] allow us to add four minutes to a time Message-ID: <874ntzeql9.fsf@jidanni.org> Dear Sirs, Gentlemen, Let us add four minutes to a time. let $a:="12:34", $b:=4 How do I return "12:38"? The bus will go by my house 38 minutes past noon. The documentation is so hard to search through. OK, first I must apparently append :00 to the time, then convert the type, then surround the 4 with P... then convert its type, then add them together, then convert the result back into a string, is that so? From geert.josten at dayon.nl Wed Mar 7 22:58:18 2012 From: geert.josten at dayon.nl (Geert Josten) Date: Thu, 8 Mar 2012 07:58:18 +0100 Subject: [xquery-talk] [Dumbo question] allow us to add four minutes to a time In-Reply-To: <874ntzeql9.fsf@jidanni.org> References: <874ntzeql9.fsf@jidanni.org> Message-ID: Hi Jidanni, The approach sounds right. The trick is to use dayTimeDurations to add the 4 minutes. You can do that like this: xs:time("12:34:00") + xs:dayTimeDuration("PT4M") Kind regards, Geert > -----Oorspronkelijk bericht----- > Van: talk-bounces at x-query.com [mailto:talk-bounces at x-query.com] Namens > jidanni at jidanni.org > Verzonden: donderdag 8 maart 2012 4:09 > Aan: talk at x-query.com > Onderwerp: [xquery-talk] [Dumbo question] allow us to add four minutes to a > time > > Dear Sirs, Gentlemen, > Let us add four minutes to a time. > > let $a:="12:34", $b:=4 > > How do I return "12:38"? > The bus will go by my house 38 minutes past noon. > > The documentation is so hard to search through. > > OK, first I must apparently append :00 to the time, > then convert the type, > then surround the 4 with P... > then convert its type, > then add them together, > then convert the result back into a string, > is that so? > _______________________________________________ > talk at x-query.com > http://x-query.com/mailman/listinfo/talk From mike at saxonica.com Thu Mar 8 01:04:54 2012 From: mike at saxonica.com (Michael Kay) Date: Thu, 08 Mar 2012 09:04:54 +0000 Subject: [xquery-talk] [Dumbo question] allow us to add four minutes to a time In-Reply-To: <874ntzeql9.fsf@jidanni.org> References: <874ntzeql9.fsf@jidanni.org> Message-ID: <4F587636.8070701@saxonica.com> On 08/03/2012 03:09, jidanni at jidanni.org wrote: > Dear Sirs, Gentlemen, > Let us add four minutes to a time. > > let $a:="12:34", $b:=4 > > How do I return "12:38"? xs:time(concat($a, ':00')) + xs:dayTimeDuration('PT1M') * $b Oh, and then strip off the unwanted seconds, which you can do using substring(string($t), 1, 5). Michael Kay Saxonica From jidanni at jidanni.org Thu Mar 8 16:28:11 2012 From: jidanni at jidanni.org (jidanni at jidanni.org) Date: Fri, 09 Mar 2012 08:28:11 +0800 Subject: [xquery-talk] [Dumbo question] allow us to add four minutes to a time References: Message-ID: <878vjad3dw.fsf@jidanni.org> Thanks dOOds :-) From jidanni at jidanni.org Thu Mar 8 18:21:23 2012 From: jidanni at jidanni.org (jidanni at jidanni.org) Date: Fri, 09 Mar 2012 10:21:23 +0800 Subject: [xquery-talk] comment out all the rest of the program Message-ID: <87wr6ubjks.fsf@jidanni.org> In perl all we need to do is =bla and then the rest of the program is effectively commented out. In Xquery we need to use (:, and then go all the way to the bottom of the program and put another matching :). I hereby propose something be done about this... some kind of new directive saying ignore all lines starting here. You see I sadly miss the ability to add # to comment one line =bla to comment all the rest without needing to painstakingly add the matching :). From liam at w3.org Thu Mar 8 19:21:20 2012 From: liam at w3.org (Liam R E Quin) Date: Thu, 08 Mar 2012 22:21:20 -0500 Subject: [xquery-talk] comment out all the rest of the program In-Reply-To: <87wr6ubjks.fsf@jidanni.org> References: <87wr6ubjks.fsf@jidanni.org> Message-ID: <1331263280.27449.60.camel@localhost.localdomain> On Fri, 2012-03-09 at 10:21 +0800, jidanni at jidanni.org wrote: > You see I sadly miss the ability to add > # to comment one line > =bla to comment all the rest > without needing to painstakingly add the matching :). I haven't often used =bla in Perl. You can kinda comment out a chunk using an element constructor, but it does still get parsed even if the value is not used, . . . . . . [false()] Query isn't really a line-oriented language, so comment-to-end-of-line seems likely to cause too many surprises, I'm not sure. -- Liam Quin - XML Activity Lead, W3C, http://www.w3.org/People/Quin/ Pictures from old books: http://fromoldbooks.org/ From jidanni at jidanni.org Thu Mar 8 19:41:02 2012 From: jidanni at jidanni.org (jidanni at jidanni.org) Date: Fri, 09 Mar 2012 11:41:02 +0800 Subject: [xquery-talk] comment out all the rest of the program References: <1331263280.27449.60.camel@localhost.localdomain> Message-ID: <87mx7q5tm9.fsf@jidanni.org> >>>>> "LREQ" == Liam R E Quin writes: LREQ> . . . Hmm, always more chars than a (:,:). Anyway I was thinking of some " References: <87wr6ubjks.fsf@jidanni.org> Message-ID: <4F59BBA7.5090306@saxonica.com> >You see I sadly miss the ability to add # to comment one line =bla I guess every programming language has some individual features which will be sorely missed by someone coming to XQuery from that particular language. (I still pine after a language that allowed spaces in variable and function names). The consequence of this line of reasoning is that XQuery should offer every feature that has been offered by every other popular programming language. Personally, I've never come across a "comment to end of file" feature in any of the many languages I have used, and have never felt a need for it. As for "comment to end of line", we made a conscious decision that in many of the environments where XQuery is likely to be used, line endings are potentially unstable (e.g. they can be normalized away if used in XML attributes) and that it was therefore a bad idea to treat a line ending differently from a space. Michael Kay Saxonica From sokolov at ifactory.com Fri Mar 9 10:39:44 2012 From: sokolov at ifactory.com (Mike Sokolov) Date: Fri, 09 Mar 2012 13:39:44 -0500 Subject: [xquery-talk] comment out all the rest of the program In-Reply-To: <4F59BBA7.5090306@saxonica.com> References: <87wr6ubjks.fsf@jidanni.org> <4F59BBA7.5090306@saxonica.com> Message-ID: <4F5A4E70.1080700@ifactory.com> The idea of a "comment to end of file" concept is unusual. But "comment to beginning of file" - that's something I think we could all really get behind. -Mike Sokolov On 03/09/2012 03:13 AM, Michael Kay wrote: > >You see I sadly miss the ability to add # to comment one line =bla > > I guess every programming language has some individual features which > will be sorely missed by someone coming to XQuery from that particular > language. (I still pine after a language that allowed spaces in > variable and function names). The consequence of this line of > reasoning is that XQuery should offer every feature that has been > offered by every other popular programming language. > > Personally, I've never come across a "comment to end of file" feature > in any of the many languages I have used, and have never felt a need > for it. As for "comment to end of line", we made a conscious decision > that in many of the environments where XQuery is likely to be used, > line endings are potentially unstable (e.g. they can be normalized > away if used in XML attributes) and that it was therefore a bad idea > to treat a line ending differently from a space. > > Michael Kay > Saxonica > > _______________________________________________ > talk at x-query.com > http://x-query.com/mailman/listinfo/talk From jidanni at jidanni.org Sat Mar 10 14:41:49 2012 From: jidanni at jidanni.org (jidanni at jidanni.org) Date: Sun, 11 Mar 2012 06:41:49 +0800 Subject: [xquery-talk] say how to get "newline" working References: Message-ID: <87y5r8nknm.fsf@jidanni.org> Dear talk at x-query.com, there should be a way to get 'items' back out of Xquery, one per line, without having to hardwire 0x0A (you know, $ perl -wle 'printf "%08b\n" , ord"\n"' 00001010 into the code, as discussed in https://mailman.uni-konstanz.de/pipermail/basex-talk/2012-March/002738.html ) ...or require a post-processor. From dlee at calldei.com Sat Mar 10 14:56:08 2012 From: dlee at calldei.com (David Lee) Date: Sat, 10 Mar 2012 22:56:08 +0000 Subject: [xquery-talk] say how to get "newline" working In-Reply-To: <87y5r8nknm.fsf@jidanni.org> References: <87y5r8nknm.fsf@jidanni.org> Message-ID: <220256FDE771B74FB662165BC562CF590D462C11@CH1PRD0802MB107.namprd08.prod.outlook.com> There is, but you have to call XQuery natively instead of via "the command line" -----Original Message----- From: talk-bounces at x-query.com [mailto:talk-bounces at x-query.com] On Behalf Of jidanni at jidanni.org Sent: Saturday, March 10, 2012 5:42 PM To: talk at x-query.com Cc: basex-talk at mailman.uni-konstanz.de Subject: Re: [xquery-talk] say how to get "newline" working Dear talk at x-query.com, there should be a way to get 'items' back out of Xquery, one per line, without having to hardwire 0x0A (you know, $ perl -wle 'printf "%08b\n" , ord"\n"' 00001010 into the code, as discussed in https://mailman.uni-konstanz.de/pipermail/basex-talk/2012-March/002738.html ) ...or require a post-processor. _______________________________________________ talk at x-query.com http://x-query.com/mailman/listinfo/talk From dlee at calldei.com Sat Mar 10 15:14:30 2012 From: dlee at calldei.com (David Lee) Date: Sat, 10 Mar 2012 23:14:30 +0000 Subject: [xquery-talk] say how to get "newline" working In-Reply-To: <87y5r8nknm.fsf@jidanni.org> References: <87y5r8nknm.fsf@jidanni.org> Message-ID: <220256FDE771B74FB662165BC562CF590D462C79@CH1PRD0802MB107.namprd08.prod.outlook.com> So exactly what is your question ? What you wrote is a statement not a question. To help: What XQuery processor are you using ? And is this a question about that processor only or ALL XQuery implementations? What are you trying to accomplish ? What results are you getting ? How are you accomplishing them (code sample please)? How does that differ from what you want ? What would you like to achieve ? There are answers and people willing to help if you ask with the right information. -----Original Message----- From: talk-bounces at x-query.com [mailto:talk-bounces at x-query.com] On Behalf Of jidanni at jidanni.org Sent: Saturday, March 10, 2012 5:42 PM To: talk at x-query.com Cc: basex-talk at mailman.uni-konstanz.de Subject: Re: [xquery-talk] say how to get "newline" working Dear talk at x-query.com, there should be a way to get 'items' back out of Xquery, one per line, without having to hardwire 0x0A (you know, $ perl -wle 'printf "%08b\n" , ord"\n"' 00001010 into the code, as discussed in https://mailman.uni-konstanz.de/pipermail/basex-talk/2012-March/002738.html ) ...or require a post-processor. _______________________________________________ talk at x-query.com http://x-query.com/mailman/listinfo/talk From jidanni at jidanni.org Sat Mar 10 15:18:09 2012 From: jidanni at jidanni.org (jidanni at jidanni.org) Date: Sun, 11 Mar 2012 07:18:09 +0800 Subject: [xquery-talk] say how to get "newline" working References: <220256FDE771B74FB662165BC562CF590D462C11@CH1PRD0802MB107.namprd08.prod.outlook.com> Message-ID: <87ty1wniz2.fsf@jidanni.org> >>>>> "DL" == David Lee writes: DL> There is, but you have to call XQuery natively instead of via "the command line" Running the output through a tag stripper, perl -pwle 's/<[^>]+>//g' sounds a 1000 times easier than trying to figure out how to do it whatever is that way you mention. From jidanni at jidanni.org Sat Mar 10 15:47:57 2012 From: jidanni at jidanni.org (jidanni at jidanni.org) Date: Sun, 11 Mar 2012 07:47:57 +0800 Subject: [xquery-talk] say how to get "newline" working References: <220256FDE771B74FB662165BC562CF590D462C79@CH1PRD0802MB107.namprd08.prod.outlook.com> Message-ID: <87pqcknhle.fsf@jidanni.org> All I know is using $ cat file.xq (: Make bus timetable going westbound past Zaokeng :) declare option db:parser "html"; declare option output:method "html"; (: etc., not poorly supported "text" though :) declare function local:d($M){ doc(concat("http://www.fybus.com.tw/data/", $M)) }; let $line:=("1/067b.htm","city/90.htm","city/207.htm", "city/259.htm", "city/267.htm") let $name:=("6572"," 90"," 207", " 259", " 267") let $correction:=(23,4,23,2,29) for $l at $c in $line, $i in distinct-values(local:d($l)//*:tr/*:td[position()=2 and contains(.,":")]) let $t := xs:time(concat($i, ':00')) + xs:dayTimeDuration('PT1M') * $correction[$c] order by $t return {if(contains($l,"259") or (contains($l,"90")and contains($i,":00")))then "?" else "?",substring(string($t), 1, 5), $name[$c]} I need to convert to text mode by hand: $ basex file.xq|perl -pwle 's/<[^>]+>//g' As all text serialization in Xquery can't deal with the same line concept... unless one hardwires the line separators (0x0A) in via string-join, which doesn't sound much like serialization to me. From liam at w3.org Sat Mar 10 16:41:53 2012 From: liam at w3.org (Liam R E Quin) Date: Sat, 10 Mar 2012 19:41:53 -0500 Subject: [xquery-talk] say how to get "newline" working In-Reply-To: <220256FDE771B74FB662165BC562CF590D462C11@CH1PRD0802MB107.namprd08.prod.outlook.com> References: <87y5r8nknm.fsf@jidanni.org> <220256FDE771B74FB662165BC562CF590D462C11@CH1PRD0802MB107.namprd08.prod.outlook.com> Message-ID: <1331426513.2096.53.camel@localhost.localdomain> On Sat, 2012-03-10 at 22:56 +0000, David Lee wrote: > There is, but you have to call XQuery natively instead of via "the > command line" ??!? you can use string-join( your query here, " ") or you may be able to use serialization options from the command line. Lia > > > -----Original Message----- > From: talk-bounces at x-query.com [mailto:talk-bounces at x-query.com] On Behalf Of jidanni at jidanni.org > Sent: Saturday, March 10, 2012 5:42 PM > To: talk at x-query.com > Cc: basex-talk at mailman.uni-konstanz.de > Subject: Re: [xquery-talk] say how to get "newline" working > > Dear talk at x-query.com, there should be a way to get 'items' back out of Xquery, one per line, without having to hardwire 0x0A (you know, $ perl -wle 'printf "%08b\n" , ord"\n"' > 00001010 > into the code, as discussed in > https://mailman.uni-konstanz.de/pipermail/basex-talk/2012-March/002738.html ) > > ...or require a post-processor. > _______________________________________________ > talk at x-query.com > http://x-query.com/mailman/listinfo/talk > > > > _______________________________________________ > talk at x-query.com > http://x-query.com/mailman/listinfo/talk -- Liam Quin - XML Activity Lead, W3C, http://www.w3.org/People/Quin/ Pictures from old books: http://fromoldbooks.org/ Ankh: irc.sorcery.net irc.gnome.org www.advogato.org From jidanni at jidanni.org Sat Mar 10 18:14:41 2012 From: jidanni at jidanni.org (jidanni at jidanni.org) Date: Sun, 11 Mar 2012 10:14:41 +0800 Subject: [xquery-talk] say how to get "newline" working References: <1331426513.2096.53.camel@localhost.localdomain> Message-ID: <87lin7opda.fsf@jidanni.org> >>>>> "LREQ" == Liam R E Quin writes: LREQ> On Sat, 2012-03-10 at 22:56 +0000, David Lee wrote: >> There is, but you have to call XQuery natively instead of via "the >> command line" LREQ> ??!? LREQ> you can use string-join( your query here, " ") Haven't had to make my own newlines since using those Control Data computers back in the 80's. But if you insist... LREQ> or you may be able to use serialization options from the command line. That would be nice. From dlee at calldei.com Sat Mar 10 18:36:13 2012 From: dlee at calldei.com (David Lee) Date: Sun, 11 Mar 2012 02:36:13 +0000 Subject: [xquery-talk] say how to get "newline" working In-Reply-To: <87lin7opda.fsf@jidanni.org> References: <1331426513.2096.53.camel@localhost.localdomain> <87lin7opda.fsf@jidanni.org> Message-ID: <220256FDE771B74FB662165BC562CF590D462E8A@CH1PRD0802MB107.namprd08.prod.outlook.com> Curious, are you looking for help or just to insult people ? No one is insisting on anything If you actually want help then we need some more information like what processor you are using , what you are trying to achieve and what you've tried and what are the results. If you just want to insult people you've done that already successfully and we can't help much more. -David -----Original Message----- From: jidanni at jidanni.org [mailto:jidanni at jidanni.org] Sent: Saturday, March 10, 2012 9:15 PM To: liam at w3.org Cc: David Lee; talk at x-query.com; basex-talk at mailman.uni-konstanz.de Subject: Re: [xquery-talk] say how to get "newline" working >>>>> "LREQ" == Liam R E Quin writes: LREQ> On Sat, 2012-03-10 at 22:56 +0000, David Lee wrote: >> There is, but you have to call XQuery natively instead of via "the >> command line" LREQ> ??!? LREQ> you can use string-join( your query here, " ") Haven't had to make my own newlines since using those Control Data computers back in the 80's. But if you insist... LREQ> or you may be able to use serialization options from the command line. That would be nice. From dlee at calldei.com Sat Mar 10 18:39:07 2012 From: dlee at calldei.com (David Lee) Date: Sun, 11 Mar 2012 02:39:07 +0000 Subject: [xquery-talk] say how to get "newline" working In-Reply-To: <1331426513.2096.53.camel@localhost.localdomain> References: <87y5r8nknm.fsf@jidanni.org> <220256FDE771B74FB662165BC562CF590D462C11@CH1PRD0802MB107.namprd08.prod.outlook.com> <1331426513.2096.53.camel@localhost.localdomain> Message-ID: <220256FDE771B74FB662165BC562CF590D462EC1@CH1PRD0802MB107.namprd08.prod.outlook.com> On Sat, 2012-03-10 at 22:56 +0000, David Lee wrote: > There is, but you have to call XQuery natively instead of via "the > command line" ??!? My reading was the OP wanted newlines without having to add them in XQuery code. That is beyond XQuery itself so my suggestion of using a native API. But alas I belive I've misunderstood the entire post. -David dlee at calldei.com From liam at w3.org Sat Mar 10 19:01:32 2012 From: liam at w3.org (Liam R E Quin) Date: Sat, 10 Mar 2012 22:01:32 -0500 Subject: [xquery-talk] say how to get "newline" working In-Reply-To: <87lin7opda.fsf@jidanni.org> References: <1331426513.2096.53.camel@localhost.localdomain> <87lin7opda.fsf@jidanni.org> Message-ID: <1331434892.2096.59.camel@localhost.localdomain> On Sun, 2012-03-11 at 10:14 +0800, jidanni at jidanni.org wrote: > Haven't had to make my own newlines since using those Control Data > computers back in the 80's. But if you insist... XQuery is not really a line-oriented language. I don't agree with you that "it should be as easy as seq 1 3" any more than it should be easy to process XML documents recursively an element at a time with sed, or to use grep only within certain elements. Unix is line-oriented, XQuery is XML-oriented. This is true regardless of whether you used Control Data computers. Having said that, I can imagine a BaseX feature request - or maybe even an XQuery feature request - for how to separate items in a sequence when serializing. Such a request could be filed against the 3.0 serialization spec at https://www.w3.org/Bugs/Public/ and the XQuery and XSLT Working Groups will discuss it. Liam -- Liam Quin - XML Activity Lead, W3C, http://www.w3.org/People/Quin/ Pictures from old books: http://fromoldbooks.org/ From jidanni at jidanni.org Sat Mar 10 19:24:02 2012 From: jidanni at jidanni.org (jidanni at jidanni.org) Date: Sun, 11 Mar 2012 11:24:02 +0800 Subject: [xquery-talk] say how to get "newline" working References: <1331434892.2096.59.camel@localhost.localdomain> Message-ID: <87k42rlt0t.fsf@jidanni.org> OK, I submitted https://www.w3.org/Bugs/Public/show_bug.cgi?id=16311 However as I have a rather hard time expressing myself, perhaps those who know what I am saying could add some detail to the bug. In the rare case the detail is wrong, I will chime in there. Thanks. From dlee at calldei.com Sat Mar 10 22:09:00 2012 From: dlee at calldei.com (David Lee) Date: Sun, 11 Mar 2012 06:09:00 +0000 Subject: [xquery-talk] say how to get "newline" working In-Reply-To: <87k42rlt0t.fsf@jidanni.org> References: <1331434892.2096.59.camel@localhost.localdomain>, <87k42rlt0t.fsf@jidanni.org> Message-ID: It looks like the CLP of DB2 gives you the behaviour you are asking for http://publib.boulder.ibm.com/infocenter/db2luw/v9r5/index.jsp?topic=%2Fcom.ibm.db2.luw.xml.doc%2Fdoc%2Fxqrserial.html But as mentioned before this is outside XQuery itself it's the environment , API , or processor that adds this bit I personally feel it would have been a better choice to have used new lines ( whatever they are ) instead of spaces as the default XDM serialization separator for sequences but that's really a tiny thing in the grand scheme of things. Xmlsh does this but it's vastly more useful to NOT serialize sequences but rather keep them in internal form so You can pick them apart Before handing them off to a non XDM aware process. Hence the suggestion of using an API that can get at the results of XQuery aka XDM before serialization. Xmlsh also supports this .. Getting the results of any XDM process in an internal form without serialization. But that's again the province of the processor and/or API. Not XQuery itself. Again back to the unanswered questions What processor are you using What results do you expect and why What is your end goal Maybe there is a better way to accomplish your end goals then text serialization tweaks to XDM Sent from my iPad (excuse the terseness) David A Lee dlee at calldei.com On Mar 10, 2012, at 10:24 PM, "jidanni at jidanni.org" wrote: > OK, I submitted https://www.w3.org/Bugs/Public/show_bug.cgi?id=16311 > However as I have a rather hard time expressing myself, > perhaps those who know what I am saying could add some detail to the > bug. In the rare case the detail is wrong, I will chime in there. Thanks. > _______________________________________________ > talk at x-query.com > http://x-query.com/mailman/listinfo/talk > From jidanni at jidanni.org Sat Mar 10 22:26:29 2012 From: jidanni at jidanni.org (jidanni at jidanni.org) Date: Sun, 11 Mar 2012 14:26:29 +0800 Subject: [xquery-talk] say how to get "newline" working References: Message-ID: <871uozlkkq.fsf@jidanni.org> >>>>> "DL" == David Lee writes: DL> It looks like the CLP of DB2 gives you the behaviour you are asking for DL> http://publib.boulder.ibm.com/infocenter/db2luw/v9r5/index.jsp?topic=%2Fcom.ibm.db2.luw.xml.doc%2Fdoc%2Fxqrserial.html OK maybe BaseX could do something like that, if that could indeed help me toward my goal. DL> What is your end goal http://x-query.com/pipermail/talk/2012-March/003828.html I just thought I could do it all in Xquery, not needing to perl postprocess. From andrew.j.welch at gmail.com Sun Mar 11 01:47:23 2012 From: andrew.j.welch at gmail.com (Andrew Welch) Date: Sun, 11 Mar 2012 09:47:23 +0000 Subject: [xquery-talk] say how to get "newline" working In-Reply-To: <87pqcknhle.fsf@jidanni.org> References: <220256FDE771B74FB662165BC562CF590D462C79@CH1PRD0802MB107.namprd08.prod.outlook.com> <87pqcknhle.fsf@jidanni.org> Message-ID: > I need to convert to text mode by hand: > $ basex file.xq|perl -pwle 's/<[^>]+>//g' > As all text serialization in Xquery can't deal with the same line > concept... unless one hardwires the line separators (0x0A) in via > string-join, which doesn't sound much like serialization to me. There are 2 ways of approaching this, one is a query returning multiple items that must then be combined somehow outside of the query, or a query that returns a single item. Because you've gone with the former, you've now hit a problem of how those items are being combined. You want newlines, but other people might want something else, like a single space, or no space at all. So the easy way, is to just return a single item using string-join. That said, the code you posted had an output method of html and returned elements... which suggests you just want indent set? -- Andrew Welch http://andrewjwelch.com From christian.gruen at gmail.com Sun Mar 11 04:09:55 2012 From: christian.gruen at gmail.com (=?ISO-8859-1?Q?Christian_Gr=FCn?=) Date: Sun, 11 Mar 2012 13:09:55 +0100 Subject: [xquery-talk] [basex-talk] say how to get "newline" working In-Reply-To: <87k42rlt0t.fsf@jidanni.org> References: <1331434892.2096.59.camel@localhost.localdomain> <87k42rlt0t.fsf@jidanni.org> Message-ID: > OK, I submitted https://www.w3.org/Bugs/Public/show_bug.cgi?id=16311 > However as I have a rather hard time expressing myself, > perhaps those who know what I am saying could add some detail to the > bug. In the rare case the detail is wrong, I will chime in there. Thanks. I've added the following suggestion to the Bugzilla entry: I've looked up the XQuery Serialization Spec.: Step 3 in Section 2, "Sequence Normalization", contains the sub-sentence "separated by a single space" [1], which would probably have to be extended to take an additional serialization parameter into account. An XQuery 3.0 expression that uses the parameter could e.g. look as follows: declare option output:separator " "; (1 to 10) Opinions are welcome. Christian [1] http://www.w3.org/TR/xslt-xquery-serialization-30/#serdm From jidanni at jidanni.org Sun Mar 11 19:26:12 2012 From: jidanni at jidanni.org (jidanni at jidanni.org) Date: Mon, 12 Mar 2012 11:26:12 +0800 Subject: [xquery-talk] say how to get "newline" working References: Message-ID: <87r4wy7b57.fsf@jidanni.org> >>>>> "AW" == Andrew Welch writes: AW> So the easy way, is to just return a single item using string-join. Which means we text wanters don't get to enjoy the benefits of all that serialization work one single bit. AW> ...which suggests you just want indent set? All I know is I just added an example of what I want "a flip of a switch" declaration change to cause in https://www.w3.org/Bugs/Public/show_bug.cgi?id=16311#c2 From dlee at calldei.com Mon Mar 12 06:46:14 2012 From: dlee at calldei.com (David Lee) Date: Mon, 12 Mar 2012 14:46:14 +0000 Subject: [xquery-talk] fn:format-dateTime question Message-ID: <220256FDE771B74FB662165BC562CF590D463DD9@CH1PRD0802MB107.namprd08.prod.outlook.com> I'm having a hard time decyphering the specs for the new XQuery 3.0 fn:format-dateTime when it comes to numeric values. In particular, if you pass a language argument does that take precidence over or affect at all numeric values. E.g. what is the expected result of this : fn:format-dateTime(xs:dateTime("1996-08-30T23:35:09.12-09:00"),"[Y]","hi","AD","US"), ???? or 1996 And this fn:format-dateTime(xs:dateTime("1996-08-30T23:35:09.12-09:00"),"[Y01]","ar","AD","AE") ?? or 97 In the text for http://www.w3.org/TR/2011/WD-xpath-functions-30-20111213/#func-format-dateTime I don't find any description on how language affects numeric values, or on if the digit values have higher or lesser precidence then the values. But this example: Jewish (with Western numbering) format-date($d, "[D] [Mn] [Y]", "he", "AM", ()) ?26 ??? 5763 Jewish (with traditional numbering) format-date($d, "[Dאt] [Mn] [Yאt]", "he", "AM", ()) ??? ??? ????? Implies that language with no format digits should be western, and that format digits override language codes. Any suggestions on how to clarify this in partiular a refence to the spec where the rules are defined. I'm sure I missed something. I do read this: The language is used to select the appropriate language-dependent forms of: names (for example, of months) numbers expressed as words or as ordinals (twenty, 20th, twentieth) hour convention (0-23 vs 1-24, 0-11 vs 1-12) first day of week, first week of year To me this implies that languages has no effect at all on numeric formats. This is consistant with the example, but thats only by exclusion not inclusion of wording. Thanks for any suggestions. ---------------------------------------- David A. Lee dlee at calldei.com http://www.xmlsh.org -------------- next part -------------- An HTML attachment was scrubbed... URL: From dlee at calldei.com Mon Mar 12 07:40:26 2012 From: dlee at calldei.com (David Lee) Date: Mon, 12 Mar 2012 15:40:26 +0000 Subject: [xquery-talk] fn:format-dateTime question In-Reply-To: <4F5E137E.3040206@saxonica.com> References: <220256FDE771B74FB662165BC562CF590D463DD9@CH1PRD0802MB107.namprd08.prod.outlook.com> <4F5E137E.3040206@saxonica.com> Message-ID: <220256FDE771B74FB662165BC562CF590D463ED3@CH1PRD0802MB107.namprd08.prod.outlook.com> Thanks for the confirmation. ---------------------------------------- David A. Lee dlee at calldei.com http://www.xmlsh.org From: talk-bounces at x-query.com [mailto:talk-bounces at x-query.com] On Behalf Of Michael Kay Sent: Monday, March 12, 2012 11:17 AM To: talk at x-query.com Subject: Re: [xquery-talk] fn:format-dateTime question The spec says: The language is used to select the appropriate language-dependent forms of: names (for example, of months) numbers expressed as words or as ordinals (twenty, 20th, twentieth) hour convention (0-23 vs 1-24, 0-11 vs 1-12) first day of week, first week of year It isn't used to select what family of digits to use; that's done using the format token, for example D01 requests ASCII digits. In many languages, for example in business or scientific writing, western digits are often used in place of "native" digits, so the desired language is not a good way of selecting what digit family to use. (See here for example: http://www.banmuang.co.th/) Michael Kay Saxonica On 12/03/2012 14:46, David Lee wrote: I'm having a hard time decyphering the specs for the new XQuery 3.0 fn:format-dateTime when it comes to numeric values. In particular, if you pass a language argument does that take precidence over or affect at all numeric values. E.g. what is the expected result of this : fn:format-dateTime(xs:dateTime("1996-08-30T23:35:09.12-09:00"),"[Y]","hi","AD","US"), ???? or 1996 And this fn:format-dateTime(xs:dateTime("1996-08-30T23:35:09.12-09:00"),"[Y01]","ar","AD","AE") ?? or 97 In the text for http://www.w3.org/TR/2011/WD-xpath-functions-30-20111213/#func-format-dateTime I don't find any description on how language affects numeric values, or on if the digit values have higher or lesser precidence then the values. But this example: Jewish (with Western numbering) format-date($d, "[D] [Mn] [Y]", "he", "AM", ()) ?26 ??? 5763 Jewish (with traditional numbering) format-date($d, "[Dאt] [Mn] [Yאt]", "he", "AM", ()) ??? ??? ????? Implies that language with no format digits should be western, and that format digits override language codes. Any suggestions on how to clarify this in partiular a refence to the spec where the rules are defined. I'm sure I missed something. I do read this: The language is used to select the appropriate language-dependent forms of: names (for example, of months) numbers expressed as words or as ordinals (twenty, 20th, twentieth) hour convention (0-23 vs 1-24, 0-11 vs 1-12) first day of week, first week of year To me this implies that languages has no effect at all on numeric formats. This is consistant with the example, but thats only by exclusion not inclusion of wording. Thanks for any suggestions. ---------------------------------------- David A. Lee dlee at calldei.com http://www.xmlsh.org _______________________________________________ talk at x-query.com http://x-query.com/mailman/listinfo/talk -------------- next part -------------- An HTML attachment was scrubbed... URL: From jidanni at jidanni.org Fri Mar 16 19:14:59 2012 From: jidanni at jidanni.org (jidanni at jidanni.org) Date: Sat, 17 Mar 2012 11:14:59 +0800 Subject: [xquery-talk] there are just some places where you can't put comments Message-ID: <878vizyl3g.fsf@jidanni.org> There are just some places where you can't put comments. Forget about 'commenting out a block of code' if it resides in "return". let $a:=1 return 666 (: no way to put a comment here :) (: no way :) {} {(: no way :)} From dlee at calldei.com Fri Mar 16 19:18:41 2012 From: dlee at calldei.com (David Lee) Date: Sat, 17 Mar 2012 03:18:41 +0000 Subject: [xquery-talk] there are just some places where you can't put comments In-Reply-To: <878vizyl3g.fsf@jidanni.org> References: <878vizyl3g.fsf@jidanni.org> Message-ID: <1A84B9D6-CF95-4B40-A581-6DE1E48376C7@calldei.com> It's not the return > > let $a:=1 > return > > > {()(: way :)} > Sent from my iPad (excuse the terseness) David A Lee dlee at calldei.com On Mar 16, 2012, at 11:15 PM, "jidanni at jidanni.org" wrote: > There are just some places where you can't put comments. > Forget about 'commenting out a block of code' if it resides in "return". > > let $a:=1 > return > > 666 > (: no way to put a comment here :) > (: no way :) > {} {(: no way :)} > > _______________________________________________ > talk at x-query.com > http://x-query.com/mailman/listinfo/talk > From jidanni at jidanni.org Fri Mar 16 19:27:08 2012 From: jidanni at jidanni.org (jidanni at jidanni.org) Date: Sat, 17 Mar 2012 11:27:08 +0800 Subject: [xquery-talk] there are just some places where you can't put comments References: <1A84B9D6-CF95-4B40-A581-6DE1E48376C7@calldei.com> Message-ID: <874ntnykj7.fsf@jidanni.org> OK, I forgot. Sorry. Maybe I should always remember the comment syntax is ()(: comment :) instead of (: comment :). That perhaps will always work. From dlee at calldei.com Fri Mar 16 19:53:29 2012 From: dlee at calldei.com (David Lee) Date: Sat, 17 Mar 2012 03:53:29 +0000 Subject: [xquery-talk] there are just some places where you can't put comments In-Reply-To: <874ntnykj7.fsf@jidanni.org> References: <1A84B9D6-CF95-4B40-A581-6DE1E48376C7@calldei.com>, <874ntnykj7.fsf@jidanni.org> Message-ID: All depends ... You don't always use the () That is not strictly part of the comments. But some places need an expression and comments are not expressions Try just {} and you will see Sent from my iPad (excuse the terseness) David A Lee dlee at calldei.com On Mar 16, 2012, at 11:27 PM, "jidanni at jidanni.org" wrote: > OK, I forgot. Sorry. > Maybe I should always remember the comment syntax is ()(: comment :) > instead of (: comment :). That perhaps will always work. > From Arve.Gengelbach at uni-konstanz.de Tue Mar 20 02:33:49 2012 From: Arve.Gengelbach at uni-konstanz.de (Arve Gengelbach) Date: Tue, 20 Mar 2012 11:33:49 +0100 Subject: [xquery-talk] datatype xs:duration Message-ID: Hi all, currently working on stuff with xs:duration. We can not define any useful ordering relation on xs:duration (Section 10.1, XQuery & XPath Functions and Operators). But why can one not add up xs:duration?s and why can?t one add xs:duration to xs:dateTime? Same questions in a different way: Given the module [durations]. Can you give a testcase for durations:sum-durations() and durations:add-duration-to-dateTime() to fail? cheers Arve [durations]: https://gist.github.com/a58090da9cc7f12975b5 From andrew.j.welch at gmail.com Tue Mar 20 02:42:05 2012 From: andrew.j.welch at gmail.com (Andrew Welch) Date: Tue, 20 Mar 2012 10:42:05 +0000 Subject: [xquery-talk] datatype xs:duration In-Reply-To: References: Message-ID: > But why can one not add up xs:duration?s and why can?t one add xs:duration to xs:dateTime? You can add a subtype of xs:duration to a xs:dateTime, eg xs:dateTime('2012-03-20') + xs:dayTimeDuration('P2D') -- Andrew Welch http://andrewjwelch.com From andrew.j.welch at gmail.com Tue Mar 20 03:23:48 2012 From: andrew.j.welch at gmail.com (Andrew Welch) Date: Tue, 20 Mar 2012 11:23:48 +0000 Subject: [xquery-talk] datatype xs:duration In-Reply-To: <62AEEE2D-B9D9-4C32-BBD4-EE8247BA38C8@uni-konstanz.de> References: <62AEEE2D-B9D9-4C32-BBD4-EE8247BA38C8@uni-konstanz.de> Message-ID: Please remember to reply-to-all and keep everything on the list, > Why does the spec not provide a method add-durations() ? > What were the reasons not to have such a function? > > Same for my other question: > Why does the spec not provide a method add-duration-to-dateTime() ? > What were the reasons not to have such a method? Have a look at: http://www.w3.org/TR/xpath-functions/#duration-arithmetic Note that the op: prefixed functions are example functions rather than actual functions you can call... as the normal + - operators etc work on those types. So to add a duration to date, you use $date + $duration, to subtract a duration you use $date - $duration and so on. If that doesn't make sense, post back (reply-to-all) with some sample code. -- Andrew Welch http://andrewjwelch.com From mike at saxonica.com Tue Mar 20 04:09:08 2012 From: mike at saxonica.com (Michael Kay) Date: Tue, 20 Mar 2012 12:09:08 +0000 Subject: [xquery-talk] datatype xs:duration In-Reply-To: References: Message-ID: <4F687364.60408@saxonica.com> The reason is primarily because the result of xs:duration('PT1M') + xs:duration('-PT1D') (one month minus one day) is not well defined. One could have defined rules for addition of durations that allowed some cases to succeed and made this one fail, but one chose not to. Michael Kay Saxonica On 20/03/2012 10:33, Arve Gengelbach wrote: > Hi all, > > currently working on stuff with xs:duration. > > We can not define any useful ordering relation on xs:duration (Section 10.1, XQuery& XPath Functions and Operators). > But why can one not add up xs:duration?s and why can?t one add xs:duration to xs:dateTime? > > Same questions in a different way: Given the module [durations]. Can you give a testcase for durations:sum-durations() and durations:add-duration-to-dateTime() to fail? > > cheers > Arve > > [durations]: https://gist.github.com/a58090da9cc7f12975b5 > _______________________________________________ > talk at x-query.com > http://x-query.com/mailman/listinfo/talk From wcandillon at gmail.com Fri Mar 23 02:15:51 2012 From: wcandillon at gmail.com (William Candillon) Date: Fri, 23 Mar 2012 11:15:51 +0100 Subject: [xquery-talk] [ANN] Zorba 2.2 "Coeus" is out Message-ID: Hello Gang, We are very excited to announce the release of Zorba 2.2, codename "Coeus". The release announcement is available at http://www.zorba-xquery.com/html/entry/2012/03/22/Zorba_22 and the ChangeLog at https://launchpadlibrarian.net/97678336/ChangeLog. We hope that you will enjoy this release. May the FLWOR be with you, William From christian.gruen at gmail.com Sat Mar 24 10:29:34 2012 From: christian.gruen at gmail.com (=?ISO-8859-1?Q?Christian_Gr=FCn?=) Date: Sat, 24 Mar 2012 19:29:34 +0100 Subject: [xquery-talk] [ANN] BaseX 7.2: The EDBT Release In-Reply-To: References: Message-ID: Dear all, after some busy weeks, we are glad to announce BaseX 7.2, the EDBT Release! The latest version offers the following new features: * support for the new RESTXQ API for building XQuery web services [1] * improved support for running BaseX as web application [2] * XQuery: higher order functions added to speed up Top-K queries [3] * proxy server settings added [4] * advanced TagSoup options added for importing HTML files [5] * XQuery: faster traversal of full-text index entries via ft:tokens() [6] * Command-line: embedded readline and history support via JLine [7] * XQuery 3.0: annotation added, updated EQName syntax (Q{uri}name) * opened databases are now pinned OS-wide to reduce write conflicts * HTML5 serialization of query results * a printable version of our Wiki documentation As usual, more infos can be found on our homepage [8]. All your feedback is welcome. If you will be attending the EDBT Conference next week, we are looking forward to seeing you there, Christian, BaseX Team 2012 [1] http://docs.basex.org/wiki/RESTXQ [2] http://docs.basex.org/wiki/Web_Application [3] http://docs.basex.org/wiki/Higher-Order_Functions_Module#hof:top-k-by [4] http://docs.basex.org/wiki/Options#PROXYHOST [5] http://docs.basex.org/wiki/Parsers#Options [6] http://docs.basex.org/wiki/Full-Text_Module#ft:tokens [7] http://jline.sourceforge.net/ [8] http://basex.org/