From Nicholas.Ardlie at immi.gov.au Mon Feb 1 10:30:36 2010 From: Nicholas.Ardlie at immi.gov.au (Nicholas.Ardlie@immi.gov.au) Date: Sun Jan 31 15:19:25 2010 Subject: [xquery-talk] XQuery frameworks [SEC=UNCLASSIFIED] In-Reply-To: <964945.78705.qm@web27107.mail.ukl.yahoo.com> Message-ID: Hi Hans, The FullMoon processing framework meets the criteria you have described. See http://projects.arcs.org.au/trac/fullmoon/wiki/FullMoon I initially developed it in 2007 for Geoscience Australia and it was taken over and further developed by CSIRO. It's design is fairly generic but the packaged rule sets (xquery) are specific to processing XMI representations of ISO19136 UML models. Regards, Nick Ardlie Hans-Juergen Rennau talk@x-query.com Sent by: cc talk-bounces@x-qu ery.com Subject [xquery-talk] XQuery frameworks 29/01/2010 09:03 Protective Mark PM Dear People, presently I am scribbling away at a little XQuery?framework into which one may plug user-supplied queries, which pulls them into a particular larger processing model, using them as combinable building blocks. Suddenly my pen hovers in mid-air, I raise my head and, listening to the snowflakes rustling in the hedge, I wonder: probably some XQuery?frameworks already exist, and we XQuery developers might really profit from being aware of them, so that, pushing the argument to its?extreme, everytime we write a query we might immediately consider plugging it into this or that framework, to enhance its usefulness. So my *question*: would anybody like to point to some XQuery?framework into which one may plug queries in order to harvest added value,?perhaps hinting at the kind of advantage one obtains? With kind regards, Hans-Juergen Rennau PS: Before closing, one word about XProc. I would not regard the language itself?as such a framework, rather as a toolkit for creating such frameworks, implementing them perhaps as a set of?XProc documents. __________________________________________________ Do You Yahoo!? Sie sind Spam leid? Yahoo! Mail verf?gt ?ber einen herausragenden Schutz gegen Massenmails. http://mail.yahoo.com _______________________________________________ talk@x-query.com http://x-query.com/mailman/listinfo/talk -------------------------------------------------------------------- Important Notice: If you have received this email by mistake, please advise the sender and delete the message and attachments immediately. This email, including attachments, may contain confidential, sensitive, legally privileged and/or copyright information. Any review, retransmission, dissemination or other use of this information by persons or entities other than the intended recipient is prohibited. DIAC respects your privacy and has obligations under the Privacy Act 1988. The official departmental privacy policy can be viewed on the department's website at www.immi.gov.au. See: http://www.immi.gov.au/functional/privacy.htm --------------------------------------------------------------------- From hrennau at yahoo.de Mon Feb 1 23:49:56 2010 From: hrennau at yahoo.de (Hans-Juergen Rennau) Date: Mon Feb 1 19:56:00 2010 Subject: AW: [xquery-talk] XQuery frameworks In-Reply-To: <1264986887.7875.79.camel@desktop.barefootcomputing.com> References: <964945.78705.qm@web27107.mail.ukl.yahoo.com> <1264986887.7875.79.camel@desktop.barefootcomputing.com> Message-ID: <428719.2277.qm@web27106.mail.ukl.yahoo.com> Liam, 'extend standardization "beyond the query"' - that is an excellent formula, I think! As one of the reasons why the need is real I regard the challenge of data integration. I have a feeling that there is a remarkable?contradiction between potential and reality. XQuery has a great?potential as an integrator, what with the possibility to just *name* the resource (URI) and immediately have its structured content under your fingertips. But if the actual usage of XQuery does not yet live up to the potential, one of the reasons may be that it is difficult to set up a system of many queries to a robust whole, although the *single* queries can be written so easily and?efficiently. Put differently: it makes a great difference if the focus of integration lies within a single query, or beyond. A movement?"beyond the query":?how about a processing model just?one level above the query level, of moderate complexity, integrating the execution of single queries, for example by assigning to them properties which would allow to automate their squencing, input provision and output delivery? The XQuery spec provides for the possibility to write library modules, but it?is not possible to formulate relationships between library functions. In general, we cannot say someting "about" a function. We cannot, for example, express that a query Q has a "logical" source document D, although the actual?input is not?(or not only) D itself, but the result produced by some other query Q0, likewise logically - or perhaps literally - processing?D. A really simple XML language might? make it clear that the command "apply Q to D" would have to be expanded?by a framework into a chain:?"apply Q0 to D, resulting in R;?present Q to R". We do not have this level of abstraction which would allow for orchestrating the individual queries. The XQuery language level knows only XDM values and expressions.?I wonder if?just one?level above the language a simple, standardized processing model might not be possible, simple enough to be attractive and really?enhancing efficiency. With kind regards, Hans-Juergen Rennau ? ----- Urspr?ngliche Mail ---- Von: Liam R E Quin An: Hans-Juergen Rennau CC: talk@x-query.com Gesendet: Montag, den 1. Februar 2010, 2:14:47 Uhr Betreff: Re: [xquery-talk] XQuery frameworks On Fri, 2010-01-29 at 10:03 +0000, Hans-Juergen Rennau wrote: > Dear People, > > presently I am scribbling away at a little XQuery framework A few years ago when I did http://www.fromoldbooks.org/Search/ using XQuery, I wrote my own.? It's far from perfect -- it is a perl script that checks the system load average (!), and the query parameters, and then reads an xml config file, and calls up an external xquery engine based on a variable -- so I could easily switch between galax, qizx and saxon, initially, and later dbxml too.? It keeps a cache, to avoid firing up a JVM (two of those implementations are in Java) with each incoming HTTP request, and does get fairly high cache hit rates. It'd be a reasonable question, "why not use servlets", and a lot of the answer to that is that, when I wrote it, Sun's licence for Java was such that Linux distributions couldn't easily include it, and Java was a sufficient pain to set up that I avoided any architecture that depended on it.? But then I started using Saxon, and, later qizx, both of which do use Java. More recently I've used dbxml, but not on the production system, as the packaging for dbxml is even weirder than for Java, and my server has changed operating systems several times over the years. All this is a long winded way of saying, a lot of it depends on the environment.? I'm particularly interested (since I work at W3C...) in what we could do to extend standardisation "beyond the query" into more of a framework, and how, and what would be the value of that, but I think the XQuery Working Group right now does not have the resources to do that sort of work. Liam -- 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 __________________________________________________ Do You Yahoo!? Sie sind Spam leid? Yahoo! Mail verf?gt ?ber einen herausragenden Schutz gegen Massenmails. http://mail.yahoo.com From mike at saxonica.com Tue Feb 2 04:58:30 2010 From: mike at saxonica.com (Michael Kay) Date: Mon Feb 1 20:38:09 2010 Subject: [xquery-talk] XQuery frameworks In-Reply-To: <428719.2277.qm@web27106.mail.ukl.yahoo.com> References: <964945.78705.qm@web27107.mail.ukl.yahoo.com><1264986887.7875.79.camel@desktop.barefootcomputing.com> <428719.2277.qm@web27106.mail.ukl.yahoo.com> Message-ID: > 'extend standardization "beyond the query"' - that is an > excellent formula, I think! As one of the reasons why the > need is real I regard the challenge of data integration.... > > A movement?"beyond the query":?how about a processing model > just?one level above the query level, of moderate complexity, > integrating the execution of single queries, for example by > assigning to them properties which would allow to automate > their squencing, input provision and output delivery? Some of this need is satisfied by XProc. There are some who would like to see the whole application written in XQuery and don't want to see any other language present. But to my mind, integration is often about combining and reusing application components written in different languages and different technologies, and XProc meets that need admirably. Regards, Michael Kay http://www.saxonica.com/ http://twitter.com/michaelhkay From hrennau at yahoo.de Tue Feb 2 09:53:32 2010 From: hrennau at yahoo.de (Hans-Juergen Rennau) Date: Tue Feb 2 01:25:37 2010 Subject: AW: [xquery-talk] XQuery frameworks In-Reply-To: References: <964945.78705.qm@web27107.mail.ukl.yahoo.com><1264986887.7875.79.camel@desktop.barefootcomputing.com> <428719.2277.qm@web27106.mail.ukl.yahoo.com> Message-ID: <373985.84375.qm@web27108.mail.ukl.yahoo.com> Michael, no doubt about the importance of XProc as an integration language above XQuery, and no doubt we need such a language which is not confined to orchestrating XQuery queries, but "application components in different languages", namely X...-components. I would position XProc two levels above XQuery, whereas?an?"XQuery-only integrator" would be only one level above. If?we could afford only one single language above XQuery, the choice should certainly be the higher alternative, opening?much larger space for integration. But remains the question: is there no need for additional integrators between the XQuery level and the XProc level? I believe that such integrators can be designed and could be useful. However, if the?small-scale integration can be done in such a generic way as to deserve standardization - this is a different question. (To explore it, a first step might?be to define possible advantages in general terms.)?Lightweight-integration language between XQuery and XProc, is it possible, yes or no, is it worthwhile, yes or no? With kind regards, Hans-Juergen Rennau ----- Urspr?ngliche Mail ---- Von: Michael Kay An: Hans-Juergen Rennau ; liam@w3.org CC: talk@x-query.com Gesendet: Dienstag, den 2. Februar 2010, 5:58:30 Uhr Betreff: RE: [xquery-talk] XQuery frameworks > 'extend standardization "beyond the query"' - that is an > excellent formula, I think! As one of the reasons why the > need is real I regard the challenge of data integration.... > > A movement?"beyond the query":?how about a processing model > just?one level above the query level, of moderate complexity, > integrating the execution of single queries, for example by > assigning to them properties which would allow to automate > their squencing, input provision and output delivery? Some of this need is satisfied by XProc. There are some who would like to see the whole application written in XQuery and don't want to see any other language present. But to my mind, integration is often about combining and reusing application components written in different languages and different technologies, and XProc meets that need admirably. Regards, Michael Kay http://www.saxonica.com/ http://twitter.com/michaelhkay __________________________________________________ Do You Yahoo!? Sie sind Spam leid? Yahoo! Mail verf?gt ?ber einen herausragenden Schutz gegen Massenmails. http://mail.yahoo.com From mail at martin-probst.com Tue Feb 2 11:13:56 2010 From: mail at martin-probst.com (Martin Probst) Date: Tue Feb 2 01:45:26 2010 Subject: [xquery-talk] XQuery frameworks In-Reply-To: <373985.84375.qm@web27108.mail.ukl.yahoo.com> References: <964945.78705.qm@web27107.mail.ukl.yahoo.com> <1264986887.7875.79.camel@desktop.barefootcomputing.com> <428719.2277.qm@web27106.mail.ukl.yahoo.com> <373985.84375.qm@web27108.mail.ukl.yahoo.com> Message-ID: <6dca08521002020213x61479bd0x24c966a7e564c19d@mail.gmail.com> > But remains the question: is there no need for additional integrators between the XQuery level and the XProc level? I believe that such integrators can be designed and could be useful. What would they do? What purpose would they have? Of course you can introduce any number of indirections between XProc and XQuery, but why would you want to? Martin From andrew.j.welch at gmail.com Tue Feb 2 10:23:32 2010 From: andrew.j.welch at gmail.com (Andrew Welch) Date: Tue Feb 2 01:54:55 2010 Subject: [xquery-talk] XQuery frameworks In-Reply-To: <6dca08521002020213x61479bd0x24c966a7e564c19d@mail.gmail.com> References: <964945.78705.qm@web27107.mail.ukl.yahoo.com> <1264986887.7875.79.camel@desktop.barefootcomputing.com> <428719.2277.qm@web27106.mail.ukl.yahoo.com> <373985.84375.qm@web27108.mail.ukl.yahoo.com> <6dca08521002020213x61479bd0x24c966a7e564c19d@mail.gmail.com> Message-ID: <74a894af1002020223p5e542384h46ae1081d75557ec@mail.gmail.com> On 2 February 2010 10:13, Martin Probst wrote: >> But remains the question: is there no need for additional integrators between the XQuery level and the XProc level? I believe that such integrators can be designed and could be useful. > > What would they do? What purpose would they have? Of course you can > introduce any number of indirections between XProc and XQuery, but why > would you want to? Didn't someone once say "Any problem in computer science can be solved with another level of indirection" :) But then according to this: http://en.wikipedia.org/wiki/David_Wheeler_%28computer_scientist%29 ...he followed it with "But that usually will create another problem." -- Andrew Welch http://andrewjwelch.com Kernow: http://kernowforsaxon.sf.net/ From james.fuller.2007 at gmail.com Tue Feb 2 11:23:50 2010 From: james.fuller.2007 at gmail.com (James Fuller) Date: Tue Feb 2 01:55:13 2010 Subject: [xquery-talk] XQuery frameworks In-Reply-To: <6dca08521002020213x61479bd0x24c966a7e564c19d@mail.gmail.com> References: <964945.78705.qm@web27107.mail.ukl.yahoo.com> <1264986887.7875.79.camel@desktop.barefootcomputing.com> <428719.2277.qm@web27106.mail.ukl.yahoo.com> <373985.84375.qm@web27108.mail.ukl.yahoo.com> <6dca08521002020213x61479bd0x24c966a7e564c19d@mail.gmail.com> Message-ID: in web applications may I proffer that REST is maybe the abstraction layer you desire, in eXist (where there is a default RESTful interface) u also get rewriting which when combined cover most of my needs in this 'space'. this reminds me of a quote (which I cannot remember) that basically says any problem can be solved with yet another layer of abstraction, except for the problem of too many layers of abstraction. James Fuller On Tue, Feb 2, 2010 at 11:13 AM, Martin Probst wrote: >> But remains the question: is there no need for additional integrators between the XQuery level and the XProc level? I believe that such integrators can be designed and could be useful. > > What would they do? What purpose would they have? Of course you can > introduce any number of indirections between XProc and XQuery, but why > would you want to? > > Martin > _______________________________________________ > talk@x-query.com > http://x-query.com/mailman/listinfo/talk > From mail at martin-probst.com Tue Feb 2 11:32:18 2010 From: mail at martin-probst.com (Martin Probst) Date: Tue Feb 2 02:03:40 2010 Subject: [xquery-talk] XQuery frameworks In-Reply-To: References: <964945.78705.qm@web27107.mail.ukl.yahoo.com> <1264986887.7875.79.camel@desktop.barefootcomputing.com> <428719.2277.qm@web27106.mail.ukl.yahoo.com> <373985.84375.qm@web27108.mail.ukl.yahoo.com> <6dca08521002020213x61479bd0x24c966a7e564c19d@mail.gmail.com> Message-ID: <6dca08521002020232p50ac31ccn82ad5051d18f4a45@mail.gmail.com> > in web applications may I proffer that REST is maybe the abstraction > layer you desire, in eXist (where there is a default RESTful > interface) u also get rewriting which when combined cover most of my > needs in this 'space'. The nicest approach to this I have seen so far is in day's Sling framework. Basically you have a hierarchical repository of files/documents that have MIME types (multiple though), and if a request hits a file, handlers are triggered on MIME type and conditions of the request (method, headers, accept, ...). Of course they also support rewriting and path mapping, but I find the first approach nicer. If you have side effect free handlers (hello XQuery) you could also get proper HTTP cache support for free. Pointing a browser at /path/to/my/script that then does something magic (maybe even based on sessions!) feels so 1999 PHP style. However this requires some relatively application specific decisions to be taken by the framework, e.g. in xDB which metadata properties describe the MIME types. And frankly, the last time I looked I found eXists approach of calling into impure functions to manipulate sessions, headers, etc. relatively ugly. It just feels very wrong to have impurity in XQuery, at least to me. > this reminds me of a quote (which I cannot remember) that basically > says any problem can be solved with yet another layer of abstraction, > except for the problem of too many layers of abstraction. Yes, I was sort of quoting that. One of my all time favorites ;-) Martin From hrennau at yahoo.de Tue Feb 2 11:02:50 2010 From: hrennau at yahoo.de (Hans-Juergen Rennau) Date: Tue Feb 2 02:33:37 2010 Subject: AW: [xquery-talk] XQuery frameworks In-Reply-To: <6dca08521002020213x61479bd0x24c966a7e564c19d@mail.gmail.com> References: <964945.78705.qm@web27107.mail.ukl.yahoo.com> <1264986887.7875.79.camel@desktop.barefootcomputing.com> <428719.2277.qm@web27106.mail.ukl.yahoo.com> <373985.84375.qm@web27108.mail.ukl.yahoo.com> <6dca08521002020213x61479bd0x24c966a7e564c19d@mail.gmail.com> Message-ID: <696101.19385.qm@web27105.mail.ukl.yahoo.com> Martin, yes, what purpose whould they have? Two purposes I can immediately think of is to organize document flow from query to query, and automated input selection for batch processing, e.g. based on document properties and selection criteria. Let me briefly expand?ideas about document flow. Imagine we introduced the concept of a "document type", not in the conventional - literal - way referring to schema and DTD, but?as an abstract component?identified by a QName?and properties; and imagine we possess a simple language for characterizing queries in terms of input and output document types (in the sense just introduced); then things can get really in motion. And note the aspect that the whole approach is very concept minded, systematically building on new kinds of components and the semantics of their properties. Practically, this can get efficient and attractive, indeed, With kind regards Hans-Juergen Rennau ----- Urspr?ngliche Mail ---- Von: Martin Probst An: Hans-Juergen Rennau CC: Michael Kay ; liam@w3.org; Nicholas.Ardlie@immi.gov.au; talk@x-query.com Gesendet: Dienstag, den 2. Februar 2010, 11:13:56 Uhr Betreff: Re: [xquery-talk] XQuery frameworks > But remains the question: is there no need for additional integrators between the XQuery level and the XProc level? I believe that such integrators can be designed and could be useful. What would they do? What purpose would they have? Of course you can introduce any number of indirections between XProc and XQuery, but why would you want to? Martin __________________________________________________ Do You Yahoo!? Sie sind Spam leid? Yahoo! Mail verf?gt ?ber einen herausragenden Schutz gegen Massenmails. http://mail.yahoo.com From elharo at ibiblio.org Tue Feb 2 07:08:41 2010 From: elharo at ibiblio.org (Elliotte Rusty Harold) Date: Tue Feb 2 03:38:08 2010 Subject: [xquery-talk] effect of namespace on collection function; weird Message-ID: <654a2bb31002020408n7d05638ap92bfaefedb946fd5@mail.gmail.com> Can this possibly be right? After much debugging I have bolied a really confusing bug down to this test case. The following query prints 3097: { let $num := count(collection("/db/quotes")/quote) return $num } and this query prints 0: { let $num := count(collection("/db/quotes")/quote) return $num } The only difference is the default namespace declaration. In the documents being queried the quote elements are indeed in no namespace. Is XQuery really supposed to be applying default namespaces to unqualified names in path expressions? Do I report this as a bug in the XQuery processor or do I scream at the insanity of the XQuery working group? -- Elliotte Rusty Harold elharo@ibiblio.org From andrew.j.welch at gmail.com Tue Feb 2 12:19:10 2010 From: andrew.j.welch at gmail.com (Andrew Welch) Date: Tue Feb 2 03:48:27 2010 Subject: [xquery-talk] effect of namespace on collection function; weird In-Reply-To: <654a2bb31002020408n7d05638ap92bfaefedb946fd5@mail.gmail.com> References: <654a2bb31002020408n7d05638ap92bfaefedb946fd5@mail.gmail.com> Message-ID: <74a894af1002020419s306c87b7hd1ce6219b53b75b5@mail.gmail.com> On 2 February 2010 12:08, Elliotte Rusty Harold wrote: > Can this possibly be right? After much debugging I have bolied a > really confusing bug down to this test case. The following query > prints 3097: > > > { > let $num := count(collection("/db/quotes")/quote) > return $num > } > > > and this query prints 0: > > > { > let $num := count(collection("/db/quotes")/quote) > return $num > } > > > The only difference is the default namespace declaration. In the > documents being queried the quote elements are indeed in no namespace. > Is XQuery really supposed to be applying default namespaces to > unqualified names in path expressions? Do I report this as a bug in > the XQuery processor or do I scream at the insanity of the XQuery > working group? It's not a bug, and yes it does make you want to scream. Have a look at: http://markmail.org/thread/sbwubypg4kcv7trg -- Andrew Welch http://andrewjwelch.com Kernow: http://kernowforsaxon.sf.net/ From james.fuller.2007 at gmail.com Tue Feb 2 13:42:13 2010 From: james.fuller.2007 at gmail.com (James Fuller) Date: Tue Feb 2 04:11:10 2010 Subject: [xquery-talk] effect of namespace on collection function; weird In-Reply-To: <654a2bb31002020408n7d05638ap92bfaefedb946fd5@mail.gmail.com> References: <654a2bb31002020408n7d05638ap92bfaefedb946fd5@mail.gmail.com> Message-ID: yes frustrating, but dont forget you can use: declare default element namespace "http://www.w3.org/1999/xhtml"; to change the default element namespace in XQuery James Fuller On Tue, Feb 2, 2010 at 1:08 PM, Elliotte Rusty Harold wrote: > Can this possibly be right? After much debugging I have bolied a > really confusing bug down to this test case. The following query > prints 3097: > > > { > let $num := count(collection("/db/quotes")/quote) > return $num > } > > > and this query prints 0: > > > { > let $num := count(collection("/db/quotes")/quote) > return $num > } > > > The only difference is the default namespace declaration. In the > documents being queried the quote elements are indeed in no namespace. > Is XQuery really supposed to be applying default namespaces to > unqualified names in path expressions? Do I report this as a bug in > the XQuery processor or do I scream at the insanity of the XQuery > working group? > > > -- > Elliotte Rusty Harold > elharo@ibiblio.org > _______________________________________________ > talk@x-query.com > http://x-query.com/mailman/listinfo/talk > From dlee at calldei.com Tue Feb 2 07:42:40 2010 From: dlee at calldei.com (David Lee) Date: Tue Feb 2 04:12:04 2010 Subject: AW: [xquery-talk] XQuery frameworks In-Reply-To: <428719.2277.qm@web27106.mail.ukl.yahoo.com> References: <964945.78705.qm@web27107.mail.ukl.yahoo.com><1264986887.7875.79.camel@desktop.barefootcomputing.com> <428719.2277.qm@web27106.mail.ukl.yahoo.com> Message-ID: <2E48CF9060C64A4AA98FB9F8539C506F@DLEEI7> You might want to look at xmlsh which was designed to solve this problem of managing the efficient interactions of many xqueries (as well as may non-xquery XML and non-xml pieces of a larger integration), although perhaps not in the way you express. ---------------------------------------------------- David A. Lee dlee@calldei.com http://www.calldei.com http://www.xmlsh.org -------------------------------------------------- From: "Hans-Juergen Rennau" Sent: Monday, February 01, 2010 6:49 PM To: Cc: Subject: AW: [xquery-talk] XQuery frameworks > Liam, > > 'extend standardization "beyond the query"' - that is an excellent > formula, I think! As one of the reasons why the need is real I regard the > challenge of data integration. I have a feeling that there is a remarkable > contradiction between potential and reality. XQuery has a great potential > as an integrator, what with the possibility to just *name* the resource > (URI) and immediately have its structured content under your fingertips. > But if the actual usage of XQuery does not yet live up to the potential, > one of the reasons may be that it is difficult to set up a system of many > queries to a robust whole, although the *single* queries can be written so > easily and efficiently. Put differently: it makes a great difference if > the focus of integration lies within a single query, or beyond. > > A movement "beyond the query": how about a processing model just one level > above the query level, of moderate complexity, integrating the execution > of single queries, for example by assigning to them properties which would > allow to automate their squencing, input provision and output delivery? > The XQuery spec provides for the possibility to write library modules, but > it is not possible to formulate relationships between library functions. > In general, we cannot say someting "about" a function. We cannot, for > example, express that a query Q has a "logical" source document D, > although the actual input is not (or not only) D itself, but the result > produced by some other query Q0, likewise logically - or perhaps > literally - processing D. A really simple XML language might make it > clear that the command "apply Q to D" would have to be expanded by a > framework into a chain: "apply Q0 to D, resulting in R; present Q to R". > We do not have this level of > abstraction which would allow for orchestrating the individual queries. > The XQuery language level knows only XDM values and expressions. I wonder > if just one level above the language a simple, standardized processing > model might not be possible, simple enough to be attractive and really > enhancing efficiency. > > With kind regards, > Hans-Juergen Rennau > > > > > ----- Urspr?ngliche Mail ---- > Von: Liam R E Quin > An: Hans-Juergen Rennau > CC: talk@x-query.com > Gesendet: Montag, den 1. Februar 2010, 2:14:47 Uhr > Betreff: Re: [xquery-talk] XQuery frameworks > > On Fri, 2010-01-29 at 10:03 +0000, Hans-Juergen Rennau wrote: >> Dear People, >> >> presently I am scribbling away at a little XQuery framework > > A few years ago when I did http://www.fromoldbooks.org/Search/ > using XQuery, I wrote my own. It's far from perfect -- it > is a perl script that checks the system load average (!), and > the query parameters, and then reads an xml config file, and > calls up an external xquery engine based on a variable -- so I > could easily switch between galax, qizx and saxon, initially, > and later dbxml too. It keeps a cache, to avoid firing up > a JVM (two of those implementations are in Java) with each > incoming HTTP request, and does get fairly high cache hit rates. > > It'd be a reasonable question, "why not use servlets", and > a lot of the answer to that is that, when I wrote it, Sun's > licence for Java was such that Linux distributions couldn't > easily include it, and Java was a sufficient pain to set up that > I avoided any architecture that depended on it. But then I > started using Saxon, and, later qizx, both of which do use Java. > > More recently I've used dbxml, but not on the production system, > as the packaging for dbxml is even weirder than for Java, and > my server has changed operating systems several times over the years. > > All this is a long winded way of saying, a lot of it depends on > the environment. I'm particularly interested (since I work at W3C...) > in what we could do to extend standardisation "beyond the query" into > more of a framework, and how, and what would be the value of that, but > I think the XQuery Working Group right now does not have the > resources to do that sort of work. > > Liam > > > -- > 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 > > __________________________________________________ > Do You Yahoo!? > Sie sind Spam leid? Yahoo! Mail verf?gt ?ber einen herausragenden Schutz > gegen Massenmails. > http://mail.yahoo.com > > _______________________________________________ > talk@x-query.com > http://x-query.com/mailman/listinfo/talk > From mike at saxonica.com Tue Feb 2 14:57:52 2010 From: mike at saxonica.com (Michael Kay) Date: Tue Feb 2 06:56:27 2010 Subject: [xquery-talk] effect of namespace on collection function; weird In-Reply-To: <654a2bb31002020408n7d05638ap92bfaefedb946fd5@mail.gmail.com> References: <654a2bb31002020408n7d05638ap92bfaefedb946fd5@mail.gmail.com> Message-ID: <7C4F144C26954E3CA5810F193DEFD1E0@Sealion> > Is XQuery really supposed to be applying default namespaces > to unqualified names in path expressions? Yes. > Do I report this as > a bug in the XQuery processor or do I scream at the insanity > of the XQuery working group? > Just scream at the insanity of namespaces in general. Regards, Michael Kay http://www.saxonica.com/ http://twitter.com/michaelhkay From mike at saxonica.com Tue Feb 2 14:59:51 2010 From: mike at saxonica.com (Michael Kay) Date: Tue Feb 2 06:58:22 2010 Subject: [xquery-talk] effect of namespace on collection function; weird In-Reply-To: References: <654a2bb31002020408n7d05638ap92bfaefedb946fd5@mail.gmail.com> Message-ID: <7CF6B23E59484928919C18DDE4486CB0@Sealion> > yes frustrating, but dont forget you can use: > > declare default element namespace "http://www.w3.org/1999/xhtml"; > > to change the default element namespace in XQuery > But it still changes the default both for constructing new elements and for accessing existing ones. What the user wants here is different defaults for the two cases. Regards, Michael Kay http://www.saxonica.com/ http://twitter.com/michaelhkay From mrys at microsoft.com Tue Feb 2 21:10:29 2010 From: mrys at microsoft.com (Michael Rys) Date: Tue Feb 2 13:03:47 2010 Subject: [xquery-talk] effect of namespace on collection function; weird In-Reply-To: <7CF6B23E59484928919C18DDE4486CB0@Sealion> References: <654a2bb31002020408n7d05638ap92bfaefedb946fd5@mail.gmail.com> <7CF6B23E59484928919C18DDE4486CB0@Sealion> Message-ID: I remember having this raised as a usability issue but we decided at the time that we do not want to keep track of two default element namespaces :(. Best regards Michael -----Original Message----- From: talk-bounces@x-query.com [mailto:talk-bounces@x-query.com] On Behalf Of Michael Kay Sent: Tuesday, February 02, 2010 7:00 AM To: 'James Fuller'; 'Elliotte Rusty Harold' Cc: talk@x-query.com Subject: RE: [xquery-talk] effect of namespace on collection function; weird > yes frustrating, but dont forget you can use: > > declare default element namespace "http://www.w3.org/1999/xhtml"; > > to change the default element namespace in XQuery > But it still changes the default both for constructing new elements and for accessing existing ones. What the user wants here is different defaults for the two cases. Regards, Michael Kay http://www.saxonica.com/ http://twitter.com/michaelhkay _______________________________________________ talk@x-query.com http://x-query.com/mailman/listinfo/talk From dlee at calldei.com Tue Feb 2 16:30:16 2010 From: dlee at calldei.com (David Lee) Date: Tue Feb 2 13:23:24 2010 Subject: [xquery-talk] effect of namespace on collection function; weird In-Reply-To: References: <654a2bb31002020408n7d05638ap92bfaefedb946fd5@mail.gmail.com><7CF6B23E59484928919C18DDE4486CB0@Sealion> Message-ID: <2C1B7B8EF66D4F8E8AB023B52D5392BD@DLEEI7> In hindsight, that's too bad :( In most of the cases where I work with XML with namespaces, I'm generating in a different namespaces (or none) then I am querying. My own experience would suggest that's the common, not the outlying case. ---------------------------------------------------- David A. Lee dlee@calldei.com http://www.calldei.com http://www.xmlsh.org -------------------------------------------------- From: "Michael Rys" Sent: Tuesday, February 02, 2010 4:10 PM To: "Michael Kay" ; "'James Fuller'" ; "'Elliotte Rusty Harold'" Cc: Subject: RE: [xquery-talk] effect of namespace on collection function; weird > I remember having this raised as a usability issue but we decided at the > time that we do not want to keep track of two default element namespaces > :(. > > Best regards > Michael > > -----Original Message----- > From: talk-bounces@x-query.com [mailto:talk-bounces@x-query.com] On Behalf > Of Michael Kay > Sent: Tuesday, February 02, 2010 7:00 AM > To: 'James Fuller'; 'Elliotte Rusty Harold' > Cc: talk@x-query.com > Subject: RE: [xquery-talk] effect of namespace on collection function; > weird > > >> yes frustrating, but dont forget you can use: >> >> declare default element namespace "http://www.w3.org/1999/xhtml"; >> >> to change the default element namespace in XQuery >> > > But it still changes the default both for constructing new elements and > for accessing existing ones. What the user wants here is different > defaults for the two cases. > > Regards, > > Michael Kay > http://www.saxonica.com/ > http://twitter.com/michaelhkay > > > _______________________________________________ > talk@x-query.com > http://x-query.com/mailman/listinfo/talk > > > _______________________________________________ > talk@x-query.com > http://x-query.com/mailman/listinfo/talk > From hrennau at yahoo.de Wed Feb 3 00:00:27 2010 From: hrennau at yahoo.de (Hans-Juergen Rennau) Date: Tue Feb 2 15:50:01 2010 Subject: AW: [xquery-talk] XQuery frameworks In-Reply-To: <2E48CF9060C64A4AA98FB9F8539C506F@DLEEI7> References: <964945.78705.qm@web27107.mail.ukl.yahoo.com><1264986887.7875.79.camel@desktop.barefootcomputing.com> <428719.2277.qm@web27106.mail.ukl.yahoo.com> <2E48CF9060C64A4AA98FB9F8539C506F@DLEEI7> Message-ID: <63583.18964.qm@web27106.mail.ukl.yahoo.com> David, xmlsh seems to me a fascinating approach, and I wonder if the W3C has considered developing a related standard: If it has decided against it I would like to know?the reasons. It is simply strange that we XML-minded people have on the one hand a deep conviction about the value?of structured information; and on the other hand accept it meekly, day by day, that our?workhorse - the?unix shell - consumes and delivers lines of text only... that it delivers, say, the result of a find command in a pityfully unstructured way to be parsed... It is an anachronism. The basic tools concept, as you explain it on the philosophy page of xmlsh, is convincing, and it is a background before which the worth of interoperability of "small programs" gets very clear. If one accepts the tools concept as a general idea, I think it is but a little step to the thought?that the?interoperability of XQuery queries may be an interesting issue. What concerns the interaction of queries in the context of xmlsh I have not yet quite understood what is supported or not (yet?) supported. Can one, for example, profit from pipes in order to link two queries? If you gave me a hint where to look, or said a few words in explanation, I would be grateful. Hans-Juergen ----- Urspr?ngliche Mail ---- Von: David Lee An: Hans-Juergen Rennau ; liam@w3.org CC: talk@x-query.com Gesendet: Dienstag, den 2. Februar 2010, 13:42:40 Uhr Betreff: Re: AW: [xquery-talk] XQuery frameworks You might want to look at xmlsh which was designed to solve this problem of managing the efficient interactions of many xqueries (as well as may non-xquery XML and non-xml pieces of a larger integration), although perhaps not in the way you express. __________________________________________________ Do You Yahoo!? Sie sind Spam leid? Yahoo! Mail verf?gt ?ber einen herausragenden Schutz gegen Massenmails. http://mail.yahoo.com From liam at w3.org Tue Feb 2 20:11:59 2010 From: liam at w3.org (Liam R E Quin) Date: Tue Feb 2 16:59:43 2010 Subject: [xquery-talk] XQuery frameworks In-Reply-To: References: <964945.78705.qm@web27107.mail.ukl.yahoo.com> <1264986887.7875.79.camel@desktop.barefootcomputing.com> <428719.2277.qm@web27106.mail.ukl.yahoo.com> <373985.84375.qm@web27108.mail.ukl.yahoo.com> <6dca08521002020213x61479bd0x24c966a7e564c19d@mail.gmail.com> Message-ID: <1265159519.5349.38.camel@desktop.barefootcomputing.com> On Tue, 2010-02-02 at 11:23 +0100, James Fuller wrote: > in web applications may I proffer that REST is maybe the abstraction > layer you desire, in eXist (where there is a default RESTful > interface) u also get rewriting which when combined cover most of my > needs in this 'space'. But then you are using one particular implementation... And using eXist to handle incoming forms seemed to involve some weird kludgery with eval() last time I looked, although that was a while ago, and I didn't look too deeply because I'd already written my own little framework. I'd really like to see more standardization - even informally - at the level "beyond the query", because I think we (the XQuery world) are missing out on a lot of opportunities for more adoption. I don't think XProc is the answer - it might be part of an answer, especially some future putative more powerful XProc based on sequences of XDM instances and synchronization points - because then you need an XProc Framework... Liam -- 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 liam at w3.org Tue Feb 2 20:15:29 2010 From: liam at w3.org (Liam R E Quin) Date: Tue Feb 2 17:03:15 2010 Subject: AW: [xquery-talk] XQuery frameworks In-Reply-To: <63583.18964.qm@web27106.mail.ukl.yahoo.com> References: <964945.78705.qm@web27107.mail.ukl.yahoo.com> <1264986887.7875.79.camel@desktop.barefootcomputing.com> <428719.2277.qm@web27106.mail.ukl.yahoo.com> <2E48CF9060C64A4AA98FB9F8539C506F@DLEEI7> <63583.18964.qm@web27106.mail.ukl.yahoo.com> Message-ID: <1265159729.5349.42.camel@desktop.barefootcomputing.com> On Wed, 2010-02-03 at 00:00 +0000, Hans-Juergen Rennau wrote: > xmlsh seems to me a fascinating approach, and I wonder if the W3C has > considered developing a related standard: If it has decided against it > I would like to know the reasons. I do not believe it has been considered -- generally, W3C Member organizations come to us (W3C) and propose work items; often we then arrange a public Workshop, and if that goes well, start a Working Group. Years ago I worked on an SGML Shell (never released, it used proprietary software) and tried to get some people interested. Liam -- 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 dflorescu at mac.com Tue Feb 2 17:27:02 2010 From: dflorescu at mac.com (Daniela Florescu) Date: Tue Feb 2 17:14:37 2010 Subject: AW: [xquery-talk] XQuery frameworks In-Reply-To: <63583.18964.qm@web27106.mail.ukl.yahoo.com> References: <964945.78705.qm@web27107.mail.ukl.yahoo.com> <1264986887.7875.79.camel@desktop.barefootcomputing.com> <428719.2277.qm@web27106.mail.ukl.yahoo.com> <2E48CF9060C64A4AA98FB9F8539C506F@DLEEI7> <63583.18964.qm@web27106.mail.ukl.yahoo.com> Message-ID: <880620AE-6AE2-4ED7-A0DA-26F44B526843@mac.com> Hi all, Just for the sake of completeness: I hope people on this thread realize that there is more to XQuery then a query language. It's also a *scripting* language. http://www.w3.org/TR/xquery-sx-10/ The XQuery scripting extension does provide control flow capabilities around queries, updates and Web function calls. It's smoothly integrated with the rest of XQuery, such that it avoids the paradigm shift that usually costs productivity and performance. (this makes XQuery a direct competitor to other scripting languages...Javascript, Ruby, etc.. and I think XQuery will be in the long term winning, but that's another story, and maybe another email) This is of course no excuse for not having a more sophisticated servlet-like framework around XQuery/XSLT for ease of Web application building. I believe XML needs some work in this area, hopefully standardized by the W3C for the benefit of all. Best regards Dana P.S. For everybody who will attending XML Prague, maybe we can have an evening of beer and discussions around this. I am looking forward to it. On Feb 2, 2010, at 4:00 PM, Hans-Juergen Rennau wrote: > David, > > xmlsh seems to me a fascinating approach, and I wonder if the W3C > has considered developing a related standard: If it has decided > against it I would like to know the reasons. It is simply strange > that we XML-minded people have on the one hand a deep conviction > about the value of structured information; and on the other hand > accept it meekly, day by day, that our workhorse - the unix shell - > consumes and delivers lines of text only... that it delivers, say, > the result of a find command in a pityfully unstructured way to be > parsed... It is an anachronism. > > The basic tools concept, as you explain it on the philosophy page of > xmlsh, is convincing, and it is a background before which the worth > of interoperability of "small programs" gets very clear. If one > accepts the tools concept as a general idea, I think it is but a > little step to the thought that the interoperability of XQuery > queries may be an interesting issue. > > What concerns the interaction of queries in the context of xmlsh I > have not yet quite understood what is supported or not (yet?) > supported. Can one, for example, profit from pipes in order to link > two queries? If you gave me a hint where to look, or said a few > words in explanation, I would be grateful. > > Hans-Juergen > > > ----- Urspr?ngliche Mail ---- > Von: David Lee > An: Hans-Juergen Rennau ; liam@w3.org > CC: talk@x-query.com > Gesendet: Dienstag, den 2. Februar 2010, 13:42:40 Uhr > Betreff: Re: AW: [xquery-talk] XQuery frameworks > > You might want to look at xmlsh which was designed to solve this > problem of managing the efficient interactions of many xqueries (as > well as may non-xquery XML and non-xml pieces of a larger > integration), > although perhaps not in the way you express. > > __________________________________________________ > Do You Yahoo!? > Sie sind Spam leid? Yahoo! Mail verf?gt ?ber einen herausragenden > Schutz gegen Massenmails. > http://mail.yahoo.com > > _______________________________________________ > talk@x-query.com > http://x-query.com/mailman/listinfo/talk From olivier at xmlmind.com Wed Feb 3 10:19:32 2010 From: olivier at xmlmind.com (Olivier Ishacian) Date: Wed Feb 3 00:54:22 2010 Subject: [xquery-talk] [ANN] Qizx 3.1 released Message-ID: <4B693FA4.5090301@xmlmind.com> Qizx Free Engine can be downloaded from http://www.xmlmind.com/qizx/download.shtml Qizx/open can be downloaded from http://www.xmlmind.com/qizx/qizxopen.shtml Qizx customers, please upgrade using this form: http://www.xmlmind.com/store/download.php (The above form is usually accessed through http://www.xmlmind.com/qizx/upgrade.html.) ------------- Qizx is an embeddable, high-speed, native XML indexing and query engine written in Java(TM), with the querying and processing capabilities of a fully fledged XML Query implementation. What is new in version 3.1: --------------------------- * Simplified full-text query syntax. * Full-text convenience functions for scoring, highlighting, extracting document snippets, looking up indexes. * Improved full-text scoring. * Upgraded XQuery Update support (complies with June 2009 Recommendation) Please visit http://www.xmlmind.com/qizx/changes.html for more details. ------------- Qizx is available in several editions: * The commercial product has 3 liberal licenses both for corporate application development, and for royalty-free distributable products. * The Free Engine edition is a fully functional version of Qizx which can be used for developing or in production. It is limited in database size (one gigabyte of XML approximately). * Qizx/open is an open-source version of the XML Query interpreter of Qizx. Qizx/open has been available since 2003 and is recognized as one of the most advanced and fastest XML Query implementations. Please visit http://www.xmlmind.com/qizx/ for more information about Qizx. -- Qizx Information List qizx-announce@xmlmind.com http://www.xmlmind.com/mailman/listinfo/qizx-announce From elharo at ibiblio.org Wed Feb 3 05:58:55 2010 From: elharo at ibiblio.org (Elliotte Rusty Harold) Date: Wed Feb 3 02:31:47 2010 Subject: [xquery-talk] effect of namespace on collection function; weird In-Reply-To: <7C4F144C26954E3CA5810F193DEFD1E0@Sealion> References: <654a2bb31002020408n7d05638ap92bfaefedb946fd5@mail.gmail.com> <7C4F144C26954E3CA5810F193DEFD1E0@Sealion> Message-ID: <654a2bb31002030258v3f59b26dyb3ef00cb70499844@mail.gmail.com> On Tue, Feb 2, 2010 at 9:57 AM, Michael Kay wrote: > Just scream at the insanity of namespaces in general. Yes, but I got tired of that years ago. :-) This, however, is a whole new level of insanity. Who thought it would be a good idea to break practice with XSLT, every single XPath implementation on the planet, and years of experience and documentation? There's an argument to be made for default namespaces applying in path expressions, but the time for that argument to be made was 1998. Once the choice was made, the cost of switching was far higher than any incremental improvement you might make. Stare decisis isn't just for the supreme court. -- Elliotte Rusty Harold elharo@ibiblio.org From elharo at ibiblio.org Wed Feb 3 06:01:27 2010 From: elharo at ibiblio.org (Elliotte Rusty Harold) Date: Wed Feb 3 02:34:18 2010 Subject: [xquery-talk] effect of namespace on collection function; weird In-Reply-To: References: <654a2bb31002020408n7d05638ap92bfaefedb946fd5@mail.gmail.com> Message-ID: <654a2bb31002030301t63fe5e11t5b6ed2cf43d06e1d@mail.gmail.com> On Tue, Feb 2, 2010 at 7:42 AM, James Fuller wrote: > yes frustrating, but dont forget you can use: > > declare default element namespace "http://www.w3.org/1999/xhtml"; > > to change the default element namespace in XQuery > Not quite my problem, I think. I want to use an XPath expression that queries a non-namespaced source document inside a default namespaced output element. Do I now have to bind a prefix to no namespace? e.g. declare namespace pre ""; { let $num := count(collection("/db/quotes")/pre:quote) return $num } -- Elliotte Rusty Harold elharo@ibiblio.org From andrew.j.welch at gmail.com Wed Feb 3 11:15:09 2010 From: andrew.j.welch at gmail.com (Andrew Welch) Date: Wed Feb 3 02:47:45 2010 Subject: [xquery-talk] effect of namespace on collection function; weird In-Reply-To: <654a2bb31002030301t63fe5e11t5b6ed2cf43d06e1d@mail.gmail.com> References: <654a2bb31002020408n7d05638ap92bfaefedb946fd5@mail.gmail.com> <654a2bb31002030301t63fe5e11t5b6ed2cf43d06e1d@mail.gmail.com> Message-ID: <74a894af1002030315l298d468eo47947bda0c0c2e89@mail.gmail.com> > Not quite my problem, I think. I want to use an XPath expression that > queries a non-namespaced source document inside a default namespaced > output element. Do I now have to bind a prefix to no namespace? e.g. > > declare ?namespace pre ""; > > > { > let $num := count(collection("/db/quotes")/pre:quote) > return $num > } > That's not possible, you can't have an empty namespace, and there is no equivalent of xpath-default-namespace. Instead you either move the xpath outside the containing element, either as a function or a variable: let $num := count(collection("/db/quotes")/quote) return {$num} or you leave off the default namespace and generate well formed html, changing your output to xhtml as the last step in the process, using either a transform or a processor extension. -- Andrew Welch http://andrewjwelch.com Kernow: http://kernowforsaxon.sf.net/ From ricardo.queiros at gmail.com Thu Feb 4 13:14:31 2010 From: ricardo.queiros at gmail.com (=?ISO-8859-1?Q?Ricardo_Queir=F3s?=) Date: Thu Feb 4 04:40:18 2010 Subject: [xquery-talk] Absolute path of a selected xml snippet Message-ID: <6cec8a991002040514sddfbc66p24ba6b7e8ed44e43@mail.gmail.com> Hi to all, I have the following XML document in a text box: 1 2 By selecting " 1 " I want to get your absolute path XPath, ie, "/A/B [1]" You can do this using XQuery? What do you advise? Best regards! -- Ricardo Queir?s -------------- next part -------------- An HTML attachment was scrubbed... URL: http://x-query.com/pipermail/talk/attachments/20100204/d41c7a8a/attachment.htm From wcandillon at gmail.com Thu Feb 4 14:42:39 2010 From: wcandillon at gmail.com (William Candillon) Date: Thu Feb 4 05:42:28 2010 Subject: [xquery-talk] Absolute path of a selected xml snippet In-Reply-To: <6cec8a991002040514sddfbc66p24ba6b7e8ed44e43@mail.gmail.com> References: <6cec8a991002040514sddfbc66p24ba6b7e8ed44e43@mail.gmail.com> Message-ID: <43b5c44e1002040542l5d091308t311745c539e06884@mail.gmail.com> Hi Ricardo, You can use the functx library that contains such functions: http://www.xqueryfunctions.com/xq/functx_path-to-node.html. Functx is very easy to deploy in your XQuery app since it is not bound to a specific XQuery engine or library. Best regards, William 2010/2/4 Ricardo Queir?s : > Hi to all, > I have the following XML document in a text box: > > > 1 > 2 > > > By selecting " 1 " > > I want to get your absolute path XPath, ie, "/A/B [1]" > You can do this using XQuery? > What do you advise? > Best regards! > > -- > Ricardo Queir?s > > _______________________________________________ > talk@x-query.com > http://x-query.com/mailman/listinfo/talk > From dlee at calldei.com Thu Feb 4 09:05:22 2010 From: dlee at calldei.com (David Lee) Date: Thu Feb 4 06:03:46 2010 Subject: [xquery-talk] Absolute path of a selected xml snippet In-Reply-To: <43b5c44e1002040542l5d091308t311745c539e06884@mail.gmail.com> References: <6cec8a991002040514sddfbc66p24ba6b7e8ed44e43@mail.gmail.com> <43b5c44e1002040542l5d091308t311745c539e06884@mail.gmail.com> Message-ID: In your case you might want instead http://www.xqueryfunctions.com/xq/functx_path-to-node-with-pos.html ---------------------------------------------------- David A. Lee dlee@calldei.com http://www.calldei.com http://www.xmlsh.org -------------------------------------------------- From: "William Candillon" Sent: Thursday, February 04, 2010 8:42 AM To: "Ricardo Queir?s" Cc: Subject: Re: [xquery-talk] Absolute path of a selected xml snippet > Hi Ricardo, > > You can use the functx library that contains such functions: > http://www.xqueryfunctions.com/xq/functx_path-to-node.html. > Functx is very easy to deploy in your XQuery app since it is not bound > to a specific XQuery engine or library. > > Best regards, > > William > > 2010/2/4 Ricardo Queir?s : >> Hi to all, >> I have the following XML document in a text box: >> >> >> 1 >> 2 >> >> >> By selecting " 1 " >> >> I want to get your absolute path XPath, ie, "/A/B [1]" >> You can do this using XQuery? >> What do you advise? >> Best regards! >> >> -- >> Ricardo Queir?s >> >> _______________________________________________ >> talk@x-query.com >> http://x-query.com/mailman/listinfo/talk >> > > _______________________________________________ > talk@x-query.com > http://x-query.com/mailman/listinfo/talk > From ricardo.queiros at gmail.com Thu Feb 4 14:16:46 2010 From: ricardo.queiros at gmail.com (=?ISO-8859-1?Q?Ricardo_Queir=F3s?=) Date: Thu Feb 4 06:14:35 2010 Subject: [xquery-talk] Absolute path of a selected xml snippet In-Reply-To: References: <6cec8a991002040514sddfbc66p24ba6b7e8ed44e43@mail.gmail.com> <43b5c44e1002040542l5d091308t311745c539e06884@mail.gmail.com> Message-ID: <6cec8a991002040616ja839bc5r4ba04410dd16400c@mail.gmail.com> Thanks to all! I'm using JAVA. The best approach is use XQuery API for Java (XQJ)? Thanks! On 4 February 2010 14:05, David Lee wrote: > In your case you might want instead > > http://www.xqueryfunctions.com/xq/functx_path-to-node-with-pos.html > > > > ---------------------------------------------------- > David A. Lee > dlee@calldei.com > http://www.calldei.com > http://www.xmlsh.org > > > -------------------------------------------------- > From: "William Candillon" > Sent: Thursday, February 04, 2010 8:42 AM > To: "Ricardo Queir?s" > Cc: > Subject: Re: [xquery-talk] Absolute path of a selected xml snippet > > > Hi Ricardo, >> >> You can use the functx library that contains such functions: >> http://www.xqueryfunctions.com/xq/functx_path-to-node.html. >> Functx is very easy to deploy in your XQuery app since it is not bound >> to a specific XQuery engine or library. >> >> Best regards, >> >> William >> >> 2010/2/4 Ricardo Queir?s : >> >>> Hi to all, >>> I have the following XML document in a text box: >>> >>> >>> 1 >>> 2 >>> >>> >>> By selecting " 1 " >>> >>> I want to get your absolute path XPath, ie, "/A/B [1]" >>> You can do this using XQuery? >>> What do you advise? >>> Best regards! >>> >>> -- >>> Ricardo Queir?s >>> >>> _______________________________________________ >>> talk@x-query.com >>> http://x-query.com/mailman/listinfo/talk >>> >>> >> _______________________________________________ >> talk@x-query.com >> http://x-query.com/mailman/listinfo/talk >> >> -- Ricardo Queir?s -------------- next part -------------- An HTML attachment was scrubbed... URL: http://x-query.com/pipermail/talk/attachments/20100204/d950aa14/attachment.htm From dlee at calldei.com Thu Feb 4 09:36:27 2010 From: dlee at calldei.com (David Lee) Date: Thu Feb 4 06:34:02 2010 Subject: [xquery-talk] Absolute path of a selected xml snippet In-Reply-To: <6cec8a991002040616ja839bc5r4ba04410dd16400c@mail.gmail.com> References: <6cec8a991002040514sddfbc66p24ba6b7e8ed44e43@mail.gmail.com><43b5c44e1002040542l5d091308t311745c539e06884@mail.gmail.com> <6cec8a991002040616ja839bc5r4ba04410dd16400c@mail.gmail.com> Message-ID: <5248D6AE51984C728D1250EB8B5FE739@DLEEI7> Since you posted to xquery-talk I think we all assumed you were using XQuery not native java. If your not already using XQuery in your app, I might suggest you implement this in pure java, its not that difficult. But how to do it will depend on what XML API your currently using. But if you plan on using XQuery, the first choice is to pick a Java XQuery implementation (before picking the API). The API interface (XQJ) doesn't actually provide an implementation. My personal favorite for embedded xquery in java is Saxon, www.saxonica.com And if your using Saxon I'd suggest its S9API over XQJ ---------------------------------------------------- David A. Lee dlee@calldei.com http://www.calldei.com http://www.xmlsh.org From: Ricardo Queir?s Sent: Thursday, February 04, 2010 9:16 AM To: David Lee Cc: talk@x-query.com ; William Candillon Subject: Re: [xquery-talk] Absolute path of a selected xml snippet Thanks to all! I'm using JAVA. The best approach is use XQuery API for Java (XQJ)? Thanks! On 4 February 2010 14:05, David Lee wrote: In your case you might want instead http://www.xqueryfunctions.com/xq/functx_path-to-node-with-pos.html ---------------------------------------------------- David A. Lee dlee@calldei.com http://www.calldei.com http://www.xmlsh.org -------------------------------------------------- From: "William Candillon" Sent: Thursday, February 04, 2010 8:42 AM To: "Ricardo Queir?s" Cc: Subject: Re: [xquery-talk] Absolute path of a selected xml snippet Hi Ricardo, You can use the functx library that contains such functions: http://www.xqueryfunctions.com/xq/functx_path-to-node.html. Functx is very easy to deploy in your XQuery app since it is not bound to a specific XQuery engine or library. Best regards, William 2010/2/4 Ricardo Queir?s : Hi to all, I have the following XML document in a text box: 1 2 By selecting " 1 " I want to get your absolute path XPath, ie, "/A/B [1]" You can do this using XQuery? What do you advise? Best regards! -- Ricardo Queir?s _______________________________________________ talk@x-query.com http://x-query.com/mailman/listinfo/talk _______________________________________________ talk@x-query.com http://x-query.com/mailman/listinfo/talk -- Ricardo Queir?s -------------------------------------------------------------------------------- _______________________________________________ talk@x-query.com http://x-query.com/mailman/listinfo/talk -------------- next part -------------- An HTML attachment was scrubbed... URL: http://x-query.com/pipermail/talk/attachments/20100204/2a558a55/attachment-0001.htm From tomsawyerrj at gmail.com Thu Feb 4 16:06:38 2010 From: tomsawyerrj at gmail.com (Nilo Sergio de Assis Junior) Date: Thu Feb 4 10:00:38 2010 Subject: [xquery-talk] Absolute path of a selected xml snippet In-Reply-To: <6cec8a991002040514sddfbc66p24ba6b7e8ed44e43@mail.gmail.com> References: <6cec8a991002040514sddfbc66p24ba6b7e8ed44e43@mail.gmail.com> Message-ID: <74da5d81002041006t40d246e6m6f05a00ee762b970@mail.gmail.com> Ricardo o pessoal citou algumas fun??es q vc poderia usar , mas se for o caso vc pode criar algo customizado tambem , usando o eixo ancestor-or-self e as propriedades name() ou local-name() algo tipo : for $entrada in doc("testeGroup.xml")/* return let $elementoProcurado := 'B' , $posicao :='1' for $i in $entrada//*[name()= $elementoProcurado][position()=1]/ancestor-or-self::node() return if (name($i)!=$elementoProcurado) then concat(name($i),'/') else name($i) passando como entrada o nome do elementoe a posi??o dele.... espero ter ajudado ------------------- Ricardo You can use a function from functx or try to make a customized one using ancestor-or-self axis , and name() or local-name() properties... something like: for $entrada in doc("testeGroup.xml")/* return let $elementoProcurado := 'B' , $posicao :='1' for $i in $entrada//*[name()= $elementoProcurado][position()=1]/ancestor-or-self::node() return if (name($i)!=$elementoProcurado) then concat(name($i),'/') else name($i) Em 4 de fevereiro de 2010 11:14, Ricardo Queir?s escreveu: > Hi to all, > > I have the following XML document in a text box: > > > 1 > 2 > > > By selecting " 1 " > > I want to get your absolute path XPath, ie, "/A/B [1]" > You can do this using XQuery? > What do you advise? > > Best regards! > > -- > Ricardo Queir?s > > _______________________________________________ > talk@x-query.com > http://x-query.com/mailman/listinfo/talk > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://x-query.com/pipermail/talk/attachments/20100204/674fddf8/attachment.htm From sahoo.byomokesh at gmail.com Fri Feb 5 10:43:48 2010 From: sahoo.byomokesh at gmail.com (Byomokesh Sahoo) Date: Thu Feb 4 20:53:51 2010 Subject: [xquery-talk] attribute value change Message-ID: <373764c61002042113lda62017k7aa6c41fedfba2e9@mail.gmail.com> Would someone show me what the syntax is for replacing the value of an attribute node? Title here 46793

some text here

some text here

some text here

Output Title here 46793

some text here

some text here

some text here

I want using xquery to change number value add in all chap id. Thank you! Byomokesh -------------- next part -------------- An HTML attachment was scrubbed... URL: http://x-query.com/pipermail/talk/attachments/20100205/c2e9a5c8/attachment.htm From gandhi.mukul at gmail.com Fri Feb 5 12:26:10 2010 From: gandhi.mukul at gmail.com (Mukul Gandhi) Date: Thu Feb 4 22:31:20 2010 Subject: [xquery-talk] attribute value change In-Reply-To: <373764c61002042113lda62017k7aa6c41fedfba2e9@mail.gmail.com> References: <373764c61002042113lda62017k7aa6c41fedfba2e9@mail.gmail.com> Message-ID: <7870f82e1002042256h3a4ccbdan9454dac5082b672d@mail.gmail.com> The following seems to work: declare namespace local = "http://example.com/functions"; declare function local:copy($element as element()) { element {node-name($element)} {$element/@*[not(name() eq 'id')], if (local-name($element) eq 'chap') then (attribute id { concat($element/preceding::bn, '_', $element/@id) }) else (), for $child in $element/node() return if ($child instance of element()) then local:copy($child) else $child } }; local:copy(doc('test.xml')/*) On Fri, Feb 5, 2010 at 10:43 AM, Byomokesh Sahoo wrote: > Would someone show me what the syntax is for replacing the value of an > attribute node? > > Title here > 46793 >

some text here

> >

some text here

>
> >

some text here

>
>
> > Output > > > Title here > 46793 >

some text here

> >

some text here

>
> >

some text here

>
>
> > I want using xquery to change number value add in all chap id. > > Thank you! > Byomokesh -- Regards, Mukul Gandhi From gandhi.mukul at gmail.com Fri Feb 5 13:14:39 2010 From: gandhi.mukul at gmail.com (Mukul Gandhi) Date: Thu Feb 4 23:18:50 2010 Subject: [xquery-talk] attribute value change In-Reply-To: <7870f82e1002042256h3a4ccbdan9454dac5082b672d@mail.gmail.com> References: <373764c61002042113lda62017k7aa6c41fedfba2e9@mail.gmail.com> <7870f82e1002042256h3a4ccbdan9454dac5082b672d@mail.gmail.com> Message-ID: <7870f82e1002042344yae69e53n14dfd097592af49e@mail.gmail.com> There is a slight improvement, to the solution I posted earlier. The earlier solution, didn't check that "id" attribute belonged to "chap" element (I think, this was mentioned in your requirement). The solution below has this improvement. declare namespace local = "http://example.com/functions"; declare function local:copy($element as element()) { element {node-name($element)} {$element/@*[../self::chap and not(name() eq 'id')], if (local-name($element) eq 'chap') then (attribute id { concat($element/preceding::bn, '_', $element/@id) }) else (), for $child in $element/node() return if ($child instance of element()) then local:copy($child) else $child } }; local:copy(doc('test.xml')/*) On Fri, Feb 5, 2010 at 12:26 PM, Mukul Gandhi wrote: > The following seems to work: > > declare namespace local = "http://example.com/functions"; > > declare function local:copy($element as element()) { > ?element {node-name($element)} > ? ?{$element/@*[not(name() eq 'id')], if (local-name($element) eq 'chap') then > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? (attribute id { > concat($element/preceding::bn, '_', ? ? ? ? ? ?$element/@id) }) else > (), > ? ? for $child in $element/node() > ? ? ? ?return if ($child instance of element()) > ? ? ? ? ?then local:copy($child) > ? ? ? ? ?else $child > ? ?} > }; > > local:copy(doc('test.xml')/*) -- Regards, Mukul Gandhi From sahoo.byomokesh at gmail.com Mon Feb 8 17:43:42 2010 From: sahoo.byomokesh at gmail.com (Byomokesh Sahoo) Date: Mon Feb 8 03:35:14 2010 Subject: [xquery-talk] Function Copy error Message-ID: <373764c61002080413u7dae7f15v8603f3f030601da3@mail.gmail.com> Hi, I want split the one xml to multiple xml file using xquery. But it showing error function copy. Please see the below code and give some point out. XML Hi An informal short greeting. Hello A more formal greeting. let $input-document := 'splitfile.xml' let $collection := 'file///D:/temp' for $term-data in doc($input-document)/root/row let $term-name := $term-data/Term/text() let $documentname := concat($term-name, '.xml') let $store-return := copy($collection, $documentname, $term-data) return {$term-name} {$documentname} I am using saxon 9.2 Thanks Byomokesh -------------- next part -------------- An HTML attachment was scrubbed... URL: http://x-query.com/pipermail/talk/attachments/20100208/d21cecb4/attachment.htm From mike at saxonica.com Mon Feb 8 13:02:35 2010 From: mike at saxonica.com (Michael Kay) Date: Mon Feb 8 04:23:13 2010 Subject: [xquery-talk] Function Copy error In-Reply-To: <373764c61002080413u7dae7f15v8603f3f030601da3@mail.gmail.com> References: <373764c61002080413u7dae7f15v8603f3f030601da3@mail.gmail.com> Message-ID: <244F0F53BC0B4A5EB4A78BC153CFD6E4@Sealion> There is no function called copy(). What made you think there was, and what did you expect it do? XQuery doesn't really have a way to write multiple result documents. You could do it by returning a sequence of document nodes to the application, and then having the Java application serialize them and write them to disk, but it would have to know where to write them. It's easier to achieve this in XSLT: Regards, Michael Kay http://www.saxonica.com/ http://twitter.com/michaelhkay _____ From: talk-bounces@x-query.com [mailto:talk-bounces@x-query.com] On Behalf Of Byomokesh Sahoo Sent: 08 February 2010 12:14 To: talk@x-query.com Subject: [xquery-talk] Function Copy error Hi, I want split the one xml to multiple xml file using xquery. But it showing error function copy. Please see the below code and give some point out. XML Hi An informal short greeting. Hello A more formal greeting. let $input-document := 'splitfile.xml' let $collection := 'file///D:/temp' for $term-data in doc($input-document)/root/row let $term-name := $term-data/Term/text() let $documentname := concat($term-name, '.xml') let $store-return := copy($collection, $documentname, $term-data) return {$term-name} {$documentname} I am using saxon 9.2 Thanks Byomokesh -------------- next part -------------- An HTML attachment was scrubbed... URL: http://x-query.com/pipermail/talk/attachments/20100208/085d4c59/attachment.htm From sahoo.byomokesh at gmail.com Mon Feb 8 19:30:01 2010 From: sahoo.byomokesh at gmail.com (Byomokesh Sahoo) Date: Mon Feb 8 05:57:13 2010 Subject: [xquery-talk] Function Copy error In-Reply-To: <244F0F53BC0B4A5EB4A78BC153CFD6E4@Sealion> References: <373764c61002080413u7dae7f15v8603f3f030601da3@mail.gmail.com> <244F0F53BC0B4A5EB4A78BC153CFD6E4@Sealion> Message-ID: <373764c61002080600hf2f0a6dr70384fc59c6fff9b@mail.gmail.com> Yes. Its very easy to do using XSLT. Just I want try to do any possibility using XQuery. I saw that Generating Multiple XML documents Using XQuery http://www.datadirect.com/developer/data-integration/tutorials/xml-output/index.ssp Thanks Byomokesh On Mon, Feb 8, 2010 at 6:32 PM, Michael Kay wrote: > > There is no function called copy(). What made you think there was, and what did you expect it do? > > XQuery doesn't really have a way to write multiple result documents. You could do it by returning a sequence of document nodes to the application, and then having the Java application serialize them and write them to disk, but it would have to know where to write them. It's easier to achieve this in XSLT: > > > ? > ???? > ? > > > Regards, > > Michael Kay > http://www.saxonica.com/ > http://twitter.com/michaelhkay > > ________________________________ > From: talk-bounces@x-query.com [mailto:talk-bounces@x-query.com] On Behalf Of Byomokesh Sahoo > Sent: 08 February 2010 12:14 > To: talk@x-query.com > Subject: [xquery-talk] Function Copy error > > Hi, > > I want split the one xml to multiple xml file using xquery. But it showing error function copy. Please see the below code and give some point out. > > XML > > > ??? > ??????? Hi > ??????? An informal short greeting. > ??? > ??? > ??????? Hello > ??????? A more formal greeting. > ??? > > > > > let $input-document := 'splitfile.xml' > let $collection := 'file///D:/temp' > > ???? for $term-data in doc($input-document)/root/row > ??????? ??????? let $term-name := $term-data/Term/text() > ??????? let $documentname := concat($term-name, '.xml') > ??????? let $store-return := copy($collection, $documentname, $term-data) > > ???? return > ??????? > ?????????? {$term-name} > ?????????? {$documentname} > ??????? > > I am using saxon 9.2 > > Thanks > Byomokesh From dlee at calldei.com Mon Feb 8 09:39:47 2010 From: dlee at calldei.com (David Lee) Date: Mon Feb 8 06:32:43 2010 Subject: [xquery-talk] Function Copy error In-Reply-To: <373764c61002080600hf2f0a6dr70384fc59c6fff9b@mail.gmail.com> References: <373764c61002080413u7dae7f15v8603f3f030601da3@mail.gmail.com><244F0F53BC0B4A5EB4A78BC153CFD6E4@Sealion> <373764c61002080600hf2f0a6dr70384fc59c6fff9b@mail.gmail.com> Message-ID: <42B056B376824FF6845601CB5AB6445E@DLEEI7> This (multiple output files) is a data direct specific feature. If you'd like to use saxon and XQuery but avoid writing custom java code, you might consider xmlsh. www.xmlsh.org The command "xsplit" will split documents of the sort you describe. http://www.xmlsh.org/CommandXsplit Combined with the the command xmove http://www.xmlsh.org/CommandXmove Will rename the files in bulk based on an xpath expression. But the xslt example Mr. Kay suggested looks easier :) ( fyi you can run xslt as a post process to your xquery code in your language of choice, including xmlsh). xquery ... | xslt ... ---------------------------------------------------- David A. Lee dlee@calldei.com http://www.calldei.com http://www.xmlsh.org -------------------------------------------------- From: "Byomokesh Sahoo" Sent: Monday, February 08, 2010 9:00 AM To: Subject: Re: [xquery-talk] Function Copy error > Yes. Its very easy to do using XSLT. Just I want try to do any > possibility using XQuery. > > I saw that > > Generating Multiple XML documents Using XQuery > > http://www.datadirect.com/developer/data-integration/tutorials/xml-output/index.ssp > > > Thanks > Byomokesh > > > On Mon, Feb 8, 2010 at 6:32 PM, Michael Kay wrote: >> >> There is no function called copy(). What made you think there was, and >> what did you expect it do? >> >> XQuery doesn't really have a way to write multiple result documents. You >> could do it by returning a sequence of document nodes to the application, >> and then having the Java application serialize them and write them to >> disk, but it would have to know where to write them. It's easier to >> achieve this in XSLT: >> >> >> >> >> >> >> >> Regards, >> >> Michael Kay >> http://www.saxonica.com/ >> http://twitter.com/michaelhkay >> >> ________________________________ >> From: talk-bounces@x-query.com [mailto:talk-bounces@x-query.com] On >> Behalf Of Byomokesh Sahoo >> Sent: 08 February 2010 12:14 >> To: talk@x-query.com >> Subject: [xquery-talk] Function Copy error >> >> Hi, >> >> I want split the one xml to multiple xml file using xquery. But it >> showing error function copy. Please see the below code and give some >> point out. >> >> XML >> >> >> >> Hi >> An informal short greeting. >> >> >> Hello >> A more formal greeting. >> >> >> >> >> >> let $input-document := 'splitfile.xml' >> let $collection := 'file///D:/temp' >> >> for $term-data in doc($input-document)/root/row >> let $term-name := $term-data/Term/text() >> let $documentname := concat($term-name, '.xml') >> let $store-return := copy($collection, $documentname, $term-data) >> >> return >> >> {$term-name} >> {$documentname} >> >> >> I am using saxon 9.2 >> >> Thanks >> Byomokesh > > _______________________________________________ > talk@x-query.com > http://x-query.com/mailman/listinfo/talk > From mike at saxonica.com Mon Feb 8 16:00:56 2010 From: mike at saxonica.com (Michael Kay) Date: Mon Feb 8 07:52:30 2010 Subject: [xquery-talk] Function Copy error In-Reply-To: <373764c61002080600hf2f0a6dr70384fc59c6fff9b@mail.gmail.com> References: <373764c61002080413u7dae7f15v8603f3f030601da3@mail.gmail.com><244F0F53BC0B4A5EB4A78BC153CFD6E4@Sealion> <373764c61002080600hf2f0a6dr70384fc59c6fff9b@mail.gmail.com> Message-ID: The example uses ddtek:serialize-to-uri() which is a DataDirect vendor extension. It doesn't use copy(). You could use similar logic in Saxon (and any other product that supports XQuery Updates) by enabling XQuery Update and using the put() function. http://www.w3.org/TR/xquery-update-10/#id-func-put Regards, Michael Kay http://www.saxonica.com/ http://twitter.com/michaelhkay > -----Original Message----- > From: talk-bounces@x-query.com > [mailto:talk-bounces@x-query.com] On Behalf Of Byomokesh Sahoo > Sent: 08 February 2010 14:00 > To: talk@x-query.com > Subject: Re: [xquery-talk] Function Copy error > > Yes. Its very easy to do using XSLT. Just I want try to do > any possibility using XQuery. > > I saw that > > Generating Multiple XML documents Using XQuery > > http://www.datadirect.com/developer/data-integration/tutorials > /xml-output/index.ssp > > > Thanks > Byomokesh > > > On Mon, Feb 8, 2010 at 6:32 PM, Michael Kay wrote: > > > > There is no function called copy(). What made you think > there was, and what did you expect it do? > > > > XQuery doesn't really have a way to write multiple result > documents. You could do it by returning a sequence of > document nodes to the application, and then having the Java > application serialize them and write them to disk, but it > would have to know where to write them. It's easier to > achieve this in XSLT: > > > > > > ? > > ???? > > ? > > > > > > Regards, > > > > Michael Kay > > http://www.saxonica.com/ > > http://twitter.com/michaelhkay > > > > ________________________________ > > From: talk-bounces@x-query.com [mailto:talk-bounces@x-query.com] On > > Behalf Of Byomokesh Sahoo > > Sent: 08 February 2010 12:14 > > To: talk@x-query.com > > Subject: [xquery-talk] Function Copy error > > > > Hi, > > > > I want split the one xml to multiple xml file using xquery. > But it showing error function copy. Please see the below code > and give some point out. > > > > XML > > > > > > ??? > > ??????? Hi > > ??????? An informal short greeting. > > ??? > > ??? > > ??????? Hello > > ??????? A more formal greeting. > > ??? > > > > > > > > > > let $input-document := 'splitfile.xml' > > let $collection := 'file///D:/temp' > > > > ???? for $term-data in doc($input-document)/root/row > > ??????? ??????? let $term-name := $term-data/Term/text() > > ??????? let $documentname := concat($term-name, '.xml') > > ??????? let $store-return := copy($collection, $documentname, > > $term-data) > > > > ???? return > > ??????? > > ?????????? {$term-name} > > ?????????? {$documentname} > > ??????? > > > > I am using saxon 9.2 > > > > Thanks > > Byomokesh > > _______________________________________________ > talk@x-query.com > http://x-query.com/mailman/listinfo/talk From sahoo.byomokesh at gmail.com Tue Feb 9 09:25:10 2010 From: sahoo.byomokesh at gmail.com (Byomokesh Sahoo) Date: Mon Feb 8 19:32:27 2010 Subject: [xquery-talk] Function Copy error In-Reply-To: <42B056B376824FF6845601CB5AB6445E@DLEEI7> References: <373764c61002080413u7dae7f15v8603f3f030601da3@mail.gmail.com> <244F0F53BC0B4A5EB4A78BC153CFD6E4@Sealion> <373764c61002080600hf2f0a6dr70384fc59c6fff9b@mail.gmail.com> <42B056B376824FF6845601CB5AB6445E@DLEEI7> Message-ID: <373764c61002081955k24075c65tfd49b5f61021cf33@mail.gmail.com> Ok David, But XMLSH Script environment for Unix. I am working in Windows On Mon, Feb 8, 2010 at 8:09 PM, David Lee wrote: > This (multiple output files) ?is a data direct specific feature. > > If you'd like to use saxon and XQuery but avoid writing custom java code, > you might consider xmlsh. > www.xmlsh.org > > The command "xsplit" will split documents of the sort you describe. > http://www.xmlsh.org/CommandXsplit > > Combined with the the command ?xmove > http://www.xmlsh.org/CommandXmove > > Will rename the files in bulk based on an xpath expression. > > > But the xslt example Mr. Kay suggested looks easier :) > > ( fyi you can run xslt as a post process to your xquery code in your > language of choice, including xmlsh). > ?xquery ... | xslt ... > > > > > ---------------------------------------------------- > David A. Lee > dlee@calldei.com > http://www.calldei.com > http://www.xmlsh.org > > > -------------------------------------------------- > From: "Byomokesh Sahoo" > Sent: Monday, February 08, 2010 9:00 AM > To: > Subject: Re: [xquery-talk] Function Copy error > >> Yes. Its very easy to do using XSLT. Just I want try to do any >> possibility using XQuery. >> >> I saw that >> >> Generating Multiple XML documents Using XQuery >> >> >> http://www.datadirect.com/developer/data-integration/tutorials/xml-output/index.ssp >> >> >> Thanks >> Byomokesh >> >> >> On Mon, Feb 8, 2010 at 6:32 PM, Michael Kay wrote: >>> >>> There is no function called copy(). What made you think there was, and >>> what did you expect it do? >>> >>> XQuery doesn't really have a way to write multiple result documents. You >>> could do it by returning a sequence of document nodes to the application, >>> and then having the Java application serialize them and write them to disk, >>> but it would have to know where to write them. It's easier to achieve this >>> in XSLT: >>> >>> >>> ? >>> ? ? >>> ? >>> >>> >>> Regards, >>> >>> Michael Kay >>> http://www.saxonica.com/ >>> http://twitter.com/michaelhkay >>> >>> ________________________________ >>> From: talk-bounces@x-query.com [mailto:talk-bounces@x-query.com] On >>> Behalf Of Byomokesh Sahoo >>> Sent: 08 February 2010 12:14 >>> To: talk@x-query.com >>> Subject: [xquery-talk] Function Copy error >>> >>> Hi, >>> >>> I want split the one xml to multiple xml file using xquery. But it >>> showing error function copy. Please see the below code and give some point >>> out. >>> >>> XML >>> >>> >>> ? ? >>> ? ? ? ?Hi >>> ? ? ? ?An informal short greeting. >>> ? ? >>> ? ? >>> ? ? ? ?Hello >>> ? ? ? ?A more formal greeting. >>> ? ? >>> >>> >>> >>> >>> let $input-document := 'splitfile.xml' >>> let $collection := 'file///D:/temp' >>> >>> ? ? for $term-data in doc($input-document)/root/row >>> ? ? ? ? ? ? ? ?let $term-name := $term-data/Term/text() >>> ? ? ? ?let $documentname := concat($term-name, '.xml') >>> ? ? ? ?let $store-return := copy($collection, $documentname, $term-data) >>> >>> ? ? return >>> ? ? ? ? >>> ? ? ? ? ? {$term-name} >>> ? ? ? ? ? {$documentname} >>> ? ? ? ? >>> >>> I am using saxon 9.2 >>> >>> Thanks >>> Byomokesh >> >> _______________________________________________ >> talk@x-query.com >> http://x-query.com/mailman/listinfo/talk >> > From dlee at calldei.com Tue Feb 9 08:05:44 2010 From: dlee at calldei.com (David Lee) Date: Tue Feb 9 04:29:31 2010 Subject: [xquery-talk] Function Copy error In-Reply-To: <373764c61002081955k24075c65tfd49b5f61021cf33@mail.gmail.com> References: <373764c61002080413u7dae7f15v8603f3f030601da3@mail.gmail.com><244F0F53BC0B4A5EB4A78BC153CFD6E4@Sealion><373764c61002080600hf2f0a6dr70384fc59c6fff9b@mail.gmail.com><42B056B376824FF6845601CB5AB6445E@DLEEI7> <373764c61002081955k24075c65tfd49b5f61021cf33@mail.gmail.com> Message-ID: <6D424662FB0341CB9FB04472058CDA9F@DLEEI7> xmlsh is cross platform, on any platform that supports java. I personally use it on windows about 99% of the time. ( and yes that pipe syntax works on windows in xmlsh). ---------------------------------------------------- David A. Lee dlee@calldei.com http://www.calldei.com http://www.xmlsh.org -------------------------------------------------- From: "Byomokesh Sahoo" Sent: Monday, February 08, 2010 10:55 PM To: Subject: Re: [xquery-talk] Function Copy error > Ok David, But XMLSH Script environment for Unix. I am working in Windows > > > > On Mon, Feb 8, 2010 at 8:09 PM, David Lee wrote: >> This (multiple output files) is a data direct specific feature. >> >> If you'd like to use saxon and XQuery but avoid writing custom java code, >> you might consider xmlsh. >> www.xmlsh.org >> >> The command "xsplit" will split documents of the sort you describe. >> http://www.xmlsh.org/CommandXsplit >> >> Combined with the the command xmove >> http://www.xmlsh.org/CommandXmove >> >> Will rename the files in bulk based on an xpath expression. >> >> >> But the xslt example Mr. Kay suggested looks easier :) >> >> ( fyi you can run xslt as a post process to your xquery code in your >> language of choice, including xmlsh). >> xquery ... | xslt ... >> >> >> >> >> ---------------------------------------------------- >> David A. Lee >> dlee@calldei.com >> http://www.calldei.com >> http://www.xmlsh.org >> >> >> -------------------------------------------------- >> From: "Byomokesh Sahoo" >> Sent: Monday, February 08, 2010 9:00 AM >> To: >> Subject: Re: [xquery-talk] Function Copy error >> >>> Yes. Its very easy to do using XSLT. Just I want try to do any >>> possibility using XQuery. >>> >>> I saw that >>> >>> Generating Multiple XML documents Using XQuery >>> >>> >>> http://www.datadirect.com/developer/data-integration/tutorials/xml-output/index.ssp >>> >>> >>> Thanks >>> Byomokesh >>> >>> >>> On Mon, Feb 8, 2010 at 6:32 PM, Michael Kay wrote: >>>> >>>> There is no function called copy(). What made you think there was, and >>>> what did you expect it do? >>>> >>>> XQuery doesn't really have a way to write multiple result documents. >>>> You >>>> could do it by returning a sequence of document nodes to the >>>> application, >>>> and then having the Java application serialize them and write them to >>>> disk, >>>> but it would have to know where to write them. It's easier to achieve >>>> this >>>> in XSLT: >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> Regards, >>>> >>>> Michael Kay >>>> http://www.saxonica.com/ >>>> http://twitter.com/michaelhkay >>>> >>>> ________________________________ >>>> From: talk-bounces@x-query.com [mailto:talk-bounces@x-query.com] On >>>> Behalf Of Byomokesh Sahoo >>>> Sent: 08 February 2010 12:14 >>>> To: talk@x-query.com >>>> Subject: [xquery-talk] Function Copy error >>>> >>>> Hi, >>>> >>>> I want split the one xml to multiple xml file using xquery. But it >>>> showing error function copy. Please see the below code and give some >>>> point >>>> out. >>>> >>>> XML >>>> >>>> >>>> >>>> Hi >>>> An informal short greeting. >>>> >>>> >>>> Hello >>>> A more formal greeting. >>>> >>>> >>>> >>>> >>>> >>>> let $input-document := 'splitfile.xml' >>>> let $collection := 'file///D:/temp' >>>> >>>> for $term-data in doc($input-document)/root/row >>>> let $term-name := $term-data/Term/text() >>>> let $documentname := concat($term-name, '.xml') >>>> let $store-return := copy($collection, $documentname, >>>> $term-data) >>>> >>>> return >>>> >>>> {$term-name} >>>> {$documentname} >>>> >>>> >>>> I am using saxon 9.2 >>>> >>>> Thanks >>>> Byomokesh >>> >>> _______________________________________________ >>> talk@x-query.com >>> http://x-query.com/mailman/listinfo/talk >>> >> > > _______________________________________________ > talk@x-query.com > http://x-query.com/mailman/listinfo/talk > From gary.m.lewis at gmail.com Thu Feb 11 09:31:21 2010 From: gary.m.lewis at gmail.com (Gary Lewis) Date: Thu Feb 11 06:30:10 2010 Subject: [xquery-talk] DOM scripting with server-side xquery Message-ID: <1be6002b1002110631g1cbfb1a0u24c740d4d789f6a4@mail.gmail.com> This is a naive question but one I've not been able to answer on my own (too many gaps in what I don't know about web technologies). Is it possible to do DOM scripting with xquery from the server with no, or only minimal pass-thru, involvement of Javascript on the client? If so, could you point me to an example? I'm aware of the xqib plugin for IE and Firefox on Windows. That's a step forward. But I'd like to use xquery across the major platforms and browsers. So that seems to imply xquery would need to run on the server rather than in the browser. As always, thanks. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://x-query.com/pipermail/talk/attachments/20100211/30026c32/attachment.htm From dlee at calldei.com Thu Feb 11 09:38:18 2010 From: dlee at calldei.com (David Lee) Date: Thu Feb 11 06:35:57 2010 Subject: [xquery-talk] DOM scripting with server-side xquery In-Reply-To: <1be6002b1002110631g1cbfb1a0u24c740d4d789f6a4@mail.gmail.com> References: <1be6002b1002110631g1cbfb1a0u24c740d4d789f6a4@mail.gmail.com> Message-ID: There are multiple XQuery powered servers, such as MarkLogic, eXists. You can also write your own XQuery in your own server. All depends what your server is and what your language skills are. There is also XSLT and XQuery based JSP libraries. If your running a J2EE server (like Tomcat) and want easy scripting with minimal (I.e. no) java coding integrated into it without having to run a separate server, you might want to consider the xmlsh Servlet code. http://www.xmlsh.org/EmbeddingServlet I'm using this, for example, to run XSLT and XQuery on a Tomcat server. One example I use is to do XSLT from a MarkLogic server by running the XML through a tomcat server via http post. ---------------------------------------------------- David A. Lee dlee@calldei.com http://www.calldei.com http://www.xmlsh.org From: Gary Lewis Sent: Thursday, February 11, 2010 9:31 AM To: talk@x-query.com Subject: [xquery-talk] DOM scripting with server-side xquery This is a naive question but one I've not been able to answer on my own (too many gaps in what I don't know about web technologies). Is it possible to do DOM scripting with xquery from the server with no, or only minimal pass-thru, involvement of Javascript on the client? If so, could you point me to an example? I'm aware of the xqib plugin for IE and Firefox on Windows. That's a step forward. But I'd like to use xquery across the major platforms and browsers. So that seems to imply xquery would need to run on the server rather than in the browser. As always, thanks. -------------------------------------------------------------------------------- _______________________________________________ talk@x-query.com http://x-query.com/mailman/listinfo/talk -------------- next part -------------- An HTML attachment was scrubbed... URL: http://x-query.com/pipermail/talk/attachments/20100211/0f38c75c/attachment.htm From gkholman at CraneSoftwrights.com Thu Feb 11 10:40:39 2010 From: gkholman at CraneSoftwrights.com (G. Ken Holman) Date: Thu Feb 11 07:33:54 2010 Subject: [xquery-talk] [Announce] Upcoming hands-on XSLT/XQuery training in Europe and US - XQuery-Talk In-Reply-To: <7.0.1.0.2.20100107140309.026a9320@CraneSoftwrights.com> References: <7.0.1.0.2.20100107140309.026a9320@CraneSoftwrights.com> Message-ID: <7.0.1.0.2.20100211103814.02681c80@wheresmymailserver.com> Just a quick note that there are still three seats available for the XML Prague http://XMLPrague.cz post-conference hands-on tutorial on XSLT and XQuery. The early-bird date for reduced fare ends February 14, 2010, after which the 10% discount is only available to repeat customers of Crane and to the second and subsequent students from a given company. The maximum class size in Prague is six, so this is an excellent opportunity to participate in a small class with your focused questions and interaction. The early-bird period for the class in California ends April 5, 2010. . . . . . . . . . . . . Ken At 2010-01-07 14:03 -0500, I wrote: >Registration is now open for two >publicly-subscribed deliveries of our hands-on >XSLT/XQuery training coming up, one in Europe and one in the US. > >These are the most in-depth configurations of >Crane's XSLT and XQuery training classes, >covering the use of every element, every >attribute, every keyword and every function of >both XSLT/XPath 1.0 and 2.0 and XQuery 1.0 with >more detail and more exercises than other >available configurations of our material. > >Prague, Czech Republic - March 15-19, 2010 >http://www.CraneSoftwrights.com/index.html#Crane201003CZ > > A post-conference tutorial for XML Prague 2010 - http://XMLPrague.cz > > Practical Transformation Using XSLT, XQuery and XPath (5 days): > http://www.CraneSoftwrights.com/training/ptuxq/ptuxqsyl.htm > > Venue - Residence Retezov?, Prague > - class size limited to a total of only 6 students > http://www.retezova.com/?id=618 > > Instructor/author: > http://www.CraneSoftwrights.com/bio/gkholman.htm > > Early-bird date for discounted registration: February 15, 2010 > http://www.CraneSoftwrights.com/forms/register.htm#prices > >San Carlos, California - April 26-30, 2010 >http://www.CraneSoftwrights.com/index.html#Crane201004MLC > > Practical Transformation Using XSLT, XQuery and XPath (5 days): > http://www.CraneSoftwrights.com/training/ptuxq/ptuxqsyl.htm > > Venue - Mark Logic Corporation headquarters, San Carlos, CA > http://www.marklogic.com/company/contact.html > > Instructor/author: > http://www.CraneSoftwrights.com/bio/gkholman.htm > > Early-bird date for discounted registration: April 5, 2010 > http://www.CraneSoftwrights.com/forms/register.htm#prices > >We also have a number of other private corporate >deliveries between now and then in the US and >India. If you are interested in having us teach >publicly or privately anywhere in the world, >please review our syllabi and all of our upcoming events at: > > http://www.CraneSoftwrights.com/schedule.htm#calendar > >I look forward to answering any questions you may have off-list, please. > >Thanks! > >. . . . . . . . . . . . . . Ken > >cc: XML Dev, XQuery-Talk, XSL List, XML-Doc, XML-L, Mark Logic Developer list > >p.s. apologies for multiply-received copies of >this announcement through the different lists; >all of Crane's announcements include >"[Announce]" in the subject line for filtering them away -- XSLT/XQuery/XPath training after http://XMLPrague.cz 2010-03-15/19 XSLT/XQuery/XPath training: San Carlos, California 2010-04-26/30 Vote for your XML training: http://www.CraneSoftwrights.com/q/i/ Crane Softwrights Ltd. http://www.CraneSoftwrights.com/q/ Training tools: Comprehensive interactive XSLT/XPath 1.0/2.0 video Video lesson: http://www.youtube.com/watch?v=PrNjJCh7Ppg&fmt=18 Video overview: http://www.youtube.com/watch?v=VTiodiij6gE&fmt=18 G. Ken Holman mailto:gkholman@CraneSoftwrights.com Male Cancer Awareness Nov'07 http://www.CraneSoftwrights.com/q/bc Legal business disclaimers: http://www.CraneSoftwrights.com/legal From dflorescu at mac.com Thu Feb 11 09:51:55 2010 From: dflorescu at mac.com (Daniela Florescu) Date: Thu Feb 11 09:38:42 2010 Subject: [xquery-talk] DOM scripting with server-side xquery In-Reply-To: <1be6002b1002110631g1cbfb1a0u24c740d4d789f6a4@mail.gmail.com> References: <1be6002b1002110631g1cbfb1a0u24c740d4d789f6a4@mail.gmail.com> Message-ID: <8B60BFC2-025D-4311-9D88-3137EE9EFBF1@mac.com> Gary, XQIB (www.xqib.org) will have soon a release that runs XQuery scripts on all browsers (not only Windows). Hope that helps, Dana On Feb 11, 2010, at 6:31 AM, Gary Lewis wrote: > This is a naive question but one I've not been able to answer on my > own > (too many gaps in what I don't know about web technologies). > > Is it possible to do DOM scripting with xquery from the server with > no, > or only minimal pass-thru, involvement of Javascript on the client? If > so, could you point me to an example? > > I'm aware of the xqib plugin for IE and Firefox on Windows. That's a > step forward. But I'd like to use xquery across the major platforms > and > browsers. So that seems to imply xquery would need to run on the > server > rather than in the browser. > > As always, thanks. > _______________________________________________ > talk@x-query.com > http://x-query.com/mailman/listinfo/talk -------------- next part -------------- An HTML attachment was scrubbed... URL: http://x-query.com/pipermail/talk/attachments/20100211/8bdb5df5/attachment.htm From wcandillon at gmail.com Thu Feb 11 19:00:08 2010 From: wcandillon at gmail.com (William Candillon) Date: Thu Feb 11 09:46:57 2010 Subject: [xquery-talk] DOM scripting with server-side xquery In-Reply-To: <8B60BFC2-025D-4311-9D88-3137EE9EFBF1@mac.com> References: <1be6002b1002110631g1cbfb1a0u24c740d4d789f6a4@mail.gmail.com> <8B60BFC2-025D-4311-9D88-3137EE9EFBF1@mac.com> Message-ID: <43b5c44e1002111000j6aa98542p886a88db838cfc0a@mail.gmail.com> Hello Gary, If you are looking to runs XQuery code on the server, you might want to take a look at Sausalito: http://sausalito.28msec.com. You'll find an introductionary screencast at http://www.28msec.com. Best regards, William On Thu, Feb 11, 2010 at 6:51 PM, Daniela Florescu wrote: > Gary, > XQIB (www.xqib.org) will have soon a release that runs XQuery scripts on all > browsers > (not only Windows). > Hope that helps, > Dana > > > > > On Feb 11, 2010, at 6:31 AM, Gary Lewis wrote: > > This is a naive question but one I've not been able to answer on my own > (too many gaps in what I don't know about web technologies). > Is it possible to do DOM scripting with xquery from the server with no, > or only minimal pass-thru, involvement of Javascript on the client? If > so, could you point me to an example? > I'm aware of the xqib plugin for IE and Firefox on Windows. That's a > step forward. But I'd like to use xquery across the major platforms and > browsers. So that seems to imply xquery would need to run on the server > rather than in the browser. > As always, thanks. > _______________________________________________ > talk@x-query.com > http://x-query.com/mailman/listinfo/talk > > _______________________________________________ > talk@x-query.com > http://x-query.com/mailman/listinfo/talk > From costello at mitre.org Sat Feb 20 08:38:07 2010 From: costello at mitre.org (Costello, Roger L.) Date: Sat Feb 20 05:37:54 2010 Subject: [xquery-talk] [XQuery Update Newbie] Rename all element nodes (in no namespace) to the same name, but in a namespace? Message-ID: <9E51F88D5247B648908850C35A3BBB500434FDFF1C@IMCMBX3.MITRE.ORG> Hi Folks, FitnessCenter.xml contains elements in no namespace: Jeff lightgrey David lightblue Roger lightyellow I want to change each element to be in a namespace: Jeff lightgrey David lightblue Roger lightyellow I figured that I could simply do a rename: for $i in doc('FitnessCenter.xml')//* return rename node $i as QName('http://www.gym.com', name($i)) Here's the error message I get from Saxon: New name conflicts with existing namespace binding What's the correct way to do this please? /Roger From mike at saxonica.com Sat Feb 20 14:17:53 2010 From: mike at saxonica.com (Michael Kay) Date: Sat Feb 20 06:16:47 2010 Subject: [xquery-talk] [XQuery Update Newbie] Rename all element nodes (in no namespace) to the same name, but in a namespace? In-Reply-To: <9E51F88D5247B648908850C35A3BBB500434FDFF1C@IMCMBX3.MITRE.ORG> References: <9E51F88D5247B648908850C35A3BBB500434FDFF1C@IMCMBX3.MITRE.ORG> Message-ID: > I figured that I could simply do a rename: > > for $i in doc('FitnessCenter.xml')//* > return rename node $i as QName('http://www.gym.com', name($i)) > > Here's the error message I get from Saxon: > > New name conflicts with existing namespace binding > > What's the correct way to do this please? Try rename node $i as QName('http://www.gym.com', local-name($i)) You're trying to use the existing prefix to refer to a new namespace, and the trouble is that rename() doesn't get rid of the unused namespace node which binds that prefix to a different URI. Regards, Michael Kay http://www.saxonica.com/ http://twitter.com/michaelhkay From costello at mitre.org Sat Feb 20 09:32:08 2010 From: costello at mitre.org (Costello, Roger L.) Date: Sat Feb 20 06:30:35 2010 Subject: [xquery-talk] [XQuery Update Newbie] Rename all element nodes (in no namespace) to the same name, but in a namespace? In-Reply-To: References: <9E51F88D5247B648908850C35A3BBB500434FDFF1C@IMCMBX3.MITRE.ORG>, Message-ID: <9E51F88D5247B648908850C35A3BBB500434FDFF1F@IMCMBX3.MITRE.ORG> Michael Kay wrote: > Try > rename node $i as QName('http://www.gym.com', local-name($i)) I tried that. I got the same error message: New name conflicts with existing namespace binding I am using Saxon, version 9.2.0.6 Any ideas? /Roger ________________________________________ From: Michael Kay [mike@saxonica.com] Sent: Saturday, February 20, 2010 9:17 AM To: Costello, Roger L.; talk@x-query.com Subject: RE: [xquery-talk] [XQuery Update Newbie] Rename all element nodes (in no namespace) to the same name, but in a namespace? > I figured that I could simply do a rename: > > for $i in doc('FitnessCenter.xml')//* > return rename node $i as QName('http://www.gym.com', name($i)) > > Here's the error message I get from Saxon: > > New name conflicts with existing namespace binding > > What's the correct way to do this please? Try rename node $i as QName('http://www.gym.com', local-name($i)) You're trying to use the existing prefix to refer to a new namespace, and the trouble is that rename() doesn't get rid of the unused namespace node which binds that prefix to a different URI. Regards, Michael Kay http://www.saxonica.com/ http://twitter.com/michaelhkay From gfourny at inf.ethz.ch Sat Feb 20 16:25:45 2010 From: gfourny at inf.ethz.ch (Ghislain Fourny) Date: Sat Feb 20 07:23:36 2010 Subject: [xquery-talk] [XQuery Update Newbie] Rename all element nodes (in no namespace) to the same name, but in a namespace? In-Reply-To: <9E51F88D5247B648908850C35A3BBB500434FDFF1F@IMCMBX3.MITRE.ORG> References: <9E51F88D5247B648908850C35A3BBB500434FDFF1C@IMCMBX3.MITRE.ORG>, <9E51F88D5247B648908850C35A3BBB500434FDFF1F@IMCMBX3.MITRE.ORG> Message-ID: <232006DB-2359-4033-AC69-8BCA517DC19F@inf.ethz.ch> Hi Roger, How about for $i in doc('FitnessCenter.xml')//* return rename node $i as QName('http://www.gym.com', concat('gym:', local-name($i))) ? Using a non-empty prefix, it should not conflict with the default namespace binding. Kind regards, Ghislain > Michael Kay wrote: > >> Try >> rename node $i as QName('http://www.gym.com', local-name($i)) > > I tried that. I got the same error message: > > New name conflicts with existing namespace binding > > I am using Saxon, version 9.2.0.6 > > Any ideas? > > /Roger From costello at mitre.org Sat Feb 20 10:38:29 2010 From: costello at mitre.org (Costello, Roger L.) Date: Sat Feb 20 07:35:38 2010 Subject: [xquery-talk] [XQuery Update Newbie] Rename all element nodes (in no namespace) to the same name, but in a namespace? In-Reply-To: <232006DB-2359-4033-AC69-8BCA517DC19F@inf.ethz.ch> References: <9E51F88D5247B648908850C35A3BBB500434FDFF1C@IMCMBX3.MITRE.ORG>, <9E51F88D5247B648908850C35A3BBB500434FDFF1F@IMCMBX3.MITRE.ORG>, <232006DB-2359-4033-AC69-8BCA517DC19F@inf.ethz.ch> Message-ID: <9E51F88D5247B648908850C35A3BBB500434FDFF20@IMCMBX3.MITRE.ORG> Ghislain Fourny wrote: > How about > for $i in doc('FitnessCenter.xml')//* > return rename node $i as QName('http://www.gym.com', concat('gym:', local-name($i))) I tried that. This time I didn't get an error message from Saxon. However, the output is not right. On all elements, except the root element, there are two (repeat) namespace declarations: Jeff lightgrey David lightblue Roger lightyellow Any ideas? /Roger ________________________________________ From: Ghislain Fourny [gfourny@inf.ethz.ch] Sent: Saturday, February 20, 2010 10:25 AM To: Costello, Roger L. Cc: talk@x-query.com Subject: Re: [xquery-talk] [XQuery Update Newbie] Rename all element nodes (in no namespace) to the same name, but in a namespace? Hi Roger, How about for $i in doc('FitnessCenter.xml')//* return rename node $i as QName('http://www.gym.com', concat('gym:', local-name($i))) ? Using a non-empty prefix, it should not conflict with the default namespace binding. Kind regards, Ghislain > Michael Kay wrote: > >> Try >> rename node $i as QName('http://www.gym.com', local-name($i)) > > I tried that. I got the same error message: > > New name conflicts with existing namespace binding > > I am using Saxon, version 9.2.0.6 > > Any ideas? > > /Roger From gfourny at inf.ethz.ch Sat Feb 20 19:36:24 2010 From: gfourny at inf.ethz.ch (Ghislain Fourny) Date: Sat Feb 20 10:30:45 2010 Subject: [xquery-talk] [XQuery Update Newbie] Rename all element nodes (in no namespace) to the same name, but in a namespace? In-Reply-To: <9E51F88D5247B648908850C35A3BBB500434FDFF20@IMCMBX3.MITRE.ORG> References: <9E51F88D5247B648908850C35A3BBB500434FDFF1C@IMCMBX3.MITRE.ORG>, <9E51F88D5247B648908850C35A3BBB500434FDFF1F@IMCMBX3.MITRE.ORG>, <232006DB-2359-4033-AC69-8BCA517DC19F@inf.ethz.ch> <9E51F88D5247B648908850C35A3BBB500434FDFF20@IMCMBX3.MITRE.ORG> Message-ID: <58E7C112-2A6F-4AB7-B4D4-1DA5E4823BF8@inf.ethz.ch> Hi Roger, This is strange... This output does not seem to be well-formed XML: a namespace declaration is in particular a reserved attribute, and the XML specification says that an element cannot have two attributes with the same name. Also, something from the XQuery Update Facility specification regarding the upd:rename update primitive is unclear to me: in your original document, there are no bindings at all ("empty prefix" to "no namespace" is not a binding, if I am correct). So, on the one hand, to me the query suggested by Michael Kay is (theoretically) correct and I do not understand why it raises a conflict, given what is in the specification. On the other hand, it makes sense to me that Saxon complains, for the following reason: if no error were raised when renaming an element which is in no namespace to a QName which has a namespace but no prefix (and hence introducing a default namespace binding), then namespace propagation could potentially have the side effect of modifying the QNames of the children (i.e., they would all be in the new namespace) although they are not being renamed... Or am I missing something? Thanks and kind regards, Ghislain > I tried that. This time I didn't get an error message from Saxon. However, the output is not right. On all elements, except the root element, there are two (repeat) namespace declarations: > > > > Jeff > lightgrey > > > David > lightblue > > > Roger > lightyellow > > > > Any ideas? > > /Roger > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://x-query.com/pipermail/talk/attachments/20100220/82e970cc/attachment.htm From mike at saxonica.com Sat Feb 20 19:20:56 2010 From: mike at saxonica.com (Michael Kay) Date: Sat Feb 20 11:13:57 2010 Subject: [xquery-talk] [XQuery Update Newbie] Rename all element nodes(in no namespace) to the same name, but in a namespace? In-Reply-To: <9E51F88D5247B648908850C35A3BBB500434FDFF20@IMCMBX3.MITRE.ORG> References: <9E51F88D5247B648908850C35A3BBB500434FDFF1C@IMCMBX3.MITRE.ORG>, <9E51F88D5247B648908850C35A3BBB500434FDFF1F@IMCMBX3.MITRE.ORG>, <232006DB-2359-4033-AC69-8BCA517DC19F@inf.ethz.ch> <9E51F88D5247B648908850C35A3BBB500434FDFF20@IMCMBX3.MITRE.ORG> Message-ID: > > How about > > for $i in doc('FitnessCenter.xml')//* > > return rename node $i as QName('http://www.gym.com', > > concat('gym:', local-name($i))) > > I tried that. This time I didn't get an error message from > Saxon. However, the output is not right. On all elements, > except the root element, there are two (repeat) namespace > declarations: That's a bug. Michael Kay Saxonica > > > xmlns:gym="http://www.gym.com" level="platinum"> > xmlns:gym="http://www.gym.com">Jeff > xmlns:gym="http://www.gym.com">lightgrey > > xmlns:gym="http://www.gym.com" level="gold"> > xmlns:gym="http://www.gym.com">David > xmlns:gym="http://www.gym.com">lightblue > > xmlns:gym="http://www.gym.com" level="platinum"> > xmlns:gym="http://www.gym.com">Roger > xmlns:gym="http://www.gym.com">lightyellow > > > > Any ideas? > > /Roger > ________________________________________ > From: Ghislain Fourny [gfourny@inf.ethz.ch] > Sent: Saturday, February 20, 2010 10:25 AM > To: Costello, Roger L. > Cc: talk@x-query.com > Subject: Re: [xquery-talk] [XQuery Update Newbie] Rename all > element nodes (in no namespace) to the same name, but in a namespace? > > Hi Roger, > > How about > > for $i in doc('FitnessCenter.xml')//* > return rename node $i as QName('http://www.gym.com', > concat('gym:', local-name($i))) > > ? > > Using a non-empty prefix, it should not conflict with the > default namespace binding. > > Kind regards, > Ghislain > > > > Michael Kay wrote: > > > >> Try > >> rename node $i as QName('http://www.gym.com', local-name($i)) > > > > I tried that. I got the same error message: > > > > New name conflicts with existing namespace binding > > > > I am using Saxon, version 9.2.0.6 > > > > Any ideas? > > > > /Roger > _______________________________________________ > talk@x-query.com > http://x-query.com/mailman/listinfo/talk From ricardo.queiros at gmail.com Sun Feb 21 09:23:19 2010 From: ricardo.queiros at gmail.com (=?ISO-8859-1?Q?Ricardo_Queir=F3s?=) Date: Sun Feb 21 00:51:49 2010 Subject: [xquery-talk] XATA - a XML Conference (papers submission deadline extended) Message-ID: <6cec8a991002210123x1910feafvb4bf502330afef8b@mail.gmail.com> XATA - XML, APPLICATIONS AND ASSOCIATED TECHNOLOGIES 2010 > ====================================================== > > http://www.eseig.ipp.pt/conferencias/xata2010/ > > From 19 to 20 May, 2010 - ESEIG, IPP > ************************************************************************************************** > * DEADLINE EXTENSION TO PAPERS SUBMISSION: 14 MARCH* > ************************************************************************************************** > CALL FOR PAPERS > > The main goal of the eighth national conference XATA 2010 is the > creation of a space for the discussion about XML, its different > usages and all the associated technologies. > > This XATA edition will be hold in Escola Superior de Estudos > Industriais e de Gest?o, a school from Instituto Polit?cnico do > Porto, in Vila do Conde, Portugal. > > The conference is open to technicians and interested users in this > subject, coming from the academic or the industrial world. We > invite you to send an article proposal for posterior presentation > in the conference, or just participating in the conference. > > Articles should be written in English but the presentations can be > done in Portuguese, Galician, Spanish or English. Articles should > not exceed 12 pages. Small articles should not exceed 6 pages. The > articles should comply with Lecture Notes in Computer Science layout > rules and be submitted electronically (check hyperlink to EasyChair > in the conference website). > > CONFERENCE SUBJECTS > > * Semantic Web and Classification Structures in XML > * Methodologies for Specification in XML > * XML and Databases > * XML-Mining > * Querying languages for XML > * Web Services -- Architectures and Practical Cases > * WEB Technologies > - Web 2.0, AJAX, XHTML, HTML5 > * XML Applications > - Digital Libraries based in XML > - E-learning based in XML > - Workflow and Document management > * Edition of XML > - XML Generic Editors > - XML Editors for specific schemas > - XML Visualization Tools > * XML Document Processors > * XML Standards > - XML, XSL, SGML, LMNL, XSL-FO, XTM, RDF, XQuery, Topic Maps, SVG, > MathML, OWL, UBL, XSD, TexMECS, RNG and others) > * Other languages for document annotation/serialization > > IMPORTANT DATES > > * March, 1 - Deadline for contributions submission > * March, 31 - Acceptance notification > * April, 15 - Camera Ready version submission > * May, 19-20 - XATA 2010 > > STEERING COMMITTEE > > * Cristina Ribeiro (FEUP, INESC Porto) > * Gabriel David (FEUP, INESC Porto) > * Jo?o Correia Lopes (FEUP, INESC Porto) > * Jos? Carlos Ramalho (Program Chair - DI/UM) > * Jos? Paulo Leal (FCUP) > * Pedro Henriques (DI/UM) > > SCIENTIFIC COMMITTEE > > * Ademar Aguiar (FEUP, INESC Porto) > * Alberto Rodrigues da Silva (IST, INESC-ID) > * Alberto Sim?es (ESEIG/IPP) > * Alda Lopes Gan?arski (Institut National des T?l?communications) > * Ana Paula Afonso (DI/FC/UL) > * Benedita Malheiro (ISEP) > * Cristina Ribeiro (FEUP, INESC Porto) > * Daniela da Cruz (DI/UM) > * Francisco Couto (DI/FC/UL) > * Gabriel David (FEUP, INESC Porto) > * Giovani Librelotto (UFSM) > * Jo?o Correia Lopes (FEUP, INESC Porto) > * Jo?o Moura Pires (FCT/UNL) > * Jos? Carlos Ramalho (DI/UM) > * Jos? Jo?o Almeida (DI/UM) > * Jos? Paulo Leal (DCC/FCUP) > * Luis Ferreira (EST/IPCA) > * Lu?s Carri?o (DI/FC/UL) > * Manolo Ramos (UVigo) > * Marta Jacinto (ITIJ) > * Miguel Ferreira (DSI/UM) > * Nuno Horta (IST/IT) > * Paulo Marques (DEI/UC) > * Pedro Rangel Henriques (DI/UM) > * Ricardo Queir?s (ESEIG/IPP) > * Rui Lopes (DI/FC/UL) > * Salvador Abreu (DI/UE) > * Stephane Gan?arski (LIP6, University P. & M. Curie Paris 6) > * Xavier G?mez Guinovart (UVigo) > > ORGANIZING COMMITTEE > > * Alberto Sim?es (ESEIG/IPP) > * Lu?s Correia (ESEIG/IPP) > * M?rio Pinto (ESEIG/IPP) > * Ricardo Queir?s (ESEIG/IPP) > > > > -- Ricardo Queir?s -------------- next part -------------- An HTML attachment was scrubbed... URL: http://x-query.com/pipermail/talk/attachments/20100221/c9f9381a/attachment.htm From mike at saxonica.com Mon Feb 22 12:20:45 2010 From: mike at saxonica.com (Michael Kay) Date: Mon Feb 22 03:35:49 2010 Subject: [xquery-talk] [XQuery Update Newbie] Rename all element nodes(in no namespace) to the same name, but in a namespace? In-Reply-To: <9E51F88D5247B648908850C35A3BBB500434FDFF20@IMCMBX3.MITRE.ORG> References: <9E51F88D5247B648908850C35A3BBB500434FDFF1C@IMCMBX3.MITRE.ORG>, <9E51F88D5247B648908850C35A3BBB500434FDFF1F@IMCMBX3.MITRE.ORG>, <232006DB-2359-4033-AC69-8BCA517DC19F@inf.ethz.ch> <9E51F88D5247B648908850C35A3BBB500434FDFF20@IMCMBX3.MITRE.ORG> Message-ID: <613C7AD1200842B595B62453814A8C7F@Sealion> Roger, I have managed to reproduce (and fix) the cases where you were getting an error about a spurious namespace conflict. But I haven't been able to reproduce the case where you get duplicate namespace declarations in the output. Can you let me know exactly how you were running this to obtain this output? Regards, Michael Kay http://www.saxonica.com/ http://twitter.com/michaelhkay > Ghislain Fourny wrote: > > > How about > > for $i in doc('FitnessCenter.xml')//* > > return rename node $i as QName('http://www.gym.com', > > concat('gym:', local-name($i))) > > I tried that. This time I didn't get an error message from > Saxon. However, the output is not right. On all elements, > except the root element, there are two (repeat) namespace > declarations: > > > xmlns:gym="http://www.gym.com" level="platinum"> > xmlns:gym="http://www.gym.com">Jeff > xmlns:gym="http://www.gym.com">lightgrey > > xmlns:gym="http://www.gym.com" level="gold"> > xmlns:gym="http://www.gym.com">David > xmlns:gym="http://www.gym.com">lightblue > > xmlns:gym="http://www.gym.com" level="platinum"> > xmlns:gym="http://www.gym.com">Roger > xmlns:gym="http://www.gym.com">lightyellow > > > From costello at mitre.org Mon Feb 22 07:32:40 2010 From: costello at mitre.org (Costello, Roger L.) Date: Mon Feb 22 03:46:40 2010 Subject: [xquery-talk] [XQuery Update Newbie] Rename all element nodes(in no namespace) to the same name, but in a namespace? In-Reply-To: <613C7AD1200842B595B62453814A8C7F@Sealion> References: <9E51F88D5247B648908850C35A3BBB500434FDFF1C@IMCMBX3.MITRE.ORG>, <9E51F88D5247B648908850C35A3BBB500434FDFF1F@IMCMBX3.MITRE.ORG>, <232006DB-2359-4033-AC69-8BCA517DC19F@inf.ethz.ch> <9E51F88D5247B648908850C35A3BBB500434FDFF20@IMCMBX3.MITRE.ORG>, <613C7AD1200842B595B62453814A8C7F@Sealion> Message-ID: <9E51F88D5247B648908850C35A3BBB500434FDFF40@IMCMBX3.MITRE.ORG> Hi Michael, Here is the XQuery Update file I used: --------------------------------------------------- for $i in doc('FitnessCenter.xml')//* return rename node $i as QName('http://www.gym.com', concat('gym:', local-name($i))) --------------------------------------------------- Here is FitnessCenter.xml: --------------------------------------------------- Jeff lightgrey David lightblue Roger lightyellow --------------------------------------------------- Here is the result: --------------------------------------------------- Jeff lightgrey David lightblue Roger lightyellow --------------------------------------------------- I am using Saxon, version 9.2.0.6 Here's how I invoked Saxon: --------------------------------------------------- java -classpath %CLASSPATH% net.sf.saxon.Query -update:on -tree:linked -backup:on FitnessCenter.xu --------------------------------------------------- /Roger ________________________________________ From: Michael Kay [mike@saxonica.com] Sent: Monday, February 22, 2010 7:20 AM To: Costello, Roger L.; talk@x-query.com Subject: RE: [xquery-talk] [XQuery Update Newbie] Rename all element nodes(in no namespace) to the same name, but in a namespace? Roger, I have managed to reproduce (and fix) the cases where you were getting an error about a spurious namespace conflict. But I haven't been able to reproduce the case where you get duplicate namespace declarations in the output. Can you let me know exactly how you were running this to obtain this output? Regards, Michael Kay http://www.saxonica.com/ http://twitter.com/michaelhkay > Ghislain Fourny wrote: > > > How about > > for $i in doc('FitnessCenter.xml')//* > > return rename node $i as QName('http://www.gym.com', > > concat('gym:', local-name($i))) > > I tried that. This time I didn't get an error message from > Saxon. However, the output is not right. On all elements, > except the root element, there are two (repeat) namespace > declarations: > > > xmlns:gym="http://www.gym.com" level="platinum"> > xmlns:gym="http://www.gym.com">Jeff > xmlns:gym="http://www.gym.com">lightgrey > > xmlns:gym="http://www.gym.com" level="gold"> > xmlns:gym="http://www.gym.com">David > xmlns:gym="http://www.gym.com">lightblue > > xmlns:gym="http://www.gym.com" level="platinum"> > xmlns:gym="http://www.gym.com">Roger > xmlns:gym="http://www.gym.com">lightyellow > > > From j.vega at helpprintsolutions.com Mon Feb 22 14:39:41 2010 From: j.vega at helpprintsolutions.com (Julio de la Vega) Date: Mon Feb 22 05:44:51 2010 Subject: [xquery-talk] xQuery to generate multiple xml outputs Message-ID: <000001cab3c4$7d0df8b0$7729ea10$@vega@helpprintsolutions.com> Hi *, This is my first email, I am new ix xQuery so I would like to say "hi and Thank you" to all the colleagues that are behind this email address: My first question is very simple: Imagine the next scenario: A XXXX A XXXX B YYYYY/Data> I need to create an xQuery that generates two different xml files. I am reading an xml file and depending of the value of one specific node (CATEGORY), I want to separate the information (CUSTOMERS) in multiple xml files. I need to generates the different outputs processing only one xQuery, I do not want to process several xQuerys because my input file is huge and performance is important. Is there any option? Thank you Julio -------------- next part -------------- An HTML attachment was scrubbed... URL: http://x-query.com/pipermail/talk/attachments/20100222/d8280db5/attachment.htm From adam.retter at googlemail.com Mon Feb 22 13:54:18 2010 From: adam.retter at googlemail.com (Adam Retter) Date: Mon Feb 22 05:53:54 2010 Subject: [xquery-talk] xQuery to generate multiple xml outputs In-Reply-To: <1795835058552240706@unknownmsgid> References: <1795835058552240706@unknownmsgid> Message-ID: Well using standard XQuery you could create one XML document as output that contains the two documents within, and later split them out. Otherwise depending on which XQuery engine you are using you could make use of platform provided XQuery extensions to write the documents out as nessecary. Which processor are you using? On 22 February 2010 13:39, Julio de la Vega wrote: > Hi *, > > > > > > This is my first email, I am new ix xQuery so I would like to say ?hi and > Thank you? to all the colleagues that are behind this email address: > > > > My first question is very simple: > > > > Imagine the next scenario: > > > > > > ??????????????? A > > ??????????????? XXXX > > > > > > ??????????????? A > > ??????????????? XXXX > > > > > > ??????????????? B > > ??????????????? YYYYY/Data> > > > > > > > > > > > > I need to create an xQuery that generates two different xml files. I am > reading an xml file and depending of the value of one specific node > (CATEGORY), I want to separate the information (CUSTOMERS) in multiple xml > files. > > I need to generates the different outputs processing only one xQuery, I do > not want to process several xQuerys because my input file is huge and > performance is important. > > > > Is there any option? > > > > > > > > Thank you > > > > Julio > > > > > > > > _______________________________________________ > talk@x-query.com > http://x-query.com/mailman/listinfo/talk > -- Adam Retter skype :adam.retter http://www.adamretter.org.uk From jonathan.robie at redhat.com Mon Feb 22 09:02:51 2010 From: jonathan.robie at redhat.com (Jonathan Robie) Date: Mon Feb 22 06:01:40 2010 Subject: [xquery-talk] xQuery to generate multiple xml outputs In-Reply-To: <000001cab3c4$7d0df8b0$7729ea10$@vega@helpprintsolutions.com> References: <000001cab3c4$7d0df8b0$7729ea10$@vega@helpprintsolutions.com> Message-ID: <4B828E8B.2060104@redhat.com> On 02/22/2010 08:39 AM, Julio de la Vega wrote: > I need to create an xQuery that generates two different xml files. I > am reading an xml file and depending of the value of one specific node > (CATEGORY), I want to separate the information (CUSTOMERS) in multiple > xml files. > > I need to generates the different outputs processing only one xQuery, > I do not want to process several xQuerys because my input file is huge > and performance is important. > If your XQuery processor supports updates, and it also supports the fn:put() function, then you can use that. If not ... well, XSLT does this nicely ... Jonathan From christian.gruen at gmail.com Mon Feb 22 15:13:39 2010 From: christian.gruen at gmail.com (=?ISO-8859-1?Q?Christian_Gr=FCn?=) Date: Mon Feb 22 06:12:59 2010 Subject: [xquery-talk] xQuery to generate multiple xml outputs In-Reply-To: <1795835058552240706@unknownmsgid> References: <1795835058552240706@unknownmsgid> Message-ID: You can use XQuery Update and the fn:put() function: let $doc := doc("customers.xml") let $customersA := { $doc//Customer[Category = 'A'] } let $customersB := { $doc//Customer[Category = 'B'] } return ( fn:put($customersA, 'CustomersA.xml'), fn:put($customersB, 'CustomersB.xml') ) Hope this helps, Christian ___________________________ Christian Gruen Universitaet Konstanz Department of Computer & Information Science D-78457 Konstanz, Germany Tel: +49 (0)7531/88-4449, Fax: +49 (0)7531/88-3577 http://www.inf.uni-konstanz.de/~gruen On Mon, Feb 22, 2010 at 2:39 PM, Julio de la Vega wrote: > Hi *, > > > > > > This is my first email, I am new ix xQuery so I would like to say ?hi and > Thank you? to all the colleagues that are behind this email address: > > > > My first question is very simple: > > > > Imagine the next scenario: > > > > > > ??????????????? A > > ??????????????? XXXX > > > > > > ??????????????? A > > ??????????????? XXXX > > > > > > ??????????????? B > > ??????????????? YYYYY/Data> > > > > > > > > > > > > I need to create an xQuery that generates two different xml files. I am > reading an xml file and depending of the value of one specific node > (CATEGORY), I want to separate the information (CUSTOMERS) in multiple xml > files. > > I need to generates the different outputs processing only one xQuery, I do > not want to process several xQuerys because my input file is huge and > performance is important. > > > > Is there any option? > > > > > > > > Thank you > > > > Julio > > > > > > > > _______________________________________________ > talk@x-query.com > http://x-query.com/mailman/listinfo/talk > From j.vega at helpprintsolutions.com Mon Feb 22 15:44:39 2010 From: j.vega at helpprintsolutions.com (Julio de la Vega) Date: Mon Feb 22 06:46:51 2010 Subject: [xquery-talk] Perfomance Problem Message-ID: <001401cab3cd$9049e570$b0ddb050$@vega@helpprintsolutions.com> Hi *, I have problems with performance in the next xQuery let $doc := doc("/Lib/doc) let $res := document { { let $coleccion_cod-agrupa_xi := document { for $XI in $doc/root/XI return ( {concat($XI/R00000/COD-ENT-GR, $XI/R00000/N-INT-PERS, $XI/R00000/N-ITN-DIRE )} {concat($XI/R00000/COD-ENT-GR, $XI/R00000/N-ITN-DIRE, "-2" )} {concat($XI/R00000/COD-ENT-GR, $XI/R00000/N-ITN-DIRE, "-3" )} ) } return for $distinct_agrupa1 in distinct-values($coleccion_cod-agrupa_xi/BLOQUE_CODAGRUPA/AGRUPA1) return {$distinct_agrupa1} {$coleccion_cod-agrupa_xi/BLOQUE_CODAGRUPA[AGRUPA1=$distinct_agrupa 1][1]/AGRUPA2/text()} } } return $res/root How could I get AGRUPA2 without reading again all the information from $coleccion_cod-agrupa_xi? {$coleccion_cod-agrupa_xi/BLOQUE_CODAGRUPA[AGRUPA1=$distinct_agrupa 1][1]/AGRUPA2/text()} Any ideas? Thank you -------------- next part -------------- An HTML attachment was scrubbed... URL: http://x-query.com/pipermail/talk/attachments/20100222/a4ce3ccb/attachment-0001.htm From dlee at calldei.com Mon Feb 22 09:54:14 2010 From: dlee at calldei.com (David Lee) Date: Mon Feb 22 06:50:53 2010 Subject: [xquery-talk] xQuery to generate multiple xml outputs In-Reply-To: References: <1795835058552240706@unknownmsgid> Message-ID: Another option is to pre-parse the document, then pass it iteratively through to a query that produces one output each pass passing in parameters. This does require an environment where its efficient to reuse a parsed document. An example in xmlsh would be like this xread doc < file.xml xquery -q customers.xquery -v Category A < {$doc} > CategoryA.xml xquery -q customers.xquery -v Category B < {$doc} > CategoryB.xml Java or .NET native examples should be fairly easy as well. The key being the ability to prepares the document (if it is large) and reuse it across multiple calls to Xquery. And if your really fancy, pre-compile the xquery and reuse that. ---------------------------------------------------- David A. Lee dlee@calldei.com http://www.calldei.com http://www.xmlsh.org -------------------------------------------------- From: "Adam Retter" Sent: Monday, February 22, 2010 8:54 AM To: "Julio de la Vega" Cc: Subject: Re: [xquery-talk] xQuery to generate multiple xml outputs > Well using standard XQuery you could create one XML document as output > that contains the two documents within, and later split them out. > > Otherwise depending on which XQuery engine you are using you could > make use of platform provided XQuery extensions to write the documents > out as nessecary. Which processor are you using? > > On 22 February 2010 13:39, Julio de la Vega > wrote: >> Hi *, >> >> >> >> >> >> This is my first email, I am new ix xQuery so I would like to say ?hi and >> Thank you? to all the colleagues that are behind this email address: >> >> >> >> My first question is very simple: >> >> >> >> Imagine the next scenario: >> >> >> >> >> >> A >> >> XXXX >> >> >> >> >> >> A >> >> XXXX >> >> >> >> >> >> B >> >> YYYYY/Data> >> >> >> >> >> >> >> >> >> >> >> >> I need to create an xQuery that generates two different xml files. I am >> reading an xml file and depending of the value of one specific node >> (CATEGORY), I want to separate the information (CUSTOMERS) in multiple >> xml >> files. >> >> I need to generates the different outputs processing only one xQuery, I >> do >> not want to process several xQuerys because my input file is huge and >> performance is important. >> >> >> >> Is there any option? >> >> >> >> >> >> >> >> Thank you >> >> >> >> Julio >> >> >> >> >> >> >> >> _______________________________________________ >> talk@x-query.com >> http://x-query.com/mailman/listinfo/talk >> > > > > -- > Adam Retter > > skype :adam.retter > http://www.adamretter.org.uk > > _______________________________________________ > talk@x-query.com > http://x-query.com/mailman/listinfo/talk > From mike at saxonica.com Mon Feb 22 15:00:57 2010 From: mike at saxonica.com (Michael Kay) Date: Mon Feb 22 06:56:55 2010 Subject: [xquery-talk] [XQuery Update Newbie] Rename all element nodes(in no namespace) to the same name, but in a namespace? In-Reply-To: <9E51F88D5247B648908850C35A3BBB500434FDFF40@IMCMBX3.MITRE.ORG> References: <9E51F88D5247B648908850C35A3BBB500434FDFF1C@IMCMBX3.MITRE.ORG>, <9E51F88D5247B648908850C35A3BBB500434FDFF1F@IMCMBX3.MITRE.ORG>, <232006DB-2359-4033-AC69-8BCA517DC19F@inf.ethz.ch> <9E51F88D5247B648908850C35A3BBB500434FDFF20@IMCMBX3.MITRE.ORG>, <613C7AD1200842B595B62453814A8C7F@Sealion> <9E51F88D5247B648908850C35A3BBB500434FDFF40@IMCMBX3.MITRE.ORG> Message-ID: <344AE278AD6A4C1DAE9ED4043F098E3C@Sealion> Thanks, now fixed, see https://sourceforge.net/tracker/?func=detail&aid=2956607&group_id=29872&atid =397617 Regards, Michael Kay http://www.saxonica.com/ http://twitter.com/michaelhkay > -----Original Message----- > From: Costello, Roger L. [mailto:costello@mitre.org] > Sent: 22 February 2010 12:33 > To: Michael Kay; talk@x-query.com > Subject: RE: [xquery-talk] [XQuery Update Newbie] Rename all > element nodes(in no namespace) to the same name, but in a namespace? > > Hi Michael, > > Here is the XQuery Update file I used: > --------------------------------------------------- > for $i in doc('FitnessCenter.xml')//* > return rename node $i as QName('http://www.gym.com', > concat('gym:', local-name($i))) > --------------------------------------------------- > > Here is FitnessCenter.xml: > --------------------------------------------------- > > > Jeff > lightgrey > > > David > lightblue > > > Roger > lightyellow > > > --------------------------------------------------- > > Here is the result: > --------------------------------------------------- > > > > xmlns:gym="http://www.gym.com" Level="platinum"> > > xmlns:gym="http://www.gym.com">Jeff > > xmlns:gym="http://www.gym.com">lightgrey > > > > xmlns:gym="http://www.gym.com" Level="gold"> > > xmlns:gym="http://www.gym.com">David > > xmlns:gym="http://www.gym.com">lightblue > > > > xmlns:gym="http://www.gym.com" Level="platinum"> > > xmlns:gym="http://www.gym.com">Roger > > xmlns:gym="http://www.gym.com">lightyellow > > > > --------------------------------------------------- > > I am using Saxon, version 9.2.0.6 > > Here's how I invoked Saxon: > --------------------------------------------------- > java -classpath %CLASSPATH% net.sf.saxon.Query -update:on > -tree:linked -backup:on FitnessCenter.xu > --------------------------------------------------- > > /Roger > > > ________________________________________ > From: Michael Kay [mike@saxonica.com] > Sent: Monday, February 22, 2010 7:20 AM > To: Costello, Roger L.; talk@x-query.com > Subject: RE: [xquery-talk] [XQuery Update Newbie] Rename all > element nodes(in no namespace) to the same name, but in a namespace? > > Roger, I have managed to reproduce (and fix) the cases where > you were getting an error about a spurious namespace > conflict. But I haven't been able to reproduce the case where > you get duplicate namespace declarations in the output. > > Can you let me know exactly how you were running this to > obtain this output? > > Regards, > > Michael Kay > http://www.saxonica.com/ > http://twitter.com/michaelhkay > > > > > Ghislain Fourny wrote: > > > > > How about > > > for $i in doc('FitnessCenter.xml')//* > > > return rename node $i as QName('http://www.gym.com', > > > concat('gym:', local-name($i))) > > > > I tried that. This time I didn't get an error message from Saxon. > > However, the output is not right. On all elements, except the root > > element, there are two (repeat) namespace > > declarations: > > > > > > > xmlns:gym="http://www.gym.com" level="platinum"> > > > xmlns:gym="http://www.gym.com">Jeff > > > xmlns:gym="http://www.gym.com">lightgrey > > > > > xmlns:gym="http://www.gym.com" level="gold"> > > > xmlns:gym="http://www.gym.com">David > > > xmlns:gym="http://www.gym.com">lightblue > > > > > xmlns:gym="http://www.gym.com" level="platinum"> > > > xmlns:gym="http://www.gym.com">Roger > > > xmlns:gym="http://www.gym.com">lightyellow > > > > > >= From jonathan.robie at redhat.com Mon Feb 22 10:12:45 2010 From: jonathan.robie at redhat.com (Jonathan Robie) Date: Mon Feb 22 07:06:59 2010 Subject: [xquery-talk] Perfomance Problem In-Reply-To: <001401cab3cd$9049e570$b0ddb050$@vega@helpprintsolutions.com> References: <001401cab3cd$9049e570$b0ddb050$@vega@helpprintsolutions.com> Message-ID: <4B829EED.3010901@redhat.com> On 02/22/2010 09:44 AM, Julio de la Vega wrote: > How could I get AGRUPA2 without reading again all the information from > *$coleccion_cod-agrupa_xi?* > > *{$coleccion_cod-agrupa_xi/BLOQUE_CODAGRUPA[AGRUPA1=$distinct_agrupa1][1]/AGRUPA2/text()} > * > Most implementations of XQuery optimize - what implementation are you using? Is the data in a database or in files? Jonathan -------------- next part -------------- An HTML attachment was scrubbed... URL: http://x-query.com/pipermail/talk/attachments/20100222/870fdc47/attachment.htm From mike at saxonica.com Mon Feb 22 15:21:36 2010 From: mike at saxonica.com (Michael Kay) Date: Mon Feb 22 07:15:27 2010 Subject: [xquery-talk] xQuery to generate multiple xml outputs In-Reply-To: <000001cab3c4$7d0df8b0$7729ea10$@vega@helpprintsolutions.com> References: <000001cab3c4$7d0df8b0$7729ea10$@vega@helpprintsolutions.com> Message-ID: XQuery allows you to return a sequence of document nodes to the calling application, and the calling application can then write them back to disk. This isn't an ideal solution because you can't associate names or URIs with the returned documents. Frankly, this is something that XSLT 2.0 does better. Regards, Michael Kay http://www.saxonica.com/ http://twitter.com/michaelhkay _____ From: talk-bounces@x-query.com [mailto:talk-bounces@x-query.com] On Behalf Of Julio de la Vega Sent: 22 February 2010 13:40 To: talk@x-query.com Subject: [xquery-talk] xQuery to generate multiple xml outputs Hi *, This is my first email, I am new ix xQuery so I would like to say "hi and Thank you" to all the colleagues that are behind this email address: My first question is very simple: Imagine the next scenario: A XXXX A XXXX B YYYYY/Data> I need to create an xQuery that generates two different xml files. I am reading an xml file and depending of the value of one specific node (CATEGORY), I want to separate the information (CUSTOMERS) in multiple xml files. I need to generates the different outputs processing only one xQuery, I do not want to process several xQuerys because my input file is huge and performance is important. Is there any option? Thank you Julio -------------- next part -------------- An HTML attachment was scrubbed... URL: http://x-query.com/pipermail/talk/attachments/20100222/83027d04/attachment.htm From mike at saxonica.com Mon Feb 22 15:26:34 2010 From: mike at saxonica.com (Michael Kay) Date: Mon Feb 22 07:19:54 2010 Subject: [xquery-talk] Perfomance Problem In-Reply-To: <001401cab3cd$9049e570$b0ddb050$@vega@helpprintsolutions.com> References: <001401cab3cd$9049e570$b0ddb050$@vega@helpprintsolutions.com> Message-ID: <340EC478D0A7475AA8132FEEB494BF47@Sealion> Performance always depends on the processor you are using. This query will be inefficient using a processor (such as Saxon-HE) that does serial search to implement $coleccion_cod-agrupa_xi/BLOQUE_CODAGRUPA[AGRUPA1=$distinct_agrupa1 and it will be much more efficient on one (such as Saxon-EE) that optimizes this expression using indexing or hash tables. As an alternative to finding a processor with a suitable optimizer, you could look for one that implements the XQuery 1.1 "group by" construct, or an equivalent vendor extension. (Again, Saxon-EE fits the bill). Or you could use XSLT 2.0, which has the convenient construct as standard. Regards, Michael Kay http://www.saxonica.com/ http://twitter.com/michaelhkay _____ From: talk-bounces@x-query.com [mailto:talk-bounces@x-query.com] On Behalf Of Julio de la Vega Sent: 22 February 2010 14:45 To: talk@x-query.com Subject: [xquery-talk] Perfomance Problem Hi *, I have problems with performance in the next xQuery let $doc := doc("/Lib/doc) let $res := document { { let $coleccion_cod-agrupa_xi := document { for $XI in $doc/root/XI return ( {concat($XI/R00000/COD-ENT-GR, $XI/R00000/N-INT-PERS, $XI/R00000/N-ITN-DIRE )} {concat($XI/R00000/COD-ENT-GR, $XI/R00000/N-ITN-DIRE, "-2" )} {concat($XI/R00000/COD-ENT-GR, $XI/R00000/N-ITN-DIRE, "-3" )} ) } return for $distinct_agrupa1 in distinct-values($coleccion_cod-agrupa_xi/BLOQUE_CODAGRUPA/AGRUPA1) return {$distinct_agrupa1} {$coleccion_cod-agrupa_xi/BLOQUE_CODAGRUPA[AGRUPA1=$distinct_agrupa 1][1]/AGRUPA2/text()} } } return $res/root How could I get AGRUPA2 without reading again all the information from $coleccion_cod-agrupa_xi? {$coleccion_cod-agrupa_xi/BLOQUE_CODAGRUPA[AGRUPA1=$distinct_agrupa 1][1]/AGRUPA2/text()} Any ideas? Thank you -------------- next part -------------- An HTML attachment was scrubbed... URL: http://x-query.com/pipermail/talk/attachments/20100222/69df87bb/attachment-0001.htm From jonathan.robie at redhat.com Mon Feb 22 11:15:00 2010 From: jonathan.robie at redhat.com (Jonathan Robie) Date: Mon Feb 22 08:03:02 2010 Subject: [xquery-talk] xQuery to generate multiple xml outputs In-Reply-To: References: <000001cab3c4$7d0df8b0$7729ea10$@vega@helpprintsolutions.com> Message-ID: <4B82AD84.2040402@redhat.com> On 02/22/2010 10:21 AM, Michael Kay wrote: > XQuery allows you to return a sequence of document nodes to the > calling application, and the calling application can then write them > back to disk. This isn't an ideal solution because you can't associate > names or URIs with the returned documents. Frankly, this is something > that XSLT 2.0 does better. But fn:put() does this, if his implementation supports updates. Of course, fn:put() does not allow you to specify serialization options separately for each file - if that's needed, then XSLT 2.0 is definitely a better solution. Jonathan -------------- next part -------------- An HTML attachment was scrubbed... URL: http://x-query.com/pipermail/talk/attachments/20100222/580351ae/attachment.htm From Leigh.Klotz at xerox.com Mon Feb 22 16:44:28 2010 From: Leigh.Klotz at xerox.com (Klotz, Leigh) Date: Mon Feb 22 15:37:23 2010 Subject: [xquery-talk] Emacs flymake syntax checking for XQL Message-ID: I've whipped up an Emacs flymake integration for XQL. It gives on-the-fly syntax checking with highlighted errors and mouseover explanations of error messages. It works well with Suraj Acharya's xquery-mode for Emacs. There are two parts: - a small Java command-line program which invokes the Saxon9 XQuery compiler and prints out errors and warnings - a few lines of Emacs Lisp to glue it in to flymake The command-line program uses Saxon9, but it could probably also be made to work with xqsharp with --static --explain as well. It would be nice if vendors (Saxon, XQSharp?) would take the code as an example and write their own command-line options for easy syntax checking. (For an example of this approach, see the "-emacs" flag in Ant, which formats one-per-line error messages easily parsed by Emacs users.) Save this as XQLSyntaxCheck.java in a directory you will use permanently: http://pastie.org/837838 Save this as xquery-flymake.el in your emacs directory. http://pastie.org/837869 Save the Emacs XQuery mode by Suraj Acharya file to your emacs directory. http://www.emacswiki.org/cgi-bin/wiki/xquery-mode.el To use, 1. Save the files as described above 2. Compile XQLSyntaxCheck.java. 3. Edit the xquery-flymake.el file to point to your Saxon9 installation and your XQLSyntaxCheck directory. 4. Compile xquery-flymake.el and xquery-mode.el (See note, below.) 5. Put these lines in your .emacs file: (require 'xquery-mode) (require 'flymake-xquery) Note: I found that in order to get xquery-mode automatically set for .xql files I needed to edit xquery-mode.el line 62 and change apostrope to "l". Otherwise, these features didn't take effect until I explicitly typed m-x xquery-mode. Leigh. From mike at saxonica.com Tue Feb 23 08:33:56 2010 From: mike at saxonica.com (Michael Kay) Date: Mon Feb 22 23:11:18 2010 Subject: [xquery-talk] Emacs flymake syntax checking for XQL In-Reply-To: References: Message-ID: <1248A91108D54009AF5FCC796F4AF297@Sealion> > > I've whipped up an Emacs flymake integration for XQL. I assume you mean for XQuery? XQL was a different query language entirely, one of the inputs to the design of XQuery. Regards, Michael Kay http://www.saxonica.com/ http://twitter.com/michaelhkay From Leigh.Klotz at xerox.com Tue Feb 23 08:27:57 2010 From: Leigh.Klotz at xerox.com (Klotz, Leigh) Date: Tue Feb 23 08:23:20 2010 Subject: [xquery-talk] Emacs flymake syntax checking for XQL In-Reply-To: <1248A91108D54009AF5FCC796F4AF297@Sealion> References: <1248A91108D54009AF5FCC796F4AF297@Sealion> Message-ID: Thanks for pointing out the error in my ways. I've updated the two pastie.org snippets http://pastie.org/837869 and http://pastie.org/837838 to use XQuery instead of XQL. Leigh. -----Original Message----- From: Michael Kay [mailto:mike@saxonica.com] Sent: Tuesday, February 23, 2010 12:34 AM To: Klotz, Leigh; talk@x-query.com Cc: sacharya@cs.indiana.edu Subject: RE: [xquery-talk] Emacs flymake syntax checking for XQL > > I've whipped up an Emacs flymake integration for XQL. I assume you mean for XQuery? XQL was a different query language entirely, one of the inputs to the design of XQuery. Regards, Michael Kay http://www.saxonica.com/ http://twitter.com/michaelhkay From j.vega at helpprintsolutions.com Wed Feb 24 11:29:15 2010 From: j.vega at helpprintsolutions.com (Julio de la Vega) Date: Wed Feb 24 01:58:48 2010 Subject: [xquery-talk] Perfomance Problem In-Reply-To: <4B829EED.3010901@redhat.com> References: <001401cab3cd$9049e570$b0ddb050$@vega@helpprintsolutions.com> <4B829EED.3010901@redhat.com> Message-ID: <003801cab53c$372187d0$a5649770$@vega@helpprintsolutions.com> Hi Jonathan, Data is in a database and I know I can use indexes Regards Julio De: talk-bounces@x-query.com [mailto:talk-bounces@x-query.com] En nombre de Jonathan Robie Enviado el: lunes, 22 de febrero de 2010 16:13 Para: talk@x-query.com Asunto: Re: [xquery-talk] Perfomance Problem On 02/22/2010 09:44 AM, Julio de la Vega wrote: How could I get AGRUPA2 without reading again all the information from $coleccion_cod-agrupa_xi? {$coleccion_cod-agrupa_xi/BLOQUE_CODAGRUPA[AGRUPA1=$distinct_agrupa 1][1]/AGRUPA2/text()} Most implementations of XQuery optimize - what implementation are you using? Is the data in a database or in files? Jonathan -------------- next part -------------- An HTML attachment was scrubbed... URL: http://x-query.com/pipermail/talk/attachments/20100224/ca915b55/attachment.htm From kenneth.dougherty at sdigovsolutions.com Wed Feb 24 14:52:20 2010 From: kenneth.dougherty at sdigovsolutions.com (Kenneth Dougherty) Date: Wed Feb 24 11:48:47 2010 Subject: [xquery-talk] Problem with regular expression with Xquery Message-ID: <0D13742471F0443889719E25AD7F1BA0@sdigovsolutions.com> Hello, The following problem has me stumped, and I would be grateful for any help. I am using a regular expression to test if a document number is correct. The number can end with either 'P,' '&P,' or it may not have an ending value outside of the regular number. For example, if a valid document number was 503-302, it could be 503-302P, 503-302&P, or just 503-302. The incorrect regular expression so far is: [0-9]{3}\-[0-9]{3}&P|P. This expression correctly finds 503-302P and 503-302&P, but of course fails to find 503-302. I've tried putting in other 'or' conditions at the end [e.g., |\s], but nothing has worked out. Thank you again for your time and help. Sincerely, Kenneth Dougherty -------------- next part -------------- An HTML attachment was scrubbed... URL: http://x-query.com/pipermail/talk/attachments/20100224/b2aa4c92/attachment.htm From dlee at calldei.com Wed Feb 24 15:02:30 2010 From: dlee at calldei.com (David Lee) Date: Wed Feb 24 11:57:49 2010 Subject: [xquery-talk] Problem with regular expression with Xquery In-Reply-To: <0D13742471F0443889719E25AD7F1BA0@sdigovsolutions.com> References: <0D13742471F0443889719E25AD7F1BA0@sdigovsolutions.com> Message-ID: Try [0-9]{3}\-[0-9]{3}(&P|P)? ---------------------------------------------------- David A. Lee dlee@calldei.com http://www.calldei.com http://www.xmlsh.org From: Kenneth Dougherty Sent: Wednesday, February 24, 2010 2:52 PM To: talk@x-query.com Subject: [xquery-talk] Problem with regular expression with Xquery Hello, The following problem has me stumped, and I would be grateful for any help. I am using a regular expression to test if a document number is correct. The number can end with either 'P,' '&P,' or it may not have an ending value outside of the regular number. For example, if a valid document number was 503-302, it could be 503-302P, 503-302&P, or just 503-302. The incorrect regular expression so far is: [0-9]{3}\-[0-9]{3}&P|P. This expression correctly finds 503-302P and 503-302&P, but of course fails to find 503-302. I've tried putting in other 'or' conditions at the end [e.g., |\s], but nothing has worked out. Thank you again for your time and help. Sincerely, Kenneth Dougherty -------------------------------------------------------------------------------- _______________________________________________ talk@x-query.com http://x-query.com/mailman/listinfo/talk -------------- next part -------------- An HTML attachment was scrubbed... URL: http://x-query.com/pipermail/talk/attachments/20100224/85cc379b/attachment.htm From John.newman at viaoncology.com Wed Feb 24 15:03:10 2010 From: John.newman at viaoncology.com (Newman, John W) Date: Wed Feb 24 11:58:24 2010 Subject: [xquery-talk] Problem with regular expression with Xquery In-Reply-To: <0D13742471F0443889719E25AD7F1BA0@sdigovsolutions.com> References: <0D13742471F0443889719E25AD7F1BA0@sdigovsolutions.com> Message-ID: Try putting parentheses around the last part and add a ? [0-9]{3}\-[0-9]{3}(&P|P)? ? means 0 or 1 occurrence From: talk-bounces@x-query.com [mailto:talk-bounces@x-query.com] On Behalf Of Kenneth Dougherty Sent: Wednesday, February 24, 2010 2:52 PM To: talk@x-query.com Subject: [xquery-talk] Problem with regular expression with Xquery Hello, The following problem has me stumped, and I would be grateful for any help. I am using a regular expression to test if a document number is correct. The number can end with either 'P,' '&P,' or it may not have an ending value outside of the regular number. For example, if a valid document number was 503-302, it could be 503-302P, 503-302&P, or just 503-302. The incorrect regular expression so far is: [0-9]{3}\-[0-9]{3}&P|P. This expression correctly finds 503-302P and 503-302&P, but of course fails to find 503-302. I've tried putting in other 'or' conditions at the end [e.g., |\s], but nothing has worked out. Thank you again for your time and help. Sincerely, Kenneth Dougherty -------------- next part -------------- An HTML attachment was scrubbed... URL: http://x-query.com/pipermail/talk/attachments/20100224/5d0affed/attachment-0001.htm From davidc at nag.co.uk Wed Feb 24 20:10:43 2010 From: davidc at nag.co.uk (David Carlisle) Date: Wed Feb 24 12:05:35 2010 Subject: [xquery-talk] Problem with regular expression with Xquery In-Reply-To: <0D13742471F0443889719E25AD7F1BA0@sdigovsolutions.com> References: <0D13742471F0443889719E25AD7F1BA0@sdigovsolutions.com> Message-ID: <4B8587C3.406@nag.co.uk> On 24/02/2010 19:52, Kenneth Dougherty wrote: > Hello, > > The following problem has me stumped, and I would be grateful for any help. > > I am using a regular expression to test if a document number is correct. > The number can end with either ?P,? ?&P,? or it may not have an ending > value outside of the regular number. > > For example, if a valid document number was 503-302, it could be > 503-302P, 503-302&P, or just 503-302. > > The incorrect regular expression so far is: [0-9]{3}\-[0-9]{3}&P|P. [0-9]{3}\-[0-9]{3}(&?P)? David From jim.melton at acm.org Fri Feb 26 17:44:52 2010 From: jim.melton at acm.org (Jim Melton) Date: Fri Feb 26 16:29:46 2010 Subject: [xquery-talk] XQuery Update Facility test reports urgently needed: XQueryX and Static Typing Message-ID: <7.0.1.0.2.20100226160318.05ee6490@oracle.com> XQuery Update Facility implementors, The XQuery Update Facility version 1.0 test suite [1] is complete and the XML Query Working Group is awaiting test results from implementations of the specification [2]. We currently have adequate implementation test results to progress the specification from Candidate Recommendation to Proposed Recommendation (the penultimate stage of processing in the W3C, followed only by Recommendation). However, we do not yet have any test results from implementations that support the XML syntax for XQuery (XQueryX) or from implementations that support the Static Typing feature [4]. Both of these features have been marked At Risk [5]. A feature that has been marked At Risk may be deleted from the specification upon its publication as a Proposed Recommendation if insufficient implementation experience of the feature has been reported. The XML Query WG has determined that it will continue to solicit implementation reports through 2010-03-31 (31 March 2010) from implementations that support the XQueryX feature and/or the Static Typing feature. After that date, the WG will make a determination whether to publish a Proposed Recommendation without one or both of the features. If either of these features are important to you, your implementation, and/or your customer base, please consider submitting an implementation report (test suite results) showing the results of evaluating those features in the test suite. If you are able to generate test suite results for those features, but are unable or unwilling to submit your test results publicly (e.g., because of a corporate policy), you can submit them anonymously. If you wish to submit such results anonymously, please send them to the W3C Staff Contact for the XML Query WG, Liam Quin, at liam@w3.org. Liam will strip from the submitted results all information that can identify your organization and your implementation before incorporating them into the collected test suite results. We await your implementation reports! Thanks, Jim XML Query WG Chair [1] http://dev.w3.org/2007/xquery-update-10-test-suite/ [2] http://www.w3.org/TR/xquery-update-10/ [3] http://www.w3.org/TR/xquery-update-10/#id-xqueryx-update-conformance [4] http://www.w3.org/TR/xquery-update-10/#id-update-static [5] http://www.w3.org/TR/xquery-update-10/#status ======================================================================== Jim Melton --- Editor of ISO/IEC 9075-* (SQL) Phone: +1.801.942.0144 Chair, W3C XML Query WG; XQX (etc.) editor Fax : +1.801.942.3345 Oracle Corporation Oracle Email: jim dot melton at oracle dot com 1930 Viscounti Drive Standards email: jim dot melton at acm dot org Sandy, UT 84093-1063 USA Personal email: jim at melton dot name ======================================================================== = Facts are facts. But any opinions expressed are the opinions = = only of myself and may or may not reflect the opinions of anybody = = else with whom I may or may not have discussed the issues at hand. = ========================================================================