From hrennau at yahoo.de Mon Feb 2 06:48:03 2009 From: hrennau at yahoo.de (Hans-Juergen Rennau) Date: Sun Feb 1 22:47:39 2009 Subject: [xquery-talk] Re: XQuery - Grammar? Implementations? Message-ID: <118550.52111.qm@web27104.mail.ukl.yahoo.com> You wrote: "Unfortunately, for reasons that I think are completely misguided, the rules for assigning to variables are different from the rules for supplying values to function parameters, and do not allow implicit atomization or conversion from untypedAtomic to string." I am not sure your criticism is justified in its harshness. At least if it is the case, as I believe, that implicit conversions may indeed interfere with optimization. (If this is not the case, please let me know, and ignore the rest of this mail.) At any rate, I would like to emphasize the huge difference of relevance which implicit conversion has for function calls on the one hand, and variable assignments on the other hand. The function conversion rules are so important for conciseness because a given function may be called from any number of places in the query and from any depth within an expression - without implicit conversion one might easily get trapped in a hideous web of brackets, hard to write, even harder to read. So nobody right in his mind would want to do without the function conversion rules. Declarations, on the other hand, offer a different situation, because they are not "called": only one explicit conversion per declaration may become necessary, and the expression to be converted is a top level expression, which can be comfortably wrapped in the appropriate conversion call. Therefore, the decision against implicit conversion is certainly controversial, but not as arbitrary as it may seem. With kind regards - Hans-J?rgen Rennau From mike at saxonica.com Mon Feb 2 09:29:34 2009 From: mike at saxonica.com (Michael Kay) Date: Mon Feb 2 01:29:14 2009 Subject: [xquery-talk] RE: XQuery - Grammar? Implementations? In-Reply-To: <118550.52111.qm@web27104.mail.ukl.yahoo.com> References: <118550.52111.qm@web27104.mail.ukl.yahoo.com> Message-ID: > I am not sure your criticism is justified in its harshness. > At least if it is the case, as I believe, that implicit > conversions may indeed interfere with optimization. Well, for starters, I think that usability is a much more important goal in language design than optimizability. And I don't think they are in contradiction. Usability demands consistency and orthogonality, and these are the very features of a language which help to make it optimizable. > > Declarations, on the other hand, offer a different situation, > because they are not "called": only one explicit conversion > per declaration may become necessary, and the expression to > be converted is a top level expression, which can be > comfortably wrapped in the appropriate conversion call. It can be done just as comfortably by the compiler as by the user. I don't see why making the user do atomization "by hand", rather than having the compiler do it on the user's behalf, makes for a better language; and I don't see why variable declarations should be treated differently from any other context where there is a supplied expression and a required type. It's interesting to note that Java allows *more* implicit conversions in a variable declaration than in a function call. Michael Kay http://www.saxonica.com/ From announce at altova.com Wed Feb 4 11:32:09 2009 From: announce at altova.com (ANNOUNCE) Date: Wed Feb 4 08:32:54 2009 Subject: [xquery-talk] ANN: Altova MissionKit 2009 release Message-ID: <015B8F921A8AEE498CAAD1B83BD8EE2406029C1F@bospexc01.bos.altova.com> [ANN:] Altova(r) is pleased to announce general availability Version 2009 of its MissionKit XML, database, and UML tools. Just a few of the many new features include: * Comprehensive XBRL support: editing, validating, transforming & rendering * Support for transforming HL7 to/from XML, DBs, Excel 2007 & more * Native support for SQL Server 2008, Oracle 11g, PostgreSQL 8 * Database comparison / merging * UML sequence diagram generation * And much more More info and screenshots are available at http://www.altova.com/whatsnew.html. Download a free trial at http://www.altova.com/download.html . This e-mail and any attachments are intended only for the person/entity to which they are addressed and may contain confidential and/or privileged material. If you received this in error, please notify the sender and delete the message. From ricardo.queiros at gmail.com Fri Feb 6 11:32:58 2009 From: ricardo.queiros at gmail.com (ricardo queiros) Date: Fri Feb 6 03:32:52 2009 Subject: [xquery-talk] Get collection context in XQuery Message-ID: <6cec8a990902060332w5e07c684j5fe48a74f60e2ac5@mail.gmail.com> Hi, I'm a newbie in XQuery and i appreciate a answer to this doubt. I store several XML documents in a Native XML Database (eXist). In my organisation i have several collections with several XML files that share the same structure. The following structure defines 2 collections A and B. The collection A have 2 XML files and the collection B one. A - 1.xml - 2.xml B - 3.xml I have his XQuery file: FOR $x in collection("A","B") WHERE ... RETURN ? If, for example, only the 2.xml and 3.xml were evaluate for TRUE in the WHERE clause, i want to obtain the following XML data: 2.xml 3.xml What should i put in the RETURN clause? I can also have collections inside other collections... Thanks in advance -- Ricardo Queir?s -------------- next part -------------- An HTML attachment was scrubbed... URL: http://x-query.com/pipermail/talk/attachments/20090206/6b5abbf6/attachment.htm From mike at saxonica.com Fri Feb 6 11:49:33 2009 From: mike at saxonica.com (Michael Kay) Date: Fri Feb 6 03:49:27 2009 Subject: [xquery-talk] Get collection context in XQuery In-Reply-To: <6cec8a990902060332w5e07c684j5fe48a74f60e2ac5@mail.gmail.com> References: <6cec8a990902060332w5e07c684j5fe48a74f60e2ac5@mail.gmail.com> Message-ID: <2EA979067BB24527BF5FA6E69CE389B6@Sealion> The meaning of a collection URI varies from one implementation to another, but you are only allowed one collection URI as the argument. I think you want for $uri in ("A", "B") for $doc in collection($uri) where .... return document-uri($doc) Michael Kay http://www.saxonica.com/ _____ From: talk-bounces@x-query.com [mailto:talk-bounces@x-query.com] On Behalf Of ricardo queiros Sent: 06 February 2009 11:33 To: talk@x-query.com Subject: [xquery-talk] Get collection context in XQuery Hi, I'm a newbie in XQuery and i appreciate a answer to this doubt. I store several XML documents in a Native XML Database (eXist). In my organisation i have several collections with several XML files that share the same structure. The following structure defines 2 collections A and B. The collection A have 2 XML files and the collection B one. A - 1.xml - 2.xml B - 3.xml I have his XQuery file: FOR $x in collection("A","B") WHERE ... RETURN ? If, for example, only the 2.xml and 3.xml were evaluate for TRUE in the WHERE clause, i want to obtain the following XML data: 2.xml 3.xml What should i put in the RETURN clause? I can also have collections inside other collections... Thanks in advance -- Ricardo Queir?s -------------- next part -------------- An HTML attachment was scrubbed... URL: http://x-query.com/pipermail/talk/attachments/20090206/721154e1/attachment.htm From wolfgang at exist-db.org Fri Feb 6 12:53:27 2009 From: wolfgang at exist-db.org (Wolfgang) Date: Fri Feb 6 03:56:01 2009 Subject: [xquery-talk] Get collection context in XQuery In-Reply-To: <6cec8a990902060332w5e07c684j5fe48a74f60e2ac5@mail.gmail.com> References: <6cec8a990902060332w5e07c684j5fe48a74f60e2ac5@mail.gmail.com> Message-ID: <498C24B7.5020507@exist-db.org> > I have his XQuery file: > > FOR $x in collection("A","B") > WHERE ... > RETURN ? > > If, for example, only the 2.xml and 3.xml were evaluate for TRUE in the > WHERE clause, i want to obtain the following XML data: > > > 2.xml > 3.xml > > > What should i put in the RETURN clause? Function document-uri returns the URI of the document, which - for eXist - is the same as the collection path. Using standard xquery functions, you could extract the collection and document name as follows: for $m in (collection('/db/A'), collection('/db/B'))/* let $col := replace(document-uri(root($m)), '^.*/(.*)/[^/]+$', '$1') let $doc := replace(document-uri(root($m)), '^.*/([^/]+$)', '$1') return element { $col } { $doc } Note that fn:collection does only allow one parameter (though older versions of eXist accepted more for historical reasons). Wolfgang From ricardo.queiros at gmail.com Fri Feb 6 12:07:33 2009 From: ricardo.queiros at gmail.com (ricardo queiros) Date: Fri Feb 6 04:07:24 2009 Subject: [xquery-talk] Get collection context in XQuery In-Reply-To: <498C24B7.5020507@exist-db.org> References: <6cec8a990902060332w5e07c684j5fe48a74f60e2ac5@mail.gmail.com> <498C24B7.5020507@exist-db.org> Message-ID: <6cec8a990902060407x2a3dd7adi8e6fa8e85a074c26@mail.gmail.com> Thanks to both.But to preserve hierarchy and extended my previous example: A - 1.xml - 2.xml B - 3.xml C - 4.xml If my WHERE clause is evaluated to TRUE in documents 2.xml, 3.xml and 4.xml. I would like to have the following result 2.xml 3.xml4.xml or a id/idref approach: 2.xml 3.xml 4.xml Thanks!! 2009/2/6 Wolfgang > I have his XQuery file: >> >> FOR $x in collection("A","B") >> WHERE ... >> RETURN ? >> >> If, for example, only the 2.xml and 3.xml were evaluate for TRUE in the >> WHERE clause, i want to obtain the following XML data: >> >> >> 2.xml >> 3.xml >> >> >> What should i put in the RETURN clause? >> > > Function document-uri returns the URI of the document, which - for eXist - > is the same as the collection path. Using standard xquery functions, you > could extract the collection and document name as follows: > > for $m in (collection('/db/A'), collection('/db/B'))/* > let $col := replace(document-uri(root($m)), '^.*/(.*)/[^/]+$', '$1') > let $doc := replace(document-uri(root($m)), '^.*/([^/]+$)', '$1') > return > element { $col } { $doc } > > Note that fn:collection does only allow one parameter (though older > versions of eXist accepted more for historical reasons). > > Wolfgang > -- Ricardo Queir?s -------------- next part -------------- An HTML attachment was scrubbed... URL: http://x-query.com/pipermail/talk/attachments/20090206/37d133df/attachment.htm From gfourny at inf.ethz.ch Fri Feb 6 21:35:50 2009 From: gfourny at inf.ethz.ch (Ghislain Fourny) Date: Fri Feb 6 12:36:20 2009 Subject: [xquery-talk] XQuery and Item Orientation In-Reply-To: <217870.88176.qm@web27105.mail.ukl.yahoo.com> References: <200901241940.n0OJdxPE028841@jhunter.x-query.com> <217870.88176.qm@web27105.mail.ukl.yahoo.com> Message-ID: Hello Hans-Juergen, Yes, I agree with you, this is a drawback. For users writing complex queries, it is not necessarily clear what the context item is, so that with our notation (the same for function calls and method/item- function calls) a user might perform a method/item-function call without being aware of it. I like your idea of making item-function calls explicit with another notation, which solves this problem. In addition, XQuery does make a difference between variables (with a $) and access to children of the context item (without a $), so it makes sense to also make a difference between functions and methods/item- functions, it would be a nice symmetry. Kind regards, Ghislain Fourny Am 30.01.2009 um 08:16 schrieb Hans-Juergen Rennau: > > The predictability would of course be the same as with XML Schema - > total. But perhaps I should point out one difference between your > approach and mine (if I understood you correctly): you chose to make > any function call potentially an item function call, with the > current context item providing the "candidate item". You wrote: > $triangle/rotate() > whereas I prefer to make item calls explicit: > $triangle/.->rotate() > > This does play a role in terms of lucidity, dont't you think? > From xfranc at online.fr Fri Feb 13 16:02:28 2009 From: xfranc at online.fr (Xavier Franc) Date: Fri Feb 13 08:10:44 2009 Subject: [xquery-talk] Re: Get collection context in XQuery References: <6cec8a990902060332w5e07c684j5fe48a74f60e2ac5@mail.gmail.com> <498C24B7.5020507@exist-db.org> <6cec8a990902060407x2a3dd7adi8e6fa8e85a074c26@mail.gmail.com> Message-ID: Ricardo, there is no notion of "document hierarchy" in XQuery, a collection is simply a sequence of (document) nodes. Therefore what you want to do is necessarily product-specific. In Qizx, this is quite achievable using extension functions. Xavier Franc http://www.qizx.com/ From ricardo.queiros at gmail.com Fri Feb 13 16:24:45 2009 From: ricardo.queiros at gmail.com (ricardo queiros) Date: Fri Feb 13 08:25:24 2009 Subject: [xquery-talk] Re: Get collection context in XQuery In-Reply-To: References: <6cec8a990902060332w5e07c684j5fe48a74f60e2ac5@mail.gmail.com> <498C24B7.5020507@exist-db.org> <6cec8a990902060407x2a3dd7adi8e6fa8e85a074c26@mail.gmail.com> Message-ID: <6cec8a990902130824p49a84194wcf41597caa23d164@mail.gmail.com> Thanks to all! 2009/2/13 Xavier Franc > Ricardo, > there is no notion of "document hierarchy" in XQuery, > a collection is simply a sequence of (document) nodes. > > Therefore what you want to do is necessarily product-specific. > > In Qizx, this is quite achievable using extension functions. > > Xavier Franc > http://www.qizx.com/ > > > _______________________________________________ > 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/20090213/e4eb185b/attachment.htm From hrennau at yahoo.de Sun Feb 15 05:30:55 2009 From: hrennau at yahoo.de (Hans-Juergen Rennau) Date: Sat Feb 14 21:31:23 2009 Subject: [xquery-talk] Xanadu Message-ID: <701549.52039.qm@web27106.mail.ukl.yahoo.com> Hello Ghislain, your wrote: "The question here seems to be: can XQuery do more, e.g., do what Java/C++ do -- without reducing performance on pure XML processing -- and would this be desirable at all?" In response to your words I had a daydream, but before telling it I would like to remind you of the poet S T Coleridge who once in a dream saw a poem ("In Xanadu did Kubla Khan / a pleasure dome decree ..."), vivid and beautiful, who after waking up started to write it down, was disturbed by a visitor and afterwards, alas, could not any more reconstruct anything. I dreamed that the time we presently call the present time is deeply steeped in anachronism. The OO- and the X - way of thought exist in serene oblivion of each other. One day people will remember with amusement and compassion that once there was a time when it was not evident that objects may extend, besides their behavioral interfaces, informational interfaces, each one having a name and as content an element information item constrained by a schema type. But that, so they will remember, was only the edge of darkness, concerning a single object's interface. Even worse, perhaps, was the darkness steeping the inter-object relationships. With unbelief they will remember that there was a time when objects could call each other only immediately, had to know each other personally, so to speak, in order to invoke each other's methods, when there was not yet a system tree looming in the background of any program execution which you can extend, rearrange and prune but never delete and never create, to which objects may be attached via dedicated attributes whose type is object sequence and whose default value is an empty sequence. Yes, there was no way to delegate a method call to the system tree, prefixing the method parameters with two further parameters, one being an XPath expression selecting the objects, the other one being an object type defending type safety and acting as a second filter superimposed on the filter implied by the XPath. The strangest thing of all, however, was that programmers, even brilliant ones, accepted that state of affairs calmly, without protest, just wrote their programs, some of which were pretty complex and some of which were pretty reliable. But I think I heard a bell, so I hurry to come to a close. Certainly there will be another mail giving all the details. Good bye, with kind regards - Hans-Juergen Rennau From dflorescu at mac.com Sun Feb 15 16:00:27 2009 From: dflorescu at mac.com (Daniela Florescu) Date: Sun Feb 15 16:01:14 2009 Subject: [xquery-talk] Xanadu In-Reply-To: <701549.52039.qm@web27106.mail.ukl.yahoo.com> References: <701549.52039.qm@web27106.mail.ukl.yahoo.com> Message-ID: <4EBAE702-49A5-4A39-AFBC-55EEBDF32D5D@mac.com> > The strangest thing of all, however, was that programmers, even > brilliant ones, accepted that state of affairs calmly, without > protest, just wrote their programs, some of which were pretty > complex and some of which were pretty reliable. Note to everybody that tries to improve programmer's productivity: yes, as strange as it might sound, programmers are in general happy with what they have, and they don't ask for something better. It will never fail to surprise me, but at least in my experience, this seems to be unfortunately true. XQuery is sometimes a striking example of this. Certain things can be done SO much better, faster and cheaper with XQuery, yet many people prefer to do with their good old ways (DOM, Javascript, SQLX, PhP, whatever) rather then reading this new, long spec. Best regards Dana From gkholman at CraneSoftwrights.com Mon Feb 16 09:06:30 2009 From: gkholman at CraneSoftwrights.com (G. Ken Holman) Date: Mon Feb 16 06:12:44 2009 Subject: [xquery-talk] [Announce] Expanded syllabus now includes XQuery in March European training at XML Prague Message-ID: <7.0.1.0.2.20090216082724.02661888@CraneSoftwrights.com> A quick note that the early-bird date that was today for registration for European XML training is moved back for two weeks for candidate students to consider our XQuery-expanded syllabus for hands-on publicly-subscribed training. A precursor to the XML Prague 2009 http://www.XMLPrague.cz conference is a 5-day hands-on class covering every element, every attribute, every function and every keyword of XQuery, XSLT and XPath ... students can choose to do the assigned exercises in either XQuery, XSLT or both: Prague, Czech Republic - March 16-20, 2009 Practical Transformation Using XSLT, XQuery and XPath (5 days): http://www.CraneSoftwrights.com/training/ptuxq/ptuxqsyl.htm Other classes are being offered the week before in Europe: Brussels Belgium - March 10, 2009 Practical Code List Implementation (1 day): http://www.CraneSoftwrights.com/training/pcli/pclisyl.htm Brussels Belgium - March 11, 2009 Practical Universal Business Language Deployment (1 day): http://www.CraneSoftwrights.com/training/publd/publdsyl.htm (includes a special presentation on the UBL-based project ePrior by Jo?o Rodrigues Frade, Principal Advisor, PricewaterhouseCoopers) Brussels Belgium - March 11/12, 2009 Practical Universal Business Language Deployment (2 day): http://www.CraneSoftwrights.com/training/publd/publdsyl.htm (includes UBL customization and the creation of customized schemas) Registration form and pricing: http://www.CraneSoftwrights.com/forms/register.php#form (in partnership with http://www.DocumentEngineeringServices.com - DES) Links to all details: http://www.CraneSoftwrights.com/#upcoming Please let me know off list if you have any questions. Thanks! . . . . . . . . Ken cc: XML Dev, XQuery-talk, XSL List -- Upcoming hands-on XQuery, XSLT, UBL & code list training classes: Brussels, BE 2009-03; Prague, CZ 2009-03, http://www.xmlprague.cz 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 Crane Softwrights Ltd. http://www.CraneSoftwrights.com/q/ Male Cancer Awareness Nov'07 http://www.CraneSoftwrights.com/q/bc Legal business disclaimers: http://www.CraneSoftwrights.com/legal From Diraviam.H at hcl.in Tue Feb 17 11:44:57 2009 From: Diraviam.H at hcl.in (Diraviam H) Date: Mon Feb 16 22:14:11 2009 Subject: [xquery-talk] How to add an optional attiribute to a constructed XML tag with XQuery ? Message-ID: I am creating an XML file say A, from another xml file B. The content of file B will be changing and some tags can have optional attributes. I want to include the attribute in the constructed XML file tag(s) through Xquery, only when it is available in source file B. I am trying something like this, where the attribute "name" is optional in source. let $x:= doc("source.xml") for $comp in $x/Unit/Data/Organization return DISCLAIMER: ----------------------------------------------------------------------------------------------------------------------- The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only. It shall not attach any liability on the originator or HCL or its affiliates. Any views or opinions presented in this email are solely those of the author and may not necessarily reflect the opinions of HCL or its affiliates. Any form of reproduction, dissemination, copying, disclosure, modification, distribution and / or publication of this message without the prior written consent of the author of this e-mail is strictly prohibited. If you have received this email in error please delete it and notify the sender immediately. Before opening any mail and attachments please check them for viruses and defect. ----------------------------------------------------------------------------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: http://x-query.com/pipermail/talk/attachments/20090217/742f674e/attachment.htm From Geert.Josten at daidalos.nl Tue Feb 17 07:34:02 2009 From: Geert.Josten at daidalos.nl (Geert Josten) Date: Mon Feb 16 22:33:19 2009 Subject: [xquery-talk] How to add an optional attiribute to a constructed XML tag with XQuery ? In-Reply-To: Message-ID: <0260356C6DFE754BA6FA48E659A1433823EF016C37@Helios.olympus.borgus.nl> Hi, How about something like this: let $x:= doc("source.xml") for $comp in $x/Unit/Data/Organization return {$comp/@*} You can also name the attributes explicitly, wrap them in an if and a for loop if you like. But make sure to insert attributes before anything else within the contents of the Company element. I am not sure what $org was referring to, but if you simply want to copy the attributes of the Organization element to the Company element, then the above should work. Kind regards, Geert Drs. G.P.H. Josten Consultant Daidalos BV Source of Innovation Hoekeindsehof 1-4 2665 JZ Bleiswijk Tel.: +31 (0) 10 850 1200 Fax: +31 (0) 10 850 1199 www.daidalos.nl KvK 27164984 De informatie - verzonden in of met dit emailbericht - is afkomstig van Daidalos BV en is uitsluitend bestemd voor de geadresseerde. Indien u dit bericht onbedoeld hebt ontvangen, verzoeken wij u het te verwijderen. Aan dit bericht kunnen geen rechten worden ontleend. From: talk-bounces@x-query.com [mailto:talk-bounces@x-query.com] On Behalf Of Diraviam H Sent: dinsdag 17 februari 2009 7:15 To: talk@x-query.com Subject: [xquery-talk] How to add an optional attiribute to a constructed XML tag with XQuery ? I am creating an XML file say A, from another xml file B. The content of file B will be changing and some tags can have optional attributes. I want to include the attribute in the constructed XML file tag(s) through Xquery, only when it is available in source file B. I am trying something like this, where the attribute "name" is optional in source. let $x:= doc("source.xml") for $comp in $x/Unit/Data/Organization return DISCLAIMER: ----------------------------------------------------------------------------------------------------------------------- The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only. It shall not attach any liability on the originator or HCL or its affiliates. Any views or opinions presented in this email are solely those of the author and may not necessarily reflect the opinions of HCL or its affiliates. Any form of reproduction, dissemination, copying, disclosure, modification, distribution and / or publication of this message without the prior written consent of the author of this e-mail is strictly prohibited. If you have received this email in error please delete it and notify the sender immediately. Before opening any mail and attachments please check them for viruses and defect. ----------------------------------------------------------------------------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: http://x-query.com/pipermail/talk/attachments/20090217/7be09981/attachment.htm From mike at saxonica.com Tue Feb 17 09:18:33 2009 From: mike at saxonica.com (Michael Kay) Date: Tue Feb 17 01:17:51 2009 Subject: [xquery-talk] How to add an optional attiribute to aconstructed XML tag with XQuery ? In-Reply-To: <0260356C6DFE754BA6FA48E659A1433823EF016C37@Helios.olympus.borgus.nl> References: <0260356C6DFE754BA6FA48E659A1433823EF016C37@Helios.olympus.borgus.nl> Message-ID: Or a more precise equivalent would be {$comp/(@type, @primary, @name)} If you really need to create a new attribute conditionally, rather than copying an existing one, then you have to use a computed attribute constructor if (condition) then attribute {...} {...} else () Michael Kay http://www.saxonica.com/ _____ From: talk-bounces@x-query.com [mailto:talk-bounces@x-query.com] On Behalf Of Geert Josten Sent: 17 February 2009 06:34 To: Diraviam H; talk@x-query.com Subject: RE: [xquery-talk] How to add an optional attiribute to aconstructed XML tag with XQuery ? Hi, How about something like this: let $x:= doc("source.xml") for $comp in $x/Unit/Data/Organization return {$comp/@*} You can also name the attributes explicitly, wrap them in an if and a for loop if you like. But make sure to insert attributes before anything else within the contents of the Company element. I am not sure what $org was referring to, but if you simply want to copy the attributes of the Organization element to the Company element, then the above should work. Kind regards, Geert Drs. G.P.H. Josten Consultant Daidalos BV Source of Innovation Hoekeindsehof 1-4 2665 JZ Bleiswijk Tel.: +31 (0) 10 850 1200 Fax: +31 (0) 10 850 1199 www.daidalos.nl KvK 27164984 De informatie - verzonden in of met dit emailbericht - is afkomstig van Daidalos BV en is uitsluitend bestemd voor de geadresseerde. Indien u dit bericht onbedoeld hebt ontvangen, verzoeken wij u het te verwijderen. Aan dit bericht kunnen geen rechten worden ontleend. From: talk-bounces@x-query.com [mailto:talk-bounces@x-query.com] On Behalf Of Diraviam H Sent: dinsdag 17 februari 2009 7:15 To: talk@x-query.com Subject: [xquery-talk] How to add an optional attiribute to a constructed XML tag with XQuery ? I am creating an XML file say A, from another xml file B. The content of file B will be changing and some tags can have optional attributes. I want to include the attribute in the constructed XML file tag(s) through Xquery, only when it is available in source file B. I am trying something like this, where the attribute "name" is optional in source. let $x:= doc("source.xml") for $comp in $x/Unit/Data/Organization return DISCLAIMER: ---------------------------------------------------------------------------- ------------------------------------------- The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only. It shall not attach any liability on the originator or HCL or its affiliates. Any views or opinions presented in this email are solely those of the author and may not necessarily reflect the opinions of HCL or its affiliates. Any form of reproduction, dissemination, copying, disclosure, modification, distribution and / or publication of this message without the prior written consent of the author of this e-mail is strictly prohibited. If you have received this email in error please delete it and notify the sender immediately. Before opening any mail and attachments please check them for viruses and defect. ---------------------------------------------------------------------------- ------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: http://x-query.com/pipermail/talk/attachments/20090217/2ce95f27/attachment-0001.htm From james.fuller.2007 at gmail.com Fri Feb 20 11:04:36 2009 From: james.fuller.2007 at gmail.com (James Fuller) Date: Fri Feb 20 02:02:47 2009 Subject: [xquery-talk] [ANN] XML Prague 2009 March 21-22, only one month to go ... register now In-Reply-To: References: Message-ID: Gold Sponsor: Syntea Software Group a.s. XML Prague 2009 is now only one month away and this is a reminder to register and book flights & hotels for the conference now. * Registration - http://www.xmlprague.cz/register.html ---------------------------------------- Speakers ---------------------------------------- We have an impressive line up of sessions planned http://www.xmlprague.cz/sessions.html With confirmed speakers being: * Robin Berjon, Robineko * George Cristian Bina, oXygenXML * Alex Brown * Florent Georges, fgeorges.org * Tony Graham, Xcruciate * G. Ken Holman, Crane Softwrights Ltd. * Mark Howe, Xcruciate * Michael Kay, Saxonica * Murata Makoto * P. N?levka * A. Nordstr?m * Jeni Tennison, Jeni Tennison Consulting * V. Toman, EMC * Vaclav Trojan, Syntea * Priscilla Walmsley, Datypic * Norman Walsh, MarkLogic The schedule is comprised of two days of expert talks along with workshops and lightening talks. The program can be found here http://www.xmlprague.cz/program.html ---------------------------------------- Location ---------------------------------------- The conference is held in Prague, Czech Republic. Lesser Town Campus of Charles University Malostransk? n?m?st? 25, Prague, Czech Republic ------------------------- Please email us at info@xmlprague.cz and we will try our best to answer any questions you may have about the conference or venue. If you have already registered for the conference please ensure that you have paid your fee, also you will receive a final email from us a week or so before the conference confirming final details. Look forward to seeing everyone there. cheers, Jim Fuller ps: Don't forget G. Ken Holman XSLT/XQUERY/XPATH training course is being put on the week before the conference, details to be found here http://www.cranesoftwrights.com/index.html#Crane200903CZ ------------------------- XML Prague March 21-22, 2009 http://www.xmlprague.cz Sponsored by Syntea software group a.s. (http://www.syntea.cz) and oXygen (http://www.oxygenxml.com) and fgeorges.org (http://www.fgeorges.org) and Xcruciate (http://www.xcruciate.co.uk)