{"id":6658,"date":"2016-07-21T12:06:02","date_gmt":"2016-07-21T10:06:02","guid":{"rendered":"http:\/\/www.b.shuttle.de\/hayek\/hayek\/jochen\/wp\/blog-en\/?p=6658"},"modified":"2021-09-15T17:14:23","modified_gmt":"2021-09-15T15:14:23","slug":"after-a-couple-of-months-using-xpath-and-xmlstarlet-i-created-my-first-lenghty-xquery-script-using-saxon9he","status":"publish","type":"post","link":"https:\/\/wp.jochen.hayek.name\/blog-en\/2016\/07\/21\/after-a-couple-of-months-using-xpath-and-xmlstarlet-i-created-my-first-lenghty-xquery-script-using-saxon9he\/","title":{"rendered":"after a couple of months using XPath and xmlstarlet I created my first lenghty XQuery script using Saxon9HE"},"content":{"rendered":"<p>\t\t\t\t&#8220;In production&#8221; I have been\u00a0using a Bash+xmlstarlet script, that I wanted to optimise by rewriting it into an XQuery script. This would be my 1st XQuery script after a couple of months of exercising XQuery through Priscilla Walmsley&#8217;s book and Saxon9HE \u2013 a couple of hours per week only because of my entire workload.<\/p>\n<p>During the last couple of days I managed to complete the rewriting of my utility. I acquired quite some experience, and now I am rather satisfied with my work \u2013 and myself\u00a0 \ud83d\ude0e<\/p>\n<p>I learned, how to use regular expressions in XQuery \u2013 of course with decades of using regular expressions in various languages as a starting point.<\/p>\n<p>And I learned, how to use decimal number formatting \u2013 in 2 different technical &#8220;locales&#8221; in parallel. Apparently &#8220;left white space padding&#8221; of decimal numbers is something the creators of XQuery did not genuinely incorporate into the XQuery environment. Decimal number formatting in XQuery is rather different to how you do it in C or Perl, it resembles more how you do it in Fortran or COBOL \u2013 and I don&#8217;t mean to criticise that approach. All over it is just very, very different \u2013 and confusing, if it comes to details.\t\t\t\t<\/p>\n","protected":false},"excerpt":{"rendered":"<p>&#8220;In production&#8221; I have been\u00a0using a Bash+xmlstarlet script, that I wanted to optimise by rewriting it into an XQuery script. This would be my 1st XQuery script after a couple of months of exercising XQuery through Priscilla Walmsley&#8217;s book and Saxon9HE \u2013 a couple of hours per week only because of my entire workload. During [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_crdt_document":"","jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":true,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"_share_on_mastodon":"0"},"categories":[851,732,733],"tags":[1281,1282],"class_list":["post-6658","post","type-post","status-publish","format-standard","hentry","category-xmlstarlet","category-xpath","category-xquery","tag-saxon","tag-saxon9"],"share_on_mastodon":{"url":"","error":""},"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/paO0kP-1Jo","jetpack_likes_enabled":true,"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/wp.jochen.hayek.name\/blog-en\/wp-json\/wp\/v2\/posts\/6658","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wp.jochen.hayek.name\/blog-en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wp.jochen.hayek.name\/blog-en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wp.jochen.hayek.name\/blog-en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/wp.jochen.hayek.name\/blog-en\/wp-json\/wp\/v2\/comments?post=6658"}],"version-history":[{"count":1,"href":"https:\/\/wp.jochen.hayek.name\/blog-en\/wp-json\/wp\/v2\/posts\/6658\/revisions"}],"predecessor-version":[{"id":11877,"href":"https:\/\/wp.jochen.hayek.name\/blog-en\/wp-json\/wp\/v2\/posts\/6658\/revisions\/11877"}],"wp:attachment":[{"href":"https:\/\/wp.jochen.hayek.name\/blog-en\/wp-json\/wp\/v2\/media?parent=6658"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wp.jochen.hayek.name\/blog-en\/wp-json\/wp\/v2\/categories?post=6658"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wp.jochen.hayek.name\/blog-en\/wp-json\/wp\/v2\/tags?post=6658"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}