From mike at saxonica.com Fri Oct 7 03:19:26 2016 From: mike at saxonica.com (Michael Kay) Date: Fri, 7 Oct 2016 11:19:26 +0100 Subject: [xquery-talk] NullPointerException In-Reply-To: References: Message-ID: <773C1080-A32E-4BCF-B6D9-2C5CDC2FE8F6@saxonica.com> >with the following code I get a NullPointerException with Saxon 9.6.0.7 and wonder why A NullPointerException in Saxon code is always going to be a product bug, so it's best to report it directly at http://saxonica.plan.io/ I haven't tried running with 9.6.0.7, but on 9.6.0.9 and 9.7 the query runs successfully. So it's probably a bug that was fixed, though I can't immediately identify it. Alternatively, it's something specific to the way in which you are running the query, in which case we will need more details. Please try it on a later maintenance release, and if the problem still occurs, report it at http://saxonica.plan.io/, explaining exactly how you were running the query. Michael Kay Saxonica From leo.studer at varioweb.ch Fri Oct 7 03:35:41 2016 From: leo.studer at varioweb.ch (Leo Studer) Date: Fri, 7 Oct 2016 12:35:41 +0200 Subject: [xquery-talk] Namespace from prefix ? Message-ID: <9CEF3B5E-C589-4E92-B7D1-588A99A33DFC@varioweb.ch> Hello working with namespaces in xQuery Update I have the following situation declare namespace fc ="fitnesscenter.ch"; let $member := doc('FitnessCenter.xml')//fc:Member return ( delete node $member/@Level, insert node element {QName("fitnesscenter.ch",name($member/@Level))} {data($member/@Level)} as first into $member ) on the XML file Jeff lightgrey which works as it should. However, I don?t like to rewrite the namespace in the QName function. How can I use the declared namespace? Thanks in advance Leo -------------- next part -------------- An HTML attachment was scrubbed... URL: From dflorescu at me.com Fri Oct 21 10:13:45 2016 From: dflorescu at me.com (daniela florescu) Date: Fri, 21 Oct 2016 10:13:45 -0700 Subject: [xquery-talk] using FLWOR expressions (aka SQL..) directly in Python Message-ID: <1A078327-D968-4674-8626-0945EFE4CBC5@me.com> For all exasperated data scientists writing mind bending, complicated Python scrips to process their data: the power of complex, yet familiar, compact and optimizable SQL queries directly in Python, running on structured as well as unstructured data (XML, JSON). http://www.pythonql.org Well, actually it?s not SQL per se. It?s the better, cleaner and more powerful version of SELECT-FROM-WHERE,?. its the power of XQuery?s FLWOR expressions, directly usable as an expression in Python ? together with any other expected goodies, complex path expressions, etc. Enjoy. Best regards Dana -------------- next part -------------- An HTML attachment was scrubbed... URL: From ihe.onwuka at gmail.com Fri Oct 21 10:46:57 2016 From: ihe.onwuka at gmail.com (Ihe Onwuka) Date: Fri, 21 Oct 2016 13:46:57 -0400 Subject: [xquery-talk] using FLWOR expressions (aka SQL..) directly in Python In-Reply-To: <1A078327-D968-4674-8626-0945EFE4CBC5@me.com> References: <1A078327-D968-4674-8626-0945EFE4CBC5@me.com> Message-ID: Is the big thing here integration with the Python ecosystem? Otherwise what is this offering to people who are not XQueryphobic. On Fri, Oct 21, 2016 at 1:13 PM, daniela florescu wrote: > For all exasperated data scientists writing mind bending, complicated > Python scrips to process their data: the power of complex, > yet familiar, compact and optimizable SQL queries directly in Python, > running on structured as well as unstructured data (XML, JSON). > > http://www.pythonql.org > > Well, actually it?s not SQL per se. It?s the better, cleaner and more > powerful version of SELECT-FROM-WHERE,?. its the > power of XQuery?s FLWOR expressions, directly usable as an expression in > Python ? together with any other expected goodies, > complex path expressions, etc. > > Enjoy. > > Best regards > Dana > > > > _______________________________________________ > talk at x-query.com > http://x-query.com/mailman/listinfo/talk > -------------- next part -------------- An HTML attachment was scrubbed... URL: From dflorescu at me.com Fri Oct 21 10:59:03 2016 From: dflorescu at me.com (daniela florescu) Date: Fri, 21 Oct 2016 10:59:03 -0700 Subject: [xquery-talk] [xml-dev] Re: using FLWOR expressions (aka SQL..) directly in Python In-Reply-To: References: <1A078327-D968-4674-8626-0945EFE4CBC5@me.com> Message-ID: Ihe, Based on my experience, lots of data processing people use Python those days, yet they are not helped much by the available tools in their ecosystem. PythonQL is to Python what LinQ was to C#, that?s all. A simple and more natural way to run queries directly integrated in your normal programming and a replacement to the horrible scripts that most people need to write today for data manipulation. Now, is this ?XQuery" !? Nope. The FLWOR expressions of XQuery have nothing to do with XML, neither syntactically, nor semantically. They are just a generalized, cleaner and more powerful form of data comprehension , out of which SQL?s SELECT-FROM-WHERE is an example, but not the only one. (Python has it?s now form of comprehension for example). In fact in PhytonQL we tried to avoid what we perceived as serious problems with the adoption of XQuery. For example we made the following syntactic choices (good or bad, we?ll see?): 1. FOR and FROM are synonyms. Choose whatever you like the best?.. 2. IF and WHERE are synonyms. Again, choose whatever you like the best?.. 3. We avoided the (over)loaded RETURN keyword of XQuery and called it SELECT like in SQL. 4. We put the SELECT clause first, like in SQL. But other then this, it?s just 100% FLWOr expression, with windowing, grouping, etc. Does this make sense ? Best regards Dana > On Oct 21, 2016, at 10:46 AM, Ihe Onwuka wrote: > > Is the big thing here integration with the Python ecosystem? > Otherwise what is this offering to people who are not XQueryphobic. > > On Fri, Oct 21, 2016 at 1:13 PM, daniela florescu > wrote: > For all exasperated data scientists writing mind bending, complicated Python scrips to process their data: the power of complex, > yet familiar, compact and optimizable SQL queries directly in Python, running on structured as well as unstructured data (XML, JSON). > > http://www.pythonql.org > > Well, actually it?s not SQL per se. It?s the better, cleaner and more powerful version of SELECT-FROM-WHERE,?. its the > power of XQuery?s FLWOR expressions, directly usable as an expression in Python ? together with any other expected goodies, > complex path expressions, etc. > > Enjoy. > > Best regards > Dana > > > > _______________________________________________ > talk at x-query.com > http://x-query.com/mailman/listinfo/talk > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ihe.onwuka at gmail.com Fri Oct 21 11:15:29 2016 From: ihe.onwuka at gmail.com (Ihe Onwuka) Date: Fri, 21 Oct 2016 14:15:29 -0400 Subject: [xquery-talk] [xml-dev] Re: using FLWOR expressions (aka SQL..) directly in Python In-Reply-To: References: <1A078327-D968-4674-8626-0945EFE4CBC5@me.com> Message-ID: It answers my question. I would like to see how this goes down in the Python community so do you have links to blogs and stuff where the announcement has been made. My 2 cents would have been to release and not mention anything about XQuery or JSONiq On Fri, Oct 21, 2016 at 1:59 PM, daniela florescu wrote: > Ihe, > > Based on my experience, lots of data processing people use Python those > days, yet they are not helped > much by the available tools in their ecosystem. > > PythonQL is to Python what LinQ was to C#, that?s all. > > A simple and more natural way to run queries directly integrated in your > normal programming and > a replacement to the horrible scripts that most people need to write today > for data manipulation. > > Now, is this ?XQuery" !? Nope. > > The FLWOR expressions of XQuery have nothing to do with XML, neither > syntactically, nor semantically. > > They are just a generalized, cleaner and more powerful form of data > comprehension , out of which SQL?s SELECT-FROM-WHERE > is an example, but not the only one. (Python has it?s now form of > comprehension for example). > > In fact in PhytonQL we tried to avoid what we perceived as serious > problems with the adoption of XQuery. > > For example we made the following syntactic choices (good or bad, we?ll > see?): > > 1. FOR and FROM are synonyms. Choose whatever you like the best?.. > 2. IF and WHERE are synonyms. Again, choose whatever you like the best?.. > 3. We avoided the (over)loaded RETURN keyword of XQuery and called it > SELECT like in SQL. > 4. We put the SELECT clause first, like in SQL. > > But other then this, it?s just 100% FLWOr expression, with windowing, > grouping, etc. > > Does this make sense ? > > Best regards > Dana > > > > > > > > On Oct 21, 2016, at 10:46 AM, Ihe Onwuka wrote: > > Is the big thing here integration with the Python ecosystem? > Otherwise what is this offering to people who are not XQueryphobic. > > On Fri, Oct 21, 2016 at 1:13 PM, daniela florescu > wrote: > >> For all exasperated data scientists writing mind bending, complicated >> Python scrips to process their data: the power of complex, >> yet familiar, compact and optimizable SQL queries directly in Python, >> running on structured as well as unstructured data (XML, JSON). >> >> http://www.pythonql.org >> >> Well, actually it?s not SQL per se. It?s the better, cleaner and more >> powerful version of SELECT-FROM-WHERE,?. its the >> power of XQuery?s FLWOR expressions, directly usable as an expression in >> Python ? together with any other expected goodies, >> complex path expressions, etc. >> >> Enjoy. >> >> Best regards >> Dana >> >> >> >> _______________________________________________ >> talk at x-query.com >> http://x-query.com/mailman/listinfo/talk >> > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From pavel.velikhov at gmail.com Fri Oct 21 11:29:46 2016 From: pavel.velikhov at gmail.com (Pavel Velikhov) Date: Fri, 21 Oct 2016 21:29:46 +0300 Subject: [xquery-talk] [xml-dev] Re: using FLWOR expressions (aka SQL..) directly in Python In-Reply-To: References: <1A078327-D968-4674-8626-0945EFE4CBC5@me.com> Message-ID: Hi Ihe! So we made just a small number of announcements and we actually forgot about posting to some prominent Python lists, like comp.lang.python. Thanks for the idea! But so far the response was quite positive. ?pavel On 21 Oct 2016, at 21:15, Ihe Onwuka wrote: It answers my question. I would like to see how this goes down in the Python community so do you have links to blogs and stuff where the announcement has been made. My 2 cents would have been to release and not mention anything about XQuery or JSONiq On Fri, Oct 21, 2016 at 1:59 PM, daniela florescu wrote: > Ihe, > > Based on my experience, lots of data processing people use Python those > days, yet they are not helped > much by the available tools in their ecosystem. > > PythonQL is to Python what LinQ was to C#, that?s all. > > A simple and more natural way to run queries directly integrated in your > normal programming and > a replacement to the horrible scripts that most people need to write today > for data manipulation. > > Now, is this ?XQuery" !? Nope. > > The FLWOR expressions of XQuery have nothing to do with XML, neither > syntactically, nor semantically. > > They are just a generalized, cleaner and more powerful form of data > comprehension , out of which SQL?s SELECT-FROM-WHERE > is an example, but not the only one. (Python has it?s now form of > comprehension for example). > > In fact in PhytonQL we tried to avoid what we perceived as serious > problems with the adoption of XQuery. > > For example we made the following syntactic choices (good or bad, we?ll > see?): > > 1. FOR and FROM are synonyms. Choose whatever you like the best?.. > 2. IF and WHERE are synonyms. Again, choose whatever you like the best?.. > 3. We avoided the (over)loaded RETURN keyword of XQuery and called it > SELECT like in SQL. > 4. We put the SELECT clause first, like in SQL. > > But other then this, it?s just 100% FLWOr expression, with windowing, > grouping, etc. > > Does this make sense ? > > Best regards > Dana > > > > > > > > On Oct 21, 2016, at 10:46 AM, Ihe Onwuka wrote: > > Is the big thing here integration with the Python ecosystem? > Otherwise what is this offering to people who are not XQueryphobic. > > On Fri, Oct 21, 2016 at 1:13 PM, daniela florescu > wrote: > >> For all exasperated data scientists writing mind bending, complicated >> Python scrips to process their data: the power of complex, >> yet familiar, compact and optimizable SQL queries directly in Python, >> running on structured as well as unstructured data (XML, JSON). >> >> http://www.pythonql.org >> >> Well, actually it?s not SQL per se. It?s the better, cleaner and more >> powerful version of SELECT-FROM-WHERE,?. its the >> power of XQuery?s FLWOR expressions, directly usable as an expression in >> Python ? together with any other expected goodies, >> complex path expressions, etc. >> >> Enjoy. >> >> Best regards >> Dana >> >> >> >> _______________________________________________ >> talk at x-query.com >> http://x-query.com/mailman/listinfo/talk >> > > > _______________________________________________ talk at x-query.com http://x-query.com/mailman/listinfo/talk -------------- next part -------------- An HTML attachment was scrubbed... URL: From dflorescu at me.com Fri Oct 21 11:49:26 2016 From: dflorescu at me.com (daniela florescu) Date: Fri, 21 Oct 2016 11:49:26 -0700 Subject: [xquery-talk] [xml-dev] Re: using FLWOR expressions (aka SQL..) directly in Python In-Reply-To: References: <1A078327-D968-4674-8626-0945EFE4CBC5@me.com> Message-ID: > > My 2 cents would have been to release and not mention anything about XQuery or JSONiq Yes, Ihe, I think I agree :-)) People love to hate XQuery, and they have no idea why, and very often they don'tt even have an idea of what XQuery IS before hating it?.but such is life. I stopped trying to understand this fact? sometimes things are just like that, and that?s it. Move on. So nope, we?ll not say anything about XQuery in public :-) Any similarity to between PytonQL and XQuery are totally fictitious?. :-)) Dana > > On Fri, Oct 21, 2016 at 1:59 PM, daniela florescu > wrote: > Ihe, > > Based on my experience, lots of data processing people use Python those days, yet they are not helped > much by the available tools in their ecosystem. > > PythonQL is to Python what LinQ was to C#, that?s all. > > A simple and more natural way to run queries directly integrated in your normal programming and > a replacement to the horrible scripts that most people need to write today for data manipulation. > > Now, is this ?XQuery" !? Nope. > > The FLWOR expressions of XQuery have nothing to do with XML, neither syntactically, nor semantically. > > They are just a generalized, cleaner and more powerful form of data comprehension , out of which SQL?s SELECT-FROM-WHERE > is an example, but not the only one. (Python has it?s now form of comprehension for example). > > In fact in PhytonQL we tried to avoid what we perceived as serious problems with the adoption of XQuery. > > For example we made the following syntactic choices (good or bad, we?ll see?): > > 1. FOR and FROM are synonyms. Choose whatever you like the best?.. > 2. IF and WHERE are synonyms. Again, choose whatever you like the best?.. > 3. We avoided the (over)loaded RETURN keyword of XQuery and called it SELECT like in SQL. > 4. We put the SELECT clause first, like in SQL. > > But other then this, it?s just 100% FLWOr expression, with windowing, grouping, etc. > > Does this make sense ? > > Best regards > Dana > > > > > > > >> On Oct 21, 2016, at 10:46 AM, Ihe Onwuka > wrote: >> >> Is the big thing here integration with the Python ecosystem? >> Otherwise what is this offering to people who are not XQueryphobic. >> >> On Fri, Oct 21, 2016 at 1:13 PM, daniela florescu > wrote: >> For all exasperated data scientists writing mind bending, complicated Python scrips to process their data: the power of complex, >> yet familiar, compact and optimizable SQL queries directly in Python, running on structured as well as unstructured data (XML, JSON). >> >> http://www.pythonql.org >> >> Well, actually it?s not SQL per se. It?s the better, cleaner and more powerful version of SELECT-FROM-WHERE,?. its the >> power of XQuery?s FLWOR expressions, directly usable as an expression in Python ? together with any other expected goodies, >> complex path expressions, etc. >> >> Enjoy. >> >> Best regards >> Dana >> >> >> >> _______________________________________________ >> talk at x-query.com >> http://x-query.com/mailman/listinfo/talk >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From dflorescu at me.com Fri Oct 21 13:01:25 2016 From: dflorescu at me.com (daniela florescu) Date: Fri, 21 Oct 2016 13:01:25 -0700 Subject: [xquery-talk] [xml-dev] Re: using FLWOR expressions (aka SQL..) directly in Python In-Reply-To: References: <1A078327-D968-4674-8626-0945EFE4CBC5@me.com> Message-ID: <79CFFC4B-918D-46F3-AD6D-64F59EE19F75@me.com> > On Oct 21, 2016, at 11:49 AM, daniela florescu wrote: > >> >> My 2 cents would have been to release and not mention anything about XQuery or JSONiq Ihe, a more serious answer to your comment above. XQuery was designed and adapted to query XML (together with XML Schema and the rest of the XML world, etc, etc) JSONiq was designed to query JSON, and only JSON. ====== Unlike them, PythonQL is not attached to any particular data model or data format. I can query anything that can be represented in the Python structures, e.g. tables, XML, JSON. It?s not data model specific. What those three languages have in common is the use of the semantics of the FLWOR expression (not the syntax!). The FLWOR expression is a general purpose data comprehension programing paradigm, not related to any data model or data format. SELECT-FROM-WHERE in SQL is just a simpler case of FLWOR expression. Best regards Dana -------------- next part -------------- An HTML attachment was scrubbed... URL: From christine.schwartz at ptsem.edu Mon Oct 31 09:52:38 2016 From: christine.schwartz at ptsem.edu (Schwartz, Christine) Date: Mon, 31 Oct 2016 16:52:38 +0000 Subject: [xquery-talk] Unusual XPath syntax question Message-ID: <9A3223ADEBFC75488A09810F4478FE4A01AB1777C7@Exchange01.pts-eden.org> Hi, I'm hoping someone on this list can clarify my conundrum. I'm working with a colleague on a writing project and one of his examples uses this XPath syntax "./." in the starts-with() function within an XSLT stylesheet. I don't know what "./." means. I would think that "." alone would be sufficient to refer to the context node. Here's the example: ??? ??? ? . ? ??? ??? ? . ? ??? ??? ? . ? ??? ??? ???????? ??????. ???????? Thanks, Chris Christine Schwartz Metadata Librarian and XML Database Administrator Princeton Theological Seminary Library P.O. Box 821 Princeton, NJ 08542 christine.schwartz at ptsem.edu (609) 497-7938 From joewiz at gmail.com Mon Oct 31 10:12:21 2016 From: joewiz at gmail.com (Joe Wicentowski) Date: Mon, 31 Oct 2016 13:12:21 -0400 Subject: [xquery-talk] Unusual XPath syntax question In-Reply-To: <9A3223ADEBFC75488A09810F4478FE4A01AB1777C7@Exchange01.pts-eden.org> References: <9A3223ADEBFC75488A09810F4478FE4A01AB1777C7@Exchange01.pts-eden.org> Message-ID: Hi Christine, > I don't know what "./." means. I would think that "." alone would be sufficient to refer to the context node. Agreed - "./." gets you precisely ".". If "." is compact syntax for "self::node()", then the expanded syntax for "./." would be "self::node()/self::node()". Testing in oXygen shows that ". = ././././././././."! Joe From ghislain.fourny at gmail.com Mon Oct 31 10:12:56 2016 From: ghislain.fourny at gmail.com (Ghislain Fourny) Date: Mon, 31 Oct 2016 18:12:56 +0100 Subject: [xquery-talk] Unusual XPath syntax question In-Reply-To: <9A3223ADEBFC75488A09810F4478FE4A01AB1777C7@Exchange01.pts-eden.org> References: <9A3223ADEBFC75488A09810F4478FE4A01AB1777C7@Exchange01.pts-eden.org> Message-ID: Hi Christine, In principle, in XPath, "./." is the same as "." and returns the context item. There is a minor difference, in that "./." will return an error if the context item is not a node, but in the case of the query at hand, it should always be an element node. Replacing "./." with "." produced the same results on my side. I'd definitely wait for Mike's answer before concluding on this though, because he'll probably see something I haven't. :-) Kind regards, Ghislain > On 31 Oct 2016, at 17:52, Schwartz, Christine wrote: > > Hi, > > I'm hoping someone on this list can clarify my conundrum. > > I'm working with a colleague on a writing project and one of his examples uses this XPath syntax "./." in the starts-with() function within an XSLT stylesheet. I don't know what "./." means. I would think that "." alone would be sufficient to refer to the context node. > > Here's the example: > > > > > > > . > > > > > . > > > > > . > > > > > . > > Thanks, > > Chris > > Christine Schwartz > Metadata Librarian and XML Database Administrator > Princeton Theological Seminary > Library > P.O. Box 821 > Princeton, NJ 08542 > christine.schwartz at ptsem.edu > (609) 497-7938 > > > > _______________________________________________ > talk at x-query.com > http://x-query.com/mailman/listinfo/talk From gkholman at CraneSoftwrights.com Mon Oct 31 10:20:43 2016 From: gkholman at CraneSoftwrights.com (G. Ken Holman) Date: Mon, 31 Oct 2016 13:20:43 -0400 Subject: [xquery-talk] Unusual XPath syntax question In-Reply-To: <9A3223ADEBFC75488A09810F4478FE4A01AB1777C7@Exchange01.pts- eden.org> References: <9A3223ADEBFC75488A09810F4478FE4A01AB1777C7@Exchange01.pts-eden.org> Message-ID: <7.0.1.0.2.20161031131835.04fc1e70@wheresmymailserver.com> Yes, "." is the same as "./." and the shorter version (to me) would be more suitable for legibility. The shorter syntax already is being used in the select attribute, so I'm unclear what the author might be trying to gain with the longer syntax. . . . . . . Ken At 2016-10-31 16:52 +0000, Schwartz, Christine wrote: >Hi, > >I'm hoping someone on this list can clarify my conundrum. > >I'm working with a colleague on a writing project and one of his >examples uses this XPath syntax "./." in the starts-with() function >within an XSLT stylesheet. I don't know what "./." means. I would >think that "." alone would be sufficient to refer to the context node. > >Here's the example: > > > > > > > select="."/>. > > > > > select="."/>. > > > > > select="."/>. > > > > > select="."/>. > >Thanks, > >Chris > >Christine Schwartz >Metadata Librarian and XML Database Administrator >Princeton Theological Seminary >Library >P.O. Box 821 >Princeton, NJ 08542 >christine.schwartz at ptsem.edu >(609) 497-7938 > > > >_______________________________________________ >talk at x-query.com >http://x-query.com/mailman/listinfo/talk -- Check our site for free XML, XSLT, XSL-FO and UBL developer resources | Streaming hands-on XSLT/XPath 2 training @US$45: http://goo.gl/Dd9qBK | Crane Softwrights Ltd. _ _ _ _ _ _ http://www.CraneSoftwrights.com/q/ | G Ken Holman _ _ _ _ _ _ _ _ _ _ mailto:gkholman at CraneSoftwrights.com | Google+ blog _ _ _ _ _ http://plus.google.com/+GKenHolman-Crane/posts | Legal business disclaimers: _ _ http://www.CraneSoftwrights.com/legal | From ihe.onwuka at gmail.com Mon Oct 31 10:42:09 2016 From: ihe.onwuka at gmail.com (Ihe Onwuka) Date: Mon, 31 Oct 2016 13:42:09 -0400 Subject: [xquery-talk] Unusual XPath syntax question In-Reply-To: <7.0.1.0.2.20161031131835.04fc1e70@wheresmymailserver.com> References: <9A3223ADEBFC75488A09810F4478FE4A01AB1777C7@Exchange01.pts-eden.org> <7.0.1.0.2.20161031131835.04fc1e70@wheresmymailserver.com> Message-ID: On Mon, Oct 31, 2016 at 1:20 PM, G. Ken Holman < gkholman at cranesoftwrights.com> wrote: > Yes, "." is the same as "./." and the shorter version (to me) would be > more suitable for legibility. The shorter syntax already is being used in > the select attribute, so I'm unclear what the author might be trying to > gain with the longer syntax. > > . . . . . . Ken > emphasis. > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From gkholman at CraneSoftwrights.com Mon Oct 31 10:48:45 2016 From: gkholman at CraneSoftwrights.com (G. Ken Holman) Date: Mon, 31 Oct 2016 13:48:45 -0400 Subject: [xquery-talk] Unusual XPath syntax question In-Reply-To: References: <9A3223ADEBFC75488A09810F4478FE4A01AB1777C7@Exchange01.pts-eden.org> <7.0.1.0.2.20161031131835.04fc1e70@wheresmymailserver.com> Message-ID: <7.0.1.0.2.20161031134757.04fc16c0@wheresmymailserver.com> At 2016-10-31 13:42 -0400, Ihe Onwuka wrote: >On Mon, Oct 31, 2016 at 1:20 PM, G. Ken Holman ><gkholman at cranesoftwrights.com> wrote: >Yes, "." is the same as "./." and the shorter version (to me) would >be more suitable for legibility. The shorter syntax already is being >used in the select attribute, so I'm unclear what the author might >be trying to gain with the longer syntax. > >. . . . . . Ken > > >emphasis. .... emphasizing what? . . . . . . . Ken -- Check our site for free XML, XSLT, XSL-FO and UBL developer resources | Streaming hands-on XSLT/XPath 2 training @US$45: http://goo.gl/Dd9qBK | Crane Softwrights Ltd. _ _ _ _ _ _ http://www.CraneSoftwrights.com/q/ | G Ken Holman _ _ _ _ _ _ _ _ _ _ mailto:gkholman at CraneSoftwrights.com | Google+ blog _ _ _ _ _ http://plus.google.com/+GKenHolman-Crane/posts | Legal business disclaimers: _ _ http://www.CraneSoftwrights.com/legal | From mike at saxonica.com Mon Oct 31 11:17:02 2016 From: mike at saxonica.com (Michael Kay) Date: Mon, 31 Oct 2016 18:17:02 +0000 Subject: [xquery-talk] Unusual XPath syntax question In-Reply-To: <9A3223ADEBFC75488A09810F4478FE4A01AB1777C7@Exchange01.pts-eden.org> References: <9A3223ADEBFC75488A09810F4478FE4A01AB1777C7@Exchange01.pts-eden.org> Message-ID: <5E7CC9AC-248A-478D-8CAD-50E2B5ADD478@saxonica.com> I agree with the other respondents: apart from giving an error if the context item is not a node, "./." is precisely equivalent to ".". (Not sure why an XSLT question is appearing on the XQuery list...) There's a certain fondness for verbosity in some parts of the XSLT user community. It's quite common to see "./price" where "price" would serve perfectly well, or "price/text()" for "price"; or xsl:element and xsl:attribute used where literal result elements would do the job, or (my favourite gripe) where would serve the purpose better. And of course we've all seen things like . I think some XSLT programmers must be paid by the yard; alternatively the language attracts those who love the sourd of their own keyboard. But "./." isn't an expansion I have seen before. Michael Kay Saxonica > On 31 Oct 2016, at 16:52, Schwartz, Christine wrote: > > Hi, > > I'm hoping someone on this list can clarify my conundrum. > > I'm working with a colleague on a writing project and one of his examples uses this XPath syntax "./." in the starts-with() function within an XSLT stylesheet. I don't know what "./." means. I would think that "." alone would be sufficient to refer to the context node. > > Here's the example: > > > > > > > . > > > > > . > > > > > . > > > > > . > > Thanks, > > Chris > > Christine Schwartz > Metadata Librarian and XML Database Administrator > Princeton Theological Seminary > Library > P.O. Box 821 > Princeton, NJ 08542 > christine.schwartz at ptsem.edu > (609) 497-7938 > > > > _______________________________________________ > talk at x-query.com > http://x-query.com/mailman/listinfo/talk From wshager at gmail.com Mon Oct 31 15:12:02 2016 From: wshager at gmail.com (W.S. Hager) Date: Mon, 31 Oct 2016 23:12:02 +0100 Subject: [xquery-talk] Unusual XPath syntax question In-Reply-To: <5E7CC9AC-248A-478D-8CAD-50E2B5ADD478@saxonica.com> References: <9A3223ADEBFC75488A09810F4478FE4A01AB1777C7@Exchange01.pts-eden.org> <5E7CC9AC-248A-478D-8CAD-50E2B5ADD478@saxonica.com> Message-ID: I just love to do .[1][1][1][1][1][1][1] Op 31 okt. 2016 19:19 schreef "Michael Kay" : > I agree with the other respondents: apart from giving an error if the > context item is not a node, "./." is precisely equivalent to ".". > > (Not sure why an XSLT question is appearing on the XQuery list...) > > There's a certain fondness for verbosity in some parts of the XSLT user > community. It's quite common to see "./price" where "price" would serve > perfectly well, or "price/text()" for "price"; or xsl:element and > xsl:attribute used where literal result elements would do the job, or (my > favourite gripe) > > > > > > where would serve the purpose > better. > > And of course we've all seen things like . > > I think some XSLT programmers must be paid by the yard; alternatively the > language attracts those who love the sourd of their own keyboard. But "./." > isn't an expansion I have seen before. > > Michael Kay > Saxonica > > > On 31 Oct 2016, at 16:52, Schwartz, Christine < > christine.schwartz at ptsem.edu> wrote: > > > > Hi, > > > > I'm hoping someone on this list can clarify my conundrum. > > > > I'm working with a colleague on a writing project and one of his > examples uses this XPath syntax "./." in the starts-with() function within > an XSLT stylesheet. I don't know what "./." means. I would think that "." > alone would be sufficient to refer to the context node. > > > > Here's the example: > > > > > > > > > > > > > > select="."/>. > > > > > > > > > > select="."/>. > > > > > > > > > > select="."/>. > > > > > > > > > > select="."/>. > > > > Thanks, > > > > Chris > > > > Christine Schwartz > > Metadata Librarian and XML Database Administrator > > Princeton Theological Seminary > > Library > > P.O. Box 821 > > Princeton, NJ 08542 > > christine.schwartz at ptsem.edu > > (609) 497-7938 > > > > > > > > _______________________________________________ > > talk at x-query.com > > http://x-query.com/mailman/listinfo/talk > > > > _______________________________________________ > talk at x-query.com > http://x-query.com/mailman/listinfo/talk > -------------- next part -------------- An HTML attachment was scrubbed... URL: